I'm writing a parser using Megaparsec. Basically, the main file will open and read content of a file and then parsing that content. When running the main file in ghci, everything was produced correctly img-1
But when I tried running the Main file using stack runghc -- app/Main.hs, the weird parsing error happened: img-2
Here is the project on GitHub: https://github.com/phuongduyphan/dbml-parser-haskell
Could sb have a look and tell me what am I doing wrong ? Why running the same main function results in different outputs from stack ghci and stack runghc ?