Steps to reproduce:
- BNFC file (
Prog.cf)
- Run
bnfc -m Prog.cf
- Run
make
Output: make.log
Other class names that causes the same error:
Inspection shows that this is because PrintProg.hs defines type Doc = [ShowS] -> [ShowS]. Other modules similarly define types, such as Err and ParseFun. Since the AbsProg.hs file is not imported with a qualified import, there is a namespace conflict.
Perhaps it would be sensible to either supply a list of reserved class names and report the use of them when generating the frontend files, or use qualified imports to avoid namespace conflicts.
Steps to reproduce:
Prog.cf)bnfc -m Prog.cfmakeOutput: make.log
Other class names that causes the same error:
ErrParseFunInspection shows that this is because
PrintProg.hsdefinestype Doc = [ShowS] -> [ShowS]. Other modules similarly define types, such asErrandParseFun. Since theAbsProg.hsfile is not imported with a qualified import, there is a namespace conflict.Perhaps it would be sensible to either supply a list of reserved class names and report the use of them when generating the frontend files, or use qualified imports to avoid namespace conflicts.