ChristopherBiscardi / snap-for-beginners

Repository for Snap for Beginners, Including GH Pages.
http://snapforbeginners.com/
19 stars 3 forks source link

Versioning issue surrounding Data.Text #2

Open michaelochurch opened 9 years ago

michaelochurch commented 9 years ago

This could well be a problem on my end, but I've been going through the Snap for Beginners book and I ran into this error when working through the Digestive Functors chapter here.

The problem seems to be rooted in the type of Text.Digestive.text, which is `text-1.0.0.1:Data.Text.Internal.Text. This means that if you have any other version of thetextpackage, thecheck`` expressions are a type error, e.g.

Snap!> :t check userErrMsg isNotEmpty (text Nothing)

<interactive>:1:30:
    Couldn't match type ‘text-1.0.0.1:Data.Text.Internal.Text’
                  with ‘T.Text’
    NB: ‘text-1.0.0.1:Data.Text.Internal.Text’
          is defined in ‘Data.Text.Internal’ in package ‘text-1.0.0.1’
        ‘T.Text’
          is defined in ‘Data.Text.Internal’ in package ‘text-1.1.0.0’
    Expected type: Form T.Text m T.Text
      Actual type: Form T.Text m text-1.0.0.1:Data.Text.Internal.Text
    In the third argument of ‘check’, namely ‘(text Nothing)’
    In the expression: check userErrMsg isNotEmpty (text Nothing)

I'm fairly new to Haskell "in the large" so this could be a mistake on my end. In any case, I'd love to know what's causing this.

ChristopherBiscardi commented 9 years ago

Thanks for reporting.

There were some updates to the digestive-functors-* packages within the last day or so. What version of ghc are you using?

michaelochurch commented 9 years ago

I'm on 7.8.3 but I think the problem might be that I wasn't running the project in a cabal sandbox. So I'm trying to fix that.

-Mike

On Fri, Apr 24, 2015 at 12:37 PM, Christopher Biscardi < notifications@github.com> wrote:

Thanks for reporting.

There were some updates to the digestive-functors-* packages within the last day or so. What version of ghc are you using?

— Reply to this email directly or view it on GitHub https://github.com/ChristopherBiscardi/snap-for-beginners/issues/2#issuecomment-96008803 .

michaelochurch commented 9 years ago

Update: using a sandbox, I no longer have this problem if I use cabal repl. If I use ghci I get the version problem.

On Fri, Apr 24, 2015 at 12:39 PM, Michael Church <michael.o.church@gmail.com

wrote:

I'm on 7.8.3 but I think the problem might be that I wasn't running the project in a cabal sandbox. So I'm trying to fix that.

-Mike

On Fri, Apr 24, 2015 at 12:37 PM, Christopher Biscardi < notifications@github.com> wrote:

Thanks for reporting.

There were some updates to the digestive-functors-* packages within the last day or so. What version of ghc are you using?

— Reply to this email directly or view it on GitHub https://github.com/ChristopherBiscardi/snap-for-beginners/issues/2#issuecomment-96008803 .