Skip to content

Instantly share code, notes, and snippets.

@JoelSjogren
Created November 4, 2018 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoelSjogren/422a12ec5029f15caa1d31c8247f95fb to your computer and use it in GitHub Desktop.
Save JoelSjogren/422a12ec5029f15caa1d31c8247f95fb to your computer and use it in GitHub Desktop.
haste error
$ cabal install haste-compiler
Resolving dependencies...
Configuring haste-compiler-0.4.4.4...
Building haste-compiler-0.4.4.4...
Failed to install haste-compiler-0.4.4.4
Build log ( /home/joel/.cabal/logs/haste-compiler-0.4.4.4.log ):
cabal: Entering directory '/tmp/cabal-tmp-15029/haste-compiler-0.4.4.4'
[1 of 1] Compiling Main ( /tmp/cabal-tmp-15029/haste-compiler-0.4.4.4/dist/setup/setup.hs, /tmp/cabal-tmp-15029/haste-compiler-0.4.4.4/dist/setup/Main.o )
Linking /tmp/cabal-tmp-15029/haste-compiler-0.4.4.4/dist/setup/setup ...
Configuring haste-compiler-0.4.4.4...
Building haste-compiler-0.4.4.4...
Preprocessing library haste-compiler-0.4.4.4...
libraries/haste-lib/src/Haste/Binary.hs:2:56: warning:
-XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
libraries/haste-lib/src/Haste/Prim.hs:2:46: warning:
-XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
libraries/haste-lib/src/Haste/Foreign.hs:2:47: warning:
-XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
[ 1 of 34] Compiling Paths_haste_compiler ( dist/build/autogen/Paths_haste_compiler.hs, dist/build/Paths_haste_compiler.o )
[ 2 of 34] Compiling Haste.Prim ( libraries/haste-lib/src/Haste/Prim.hs, dist/build/Haste/Prim.o )
[ 3 of 34] Compiling Haste.Parsing ( libraries/haste-lib/src/Haste/Parsing.hs, dist/build/Haste/Parsing.o )
libraries/haste-lib/src/Haste/Parsing.hs:26:10: error:
• No instance for (Alternative Parse)
arising from the superclasses of an instance declaration
• In the instance declaration for ‘MonadPlus Parse’
cabal: Leaving directory '/tmp/cabal-tmp-15029/haste-compiler-0.4.4.4'
cabal: Error: some packages failed to install:
haste-compiler-0.4.4.4 failed during the building phase. The exception was:
ExitFailure 1
@JoelSjogren
Copy link
Author

JoelSjogren commented Nov 4, 2018

$ cabal install haste-compiler --constraint haste-compiler==0.6.0.0
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: haste-compiler-0.6.0.0 (user goal)
next goal: bin-package-db (dependency of haste-compiler-0.6.0.0)
Dependency tree exhaustively searched.

@JoelSjogren
Copy link
Author

JoelSjogren commented Nov 4, 2018

2:13 PM <joel135> https://gist.github.com/JoelSjogren/422a12ec5029f15caa1d31c8247f95fb
closeJoelSjogren: haste error — 4 Nov 2018
2:14 PM <joel135> I have looked at the code and I don't understand how it could be wrong.
2:14 PM <cocreature> joel135: looks like your version of GHC is too new for haste
2:14 PM <MarcelineVQ> joel135: have you ran  cabal update?
2:15 PM <cocreature> Alternative wasn’t always a superclass of MonadPlus
2:15 PM <joel135> yes
2:15 PM <MarcelineVQ> that's a pretty old haste for it to default to, hmm
2:16 PM <MarcelineVQ> what ghc version do you have?
2:16 PM <joel135> 8.0.2
2:17 PM <dmwit> What happens if you cabal install haste-compiler --constraint haste-compiler==0.6.0.0 ?
2:19 PM <joel135> (added)
2:19 PM <joel135> Do I need to install "bin-package-db"?
2:20 PM <dmwit> Whoa, neat
2:20 PM <MarcelineVQ> dmwit: I think  cabal install haste-compiler-0.6.0.0  is valid syntax for the same
2:22 PM <dmwit> joel135: Seems bin-package-db is supposed to be something that ships with GHC. So to me it sounds like the bounds on base for both haste-compiler 0.4.4 and 0.6 are too lax (and should be excluding your compiler).
2:22 PM <dmwit> This is a bug that you should complain loudly about to the maintainer.
2:22 PM <dmwit> In the meantime, there's little you can do except try versions in between the two.
2:23 PM <dmwit> (Well, maybe having the bounds on bin-package-db are sufficient, and so it is not a bug in 0.6. But it still seems like a bug in 0.4.4 to me.)
2:23 PM <MarcelineVQ> bin-package-db appears to be for ghc 7.10.3
2:24 PM <dmwit> huh
2:24 PM <dmwit> Maybe haste-compiler is just out of date...
2:25 PM <MarcelineVQ> yes it seems to be
2:25 PM <joel135> It is strange nobody else has met this problem.```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment