gsdlab / clafer

Clafer is a lightweight modeling language
http://clafer.org
MIT License
45 stars 13 forks source link

Fresh install of 0.4.3 from Hackage fails #83

Closed alex-ball closed 8 years ago

alex-ball commented 8 years ago

Having installed cabal-install-1.22 and ghc-7.10.3, I set up a Cabal sandbox and followed the instructions for installing with cabal-install, namely:

cabal update
cabal install alex happy
cabal install clafer

Installation failed with the message:

src/Language/Clafer/Front/LexClafer.x:188:38:
    Not in scope: ‘ord’
    Perhaps you meant one of these:
      ‘or’ (imported from Prelude), ‘odd’ (imported from Prelude),
      ‘ord#’ (imported from GHC.Exts)
Failed to install clafer-0.4.3

Should this file explicitly import Data.Char (ord)?

mantkiew commented 8 years ago

Hi,That's always a problem with cabal - the builds are not reproducible after Hackage changes (new versions of packages, etc.). I am no longer using cabal for development. I highly recommend using stack for building.

stack unpack clafer-0.4.3
cd clafer-0.4.3
stack install alex happy
stack install

The stack.yaml specifies lts-3.19 and older alex/happy, which works well. Just checked that lts-3.22 also works well. The command stack install alex happy is needed so that you have the older versions installed. There were problems with the newer versions of alex/happy.

mantkiew commented 8 years ago

Just pushed a commit fixing building with GHC 7.10.3 to the branch develop.

I am waiting for the LTS to move to the latest aeson.