Using alex/happy with Cabal

后端 未结 2 1335
闹比i
闹比i 2021-02-19 11:31

I\'m writing a compiler for a class I\'m taking. The class isn\'t specifically Haskell but I\'m using Haskell to write my compiler and interpreter. I have a cabal package setup

相关标签:
2条回答
  • 2021-02-19 11:38

    For Warren Harris and others like him (and myself) that may come along later, other-modules needs to be set to a list of module names that (I guess?) are expected to be built by the tools listed in build-tools.

    So, in my case, the relevant sections of my .cabal file ended up looking like this:

    build-tools:         alex, happy
    other-modules:       Language.Heidi.Parser,
                         Language.Heidi.Lexer
    
    0 讨论(0)
  • 2021-02-19 11:52

    Apparently what I was missing was actually the Other-modules: field. Once this was added, cabal happily (pardon the pun) built my interpreter.

    0 讨论(0)
提交回复
热议问题