haskell-suite / haskell-names

Haskell suite library for name resolution
52 stars 17 forks source link

hs-gen-iface: TypeOperators is not enabled #42

Closed ghost closed 10 years ago

ghost commented 10 years ago

On a clean setup with the patched Cabal

ζ: cabal --version           
cabal-install version 1.19.0
using version 1.19.0 of the Cabal library 
ζ: ghc-pkg list haskell-names
/var/lib/ghc/package.conf.d
/home/stijn/.ghc/x86_64-linux-7.6.3/package.conf.d
   haskell-names-0.3.1
ζ: hs-gen-iface --version    
haskell-names 0.2
Based on haskell-packages version 0.2.3.1

I'm trying to generate interfaces. It's failing for array because "TypeOperators is not enabled". To me, this sounds like a bug in or misuse of haskell-src-exts.

ζ: cabal install --haskell-suite -w hs-gen-iface array
Resolving dependencies...
Configuring array-0.4.0.1...
Building array-0.4.0.1...
Preprocessing library array-0.4.0.1...
Warning: Can't find file "MachDeps.h" in directories
    ./Data/Array
    .
    dist/build/autogen
    dist/build
    include
  Asked for by: ./Data/Array/Base.hs  at line 76 col 1
hs-gen-iface: ./Data/Array/Base.hs:256:37:
  TypeOperators is not enabled
Failed to install array-0.4.0.1
cabal: Error: some packages failed to install:
array-0.4.0.1 failed during the building phase. The exception was:
ExitFailure 1
UnkindPartition commented 10 years ago

It's a known bug of haskell-src-exts: haskell-suite/haskell-src-exts#18

We have an array fork suited for compiling with haskell-names: https://github.com/haskell-suite/array

Unfortunately, I don't remember whether we actually got it compiling, but it's a good place to start. And pull requests are welcome there :)

Oh, by the way, you no longer need the cabal fork — you can just build the Cabal's master branch, it includes our patch.