1
我想用ghc 7.10.2和alex 3.1.4編譯lex.x,但是它給出了下面的錯誤。 我檢查了Lex.hs,確實沒有'Alex'的應用實例。Alex wrappers.hs沒有應用的實例
注:此錯誤開始來後,我從包裝「單子」搬到「單子-字節字符串」
templates/wrappers.hs:287:10:
No instance for (Applicative Alex)
arising from the superclasses of an instance declaration
In the instance declaration for ‘Monad Alex’
我看到,在亞歷克斯3.1.4本固定http://hackage.haskell.org/package/alex
Changes in 3.1.4:
Add Applicative/Functor instances for GHC 7.10
下面的提交介紹了應用實例,但它不存在於我生成的Lex.h中。我可以手動使用下面的包裝來生成Lex.hs嗎?
https://github.com/simonmar/alex/commit/b1472bfbb7b95bcd6c66558197e2603997d9ce0b
這看起來像用cabal/stack構建alex的問題。如果我從最新的github源碼構建alex,那麼它的包裝看起來很好。在此處打開此問題以跟蹤https://github.com/simonmar/alex/issues/73。 – dfordivam