MemoTrie icon indicating copy to clipboard operation
MemoTrie copied to clipboard

Unsupported extension: EmptyCase

Open cryptid11 opened this issue 9 years ago • 4 comments

cabal install Memotrie

Resolving dependencies... Configuring MemoTrie-0.6.4... Building MemoTrie-0.6.4... Preprocessing library MemoTrie-0.6.4...

src/Data/MemoTrie.hs:3:51: Unsupported extension: EmptyCase Failed to install MemoTrie-0.6.4 cabal: Error: some packages failed to install: MemoTrie-0.6.4 failed during the building phase. The exception was: ExitFailure 1

Seems it doesn't works with the standard haskell-platform on ubuntu, that install "The Glorious Glasgow Haskell Compilation System, version 7.6.3" now I'm going to install the last one 7.8.2 and hope it works...

Seems it create a mess since after few command I arrive here: https://www.fpcomplete.com/user/simonmichael/how-to-cabal-install#could-not-resolve-dependencies--cabal-hell

So sad they are not able to let you use a building envinroment, anyway I'd like the error output to be more specific, also, can you explain me why it doesn't works?

cryptid11 avatar Dec 04 '15 23:12 cryptid11

Oh, hm. Perhaps the EmptyCase language extension got added after 7.6.3. Sorry about that. It's easy to replace the \case line. For instance,

  untrie VoidTrie = \ _ -> error "untrie VoidTrie"
                    -- \case  -- needs EmptyCase

conal avatar Dec 05 '15 23:12 conal

@conal, see https://ghc.haskell.org/trac/ghc/wiki/LanguagePragmaHistory

I've edited in a base>=4.7 constraint to the two affected releases:

  • https://hackage.haskell.org/package/MemoTrie-0.6.3/revisions/
  • https://hackage.haskell.org/package/MemoTrie-0.6.4/revisions/

Here's the current overall situation:

  • http://matrix.hackage.haskell.org/package/MemoTrie

hvr avatar Jan 10 '16 18:01 hvr

@hvr Thanks for the pointers and patching the dependencies. The .cabal now contains

  if impl(ghc >= 7.10.0)
     Build-Depends: base >=4.8.0.0 && <5 
  else
     Build-Depends: base <4.8.0.0, void

For my next release, I gather that I'll want to change the .cabal file. Right? If so, could you suggest a replacement for these lines?

conal avatar Jan 15 '16 03:01 conal

@conal that depends on what you intend to support. Do you want to support only GHC >= 7.8 in future releases? Or do you want to add some compatibility workaround for GHC 7.6 and older?

hvr avatar Jan 15 '16 07:01 hvr