Commit Graph

9 Commits

Author SHA1 Message Date
Neil Brown
a5c02f36ec Removed the Metadata hack (where emptyMeta was "equal" to every other Meta data tag) 2007-11-10 14:14:18 +00:00
Neil Brown
cb17d62018 Changed findMeta so that it now works when directly applied to a Meta tag 2007-10-28 01:23:10 +00:00
Neil Brown
f0c552663b Added the initial implementation of a module (and tests) for generating a control-flow graph from an AST
This implementation needs to be changed; it currently uses Meta as a primary key for nodes, but that isn't valid.
2007-10-27 21:18:55 +00:00
Neil Brown
38c409d378 Added the -fwarn-unused-imports compiler option to warn about unused imports, and then set about pruning and ordering (mostly in my code) the import lists for all the modules 2007-09-27 13:13:46 +00:00
Neil Brown
c97d1d00c8 Changed the error type from String to ErrorReport throughout the code
ErrorReport is of type (Maybe Meta, String), thereby adding an optional code position to error messages.

Die has been changed so that die and dieP are now implemented in terms of dieReport (:: ErrorReport -> m a).  This involved changing less code than changing die to be of type ErrorReport -> m a.  All that had to be changed directly was that Die instances now implement dieReport instead of die.

Any bits of code that "caught" errors has been changed so that it handles ErrorReport instead of String.  This ErrorReport is eventually, in Main, passed to dieIO, which will soon be changed to read the file in and provide the context.  Accordingly, MonadIO m has been added as a constraint to dieIO, and dieInternal has been changed to no longer use dieIO (because really we can't add the MonadIO constraint to dieInternal).

Various error messages have been changed.  Notably, all instances of fail in ParseOccam have been changed to use die or, wherever possible, dieP.  A similar thing has been done in EvalConstants and EvalLiterals.
2007-09-18 10:17:38 +00:00
Neil Brown
1baecd7955 Moved findMeta into the Metadata module 2007-09-18 09:50:45 +00:00
Adam Sampson
a78fb8e917 Add functions to pack Metas as string prefixes.
These will be useful for passing source positions through Parsec's string error
mechanism.
2007-09-17 23:05:47 +00:00
Neil Brown
117173f758 Added the basics needed to generate XML from the AST using HaXml and DrIFT 2007-09-14 19:13:15 +00:00
Neil Brown
2ff46a9041 Rearranged the Rain source files, renamed a couple of Rain files, and changed the Makefile accordingly. 2007-09-10 17:28:57 +00:00