gsdlab / clafer

Clafer is a lightweight modeling language
http://clafer.org
MIT License
45 stars 13 forks source link

Warning fixes #30

Closed Luke-Michael-Brown closed 11 years ago

Luke-Michael-Brown commented 11 years ago

Just a bunch of warning removals.This branch also includes the fix for i224

Also includes a fix to a bug where OPTIONS compiler directive was not working properly.

mantkiew commented 11 years ago

All tests pass and regressions with 0.3.2 are correct (see test/positive-0.3.2-vs-0.3.3.diff)

JLiangWaterloo commented 11 years ago

Good work! I have two comments.

  1. " <- mapM mapLineCol' n" is simply "mapM mapLineCol' n". The convention is that the underscore at the end of monadic functions throw away the result and possibly more efficient. For example, sequence, forM, and foldM_ are identical to sequence, forM and foldM except they throw away the result.
  2. I noticed you made changes to ErrM.hs, Lexclafer.hs, and Printclafer.hs. These files are automatically generated by the parser generator. All the changes you made will be overwritten whenever we make a single change to the parser. If you want your changes to persist, then the changes need to be in ErrM.diff, Lexclafer.diff, and Printclafer.diff. These are diff files that patch the automatically generated files whenever src/Language/Clafer/Front/Makefile is invoked.