alanz / ghc-exactprint

GHC version of haskell-src-exts exactPrint
BSD 3-Clause "New" or "Revised" License
70 stars 32 forks source link

ghc-exactprint-0.1.0.0 doesn't compile with GHC 7.8.4 #1

Closed peti closed 9 years ago

peti commented 9 years ago

I get the following error:

Building ghc-exactprint-0.1.0.0...
Preprocessing library ghc-exactprint-0.1.0.0...
[1 of 3] Compiling Language.Haskell.GHC.ExactPrint.Types ( src/Language/Haskell/GHC/ExactPrint/Types.hs, dist/build/Language/Haskell/GHC/ExactPrint/Types.o )

src/Language/Haskell/GHC/ExactPrint/Types.hs:111:20:
    Not in scope: type constructor or class ‘GHC.AnnKeywordId’

src/Language/Haskell/GHC/ExactPrint/Types.hs:135:20:
    Not in scope: type constructor or class ‘GHC.DataId’
    Perhaps you meant ‘GHC.DataCon’ (imported from GHC)

A complete build log is at http://hydra.cryp.to/build/522473/nixlog/2/raw.

mpickering commented 9 years ago

Hi Peter,

Thanks for the report. The package only compiles with GHC 7.10 RC2.

peti commented 9 years ago

It might be a good idea to have the Cabal file reflect that?

alanz commented 9 years ago

Agree, will do so for next version, due out soon.

I only put it on hackage to try and get HaRe running against travis, but bumped into a cabal issue there, so will wait for RC2, due soon

alanz commented 9 years ago

Should the description in the cabal file reflect this, or can I enforce it in the build-tools or similar?

peti commented 9 years ago

I believe the best way to declare the dependency on GHC 7.10.x is to add the snippet

if impl (ghc < 7.10)
    buildable: false

to the library stanza.

alanz commented 9 years ago

If I set it to

library
  exposed-modules:     Language.Haskell.GHC.ExactPrint
                     , Language.Haskell.GHC.ExactPrint.Types
                     , Language.Haskell.GHC.ExactPrint.Utils
  -- other-modules:
  -- other-extensions:
  build-depends:       base >=4.7 && <4.9
                     , containers
                     , ghc
                     , ghc-paths
                     , syb
  hs-source-dirs:      src
  default-language:    Haskell2010
  if impl (ghc < 7.10)
      buildable: False

I can still cabal configure with GHC 7.8.4. What am I missing?

peti commented 9 years ago

Try cabal build. :smile:

alanz commented 9 years ago

blush.

Will push a new version soon.

On Wed, Jan 28, 2015 at 10:08 PM, Peter Simons notifications@github.com wrote:

Try cabal build. [image: :smile:]

— Reply to this email directly or view it on GitHub https://github.com/alanz/ghc-exactprint/issues/1#issuecomment-71906135.