Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile errors #6

Closed
hvr opened this issue Mar 16, 2017 · 5 comments
Closed

Compile errors #6

hvr opened this issue Mar 16, 2017 · 5 comments

Comments

@hvr
Copy link

hvr commented Mar 16, 2017

On http://104.239.175.197:8080/package/eve there's currently compile failures for GHC 7.10 & GHC 7.8:

Configuring component lib from eve-0.1.6...
Preprocessing library eve-0.1.6...
[1 of 9] Compiling Eve.Internal.Events ( src/Eve/Internal/Events.hs, /tmp/matrix-worker/1489628429/dist-newstyle/build/x86_64-linux/ghc-7.10.3/eve-0.1.6/build/Eve/Internal/Events.o )
[2 of 9] Compiling Eve.Internal.States ( src/Eve/Internal/States.hs, /tmp/matrix-worker/1489628429/dist-newstyle/build/x86_64-linux/ghc-7.10.3/eve-0.1.6/build/Eve/Internal/States.o )

src/Eve/Internal/States.hs:85:18:
    Couldn't match type ‘(a -> f a) -> a0 -> f a0’
                   with ‘forall (f1 :: * -> *).
                         Functor f1 =>
                         (a -> f1 a) -> myState -> f1 myState’
    Expected type: Lens' myState a -> (a -> f a) -> s -> f s
      Actual type: ((a -> f a) -> a0 -> f a0) -> (a -> f a) -> s -> f s
    Relevant bindings include
      makeStateLens :: Lens' myState a -> Lens' s a
        (bound at src/Eve/Internal/States.hs:85:1)
    In the expression: (stateLens .)
    In an equation for ‘makeStateLens’: makeStateLens = (stateLens .)

And previous releases wouldn't build with GHC 7.8 because of

Configuring component lib from eve-0.1.2...
Preprocessing library eve-0.1.2...
[1 of 9] Compiling Eve.Internal.Events ( src/Eve/Internal/Events.hs, /tmp/matrix-worker/1489628453/dist-newstyle/build/x86_64-linux/ghc-7.8.4/eve-0.1.2/build/Eve/Internal/Events.o )
[2 of 9] Compiling Eve.Internal.States ( src/Eve/Internal/States.hs, /tmp/matrix-worker/1489628453/dist-newstyle/build/x86_64-linux/ghc-7.8.4/eve-0.1.2/build/Eve/Internal/States.o )
[3 of 9] Compiling Eve.Internal.Actions ( src/Eve/Internal/Actions.hs, /tmp/matrix-worker/1489628453/dist-newstyle/build/x86_64-linux/ghc-7.8.4/eve-0.1.2/build/Eve/Internal/Actions.o )

src/Eve/Internal/Actions.hs:32:22:
    Not in scope: type constructor or class ‘Applicative’

src/Eve/Internal/Actions.hs:38:24:
    Not in scope: type constructor or class ‘Applicative’
@ChrisPenner
Copy link
Owner

Thanks for pointing that out, I forget to check compatibility with GHC versions sometimes.

Do you know why the first one is failing? Is Lens somehow incompatible?

For the second case, do I need to import Applicative (which is redundant in recent version)?

@hvr
Copy link
Author

hvr commented Mar 16, 2017

Re first problem: I need to look closer at the first problem; could also be a difference in type-checking capabilities between 7.10 and 8.0

For the second case it depends on whether you want to support GHC 7.8; if you don't want to, just declare the lower bound base >= 4.8; if you do want to support it, you need to import Applicative (see https://ghc.haskell.org/trac/ghc/wiki/Migration/7.10#GHCsaysTheimportof...isredundant for a way to avoid the redundancy warning)

PS: Are you aware of https://github.com/hvr/multi-ghc-travis ?

@ChrisPenner
Copy link
Owner

ChrisPenner commented Mar 16, 2017

I wasn't aware of that repo, thanks for putting so much work into it! I use Circle-CI right now, but if you've got it set up so well on Travis I'm not opposed to making the switch (so long as I can figure out how to get stack working haha).

Do you have a recommendation for a good lower bound which I should be supporting? I'd like to be responsible about supporting local versions, but seeing as how eve is an application framework it won't ever be imported into legacy projects or anything.

Thanks for being patient with me on all of this, I'm pretty new to the Haskell Lib game, but I'm trying to figure it all out 😄

@hvr
Copy link
Author

hvr commented Mar 16, 2017

well, you don't have to give up circle-CI... just keep Circle-CI for testing w/ Stack, and simply enable/add Travis-CI for testing via Cabal (I can help you w/ the latter). As for lower/upper bounds: general rule of thumb I recommend is to set the bounds covering the major versions (as can be inferred by the PVP contract) of libraries that are covered by CI, as version bounds ought to declare which versions you as a developer expect your package to work with correctly (and so that the cabal solver doesn't pick configurations which are not expected to be compatible).

So, e.g. if you only want to support GHC 8.0.* for now, then just set base == 4.9.*.

@ChrisPenner
Copy link
Owner

Okay that sounds good; I think I'll set base == 4.9.* for now, if users request wider support I'll address it at that time. Thanks so much for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants