Closed chtenb closed 5 months ago
Sometimes the lexer definition file (Lexer.x) get's out of sync with the generated file (Lexer.hs), but the build system doesn't detect that it needs to regenerate. If you do a stack clean --full
or remove the .stack-work
directory it will recompile the project from scratch, which should fix this issue. Alternatively you might be able to just get away with deleting the Lexer.hs file in src/Syntax/Lexer.hs
, or making a trivial edit to the Lexer.x
file compile, kill the compilation after it detects there is a change and compiles Lexer.hs
, and then revert it and recompile.
Nevermind it looks like that file has moved locations since last time I worked with it. It is now generated into the build directory (on my system in .stack-work/dist/x86_64-osx/ghc-9.4.8/build/Syntax/Lexer.hs
). You probably still have an old Lexer.hs in the src/Syntax/Lexer.hs
location, and should just delete it.
Yep, it works now. Thanks for the response! I'll leave it up to you if you want to keep this issue open or close it.
I wanted to compile and try the
dev
branch containing several fixes I'm interested in, but I get compile errors.Am I doing something wrong? According to the docs this should be enough to build the compiler.