Conversation
andreasabel
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
I tried make ALEX=alex all in the examples directory but it does not build (nor run) your new examples.
One simple fix would be to move your examples out of wyvern/ and prefix these files with wyvern- instead.
examples/Makefile
Outdated
| @@ -1,4 +1,4 @@ | |||
| ALEX=../dist/build/alex/alex | |||
| ALEX=../dist-newstyle/build/x86_64-linux/ghc-9.8.4/alex-3.5.4.0/x/alex/build/alex/alex | |||
There was a problem hiding this comment.
This does not seem very portable nor future proof.
The old setting isn't great either, but at least it works with cabal v1-build independent of the GHC version and OS.
Maybe it is best to port the logic from /tests/Makefile.
|
Thank you for reviewing @andreasabel. I applied your feedback and managed to avoid rearranging wyvern files so they are still nicely compartmentalized. Please let me know if you think there's something missing. |
andreasabel
left a comment
There was a problem hiding this comment.
Thanks!
I can run these examples now as described in the readme, once I built them with cabal exec -- make.
First of all, thank you for your fantastic work on alex. I keep coming back to this repository.
I recently found myself needing more information from lexing errors, specifically error position in the input. I've been using the
basicwrapper, then switched toposnand finally landed onmonad. I had a difficult time putting together the full picture of an alex file implementing themonadwrapper and once I finally got it done, I thought my files could help somebody.Additionally, I made two small improvements/fixes so the examples compile with ghc 9.8.4:
import Data.Char (ord)required by examples:haskell.xtiger.xALEX=../dist-newstyle/build/x86_64-linux/ghc-9.8.4/alex-3.5.4.0/x/alex/build/alex/alex