stack problems

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

stack problems

Dennis Raddle
Trying to learn stack. I'm following the tutorial on this page:


I built helloworld. Then I modified Lib.hs to include Data.Text.IO, as the tutorial specifies. I typed 'stack build' and got the error that the text package wasn't installed, as the tutorial says I would. I then modified helloworld.cabal to have these lines:

  build-depends:       base
                     , helloworld
                     , text

and typed 'stack build' again. I got the exact same  output - an error on building Lib.hs, 'Failed to load interface for Data.Text.IO. I checked that I really modified al lthe right files and can't find anything I did wrong.


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: stack problems

David Turner-2
Hi,

It looks like you've added `text` to the list of dependencies for the executable, rather than the library. Try adding it to the `build-depends` field of the library block in the cabal file instead.

Cheers,

David

On 28 May 2017 07:41, "Dennis Raddle" <[hidden email]> wrote:
Trying to learn stack. I'm following the tutorial on this page:


I built helloworld. Then I modified Lib.hs to include Data.Text.IO, as the tutorial specifies. I typed 'stack build' and got the error that the text package wasn't installed, as the tutorial says I would. I then modified helloworld.cabal to have these lines:

  build-depends:       base
                     , helloworld
                     , text

and typed 'stack build' again. I got the exact same  output - an error on building Lib.hs, 'Failed to load interface for Data.Text.IO. I checked that I really modified al lthe right files and can't find anything I did wrong.


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: stack problems

Damian Nadales
In reply to this post by Dennis Raddle
Without seeing all the files I'd guess you added the `text` package
under the `build-depends` of the executable, and not of the library.
Is that correct?

On Sun, May 28, 2017 at 8:41 AM, Dennis Raddle <[hidden email]> wrote:

> Trying to learn stack. I'm following the tutorial on this page:
>
> https://docs.haskellstack.org/en/stable/GUIDE/
>
> I built helloworld. Then I modified Lib.hs to include Data.Text.IO, as the
> tutorial specifies. I typed 'stack build' and got the error that the text
> package wasn't installed, as the tutorial says I would. I then modified
> helloworld.cabal to have these lines:
>
>   build-depends:       base
>                      , helloworld
>                      , text
>
> and typed 'stack build' again. I got the exact same  output - an error on
> building Lib.hs, 'Failed to load interface for Data.Text.IO. I checked that
> I really modified al lthe right files and can't find anything I did wrong.
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: stack problems

Dennis Raddle
In reply to this post by David Turner-2
That solved it, thank you.


On Sat, May 27, 2017 at 11:48 PM, David Turner <[hidden email]> wrote:
Hi,

It looks like you've added `text` to the list of dependencies for the executable, rather than the library. Try adding it to the `build-depends` field of the library block in the cabal file instead.

Cheers,

David

On 28 May 2017 07:41, "Dennis Raddle" <[hidden email]> wrote:
Trying to learn stack. I'm following the tutorial on this page:


I built helloworld. Then I modified Lib.hs to include Data.Text.IO, as the tutorial specifies. I typed 'stack build' and got the error that the text package wasn't installed, as the tutorial says I would. I then modified helloworld.cabal to have these lines:

  build-depends:       base
                     , helloworld
                     , text

and typed 'stack build' again. I got the exact same  output - an error on building Lib.hs, 'Failed to load interface for Data.Text.IO. I checked that I really modified al lthe right files and can't find anything I did wrong.


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.