summaryrefslogtreecommitdiff
path: root/ghc/compiler/parser/id.c
Commit message (Collapse)AuthorAgeFilesLines
* [project @ 1999-06-01 16:40:41 by simonmar]simonmar1999-06-011-378/+0
| | | | | | | | | | | | | | | | | | | | | | | | | This commit replaces the old yacc parser with a Happy-generated one. Notes: - The generated .hs file is *big*. Best to use a recent version of Happy, and even better to add the -c flag to use unsafeCoerce# with ghc (versions 4.02+ please). - The lexer has grown all sorts of unsightly growths and should be put down as soon as possible. - Parse errors may result in strange diagnostics. I'm looking into this. - HsSyn now contains a few extra constructors due to the way patterns are parsed as expressions in the parser. - The layout rule is implemented according to the Haskell report. I found a couple of places in the libraries where we previously weren't adhering to this - in particular the rule about "nested contexts must be more indented than outer contexts". The rule is necessary to disambiguate in the presence of empty declaration lists.
* [project @ 1999-01-27 14:51:14 by simonpj]simonpj1999-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Finally! This commits the ongoing saga of Simon's hygiene sweep FUNCTIONALITY ~~~~~~~~~~~~~ a) The 'unused variable' warnings from the renamer work. b) Better error messages here and there, esp type checker c) Fixities for Haskell 98 (maybe I'd done that before) d) Lazy reporting of name clashes for Haskell 98 (ditto) HYGIENE ~~~~~~~ a) type OccName has its own module. OccNames are represented by a single FastString, not three as in the last round. This string is held in Z-encoded form; a decoding function decodes for printing in user error messages. There's a nice tight encoding for (,,,,,,,,,,,,,,,,,,,,,,,,,,,,,) b) type Module is a proper ADT, in module OccName c) type RdrName is a proper ADT, in its own module d) type Name has a new, somwhat tidier, representation e) much grunting in the renamer to get Provenances right. This makes error messages look better (no spurious qualifiers)
* [project @ 1999-01-14 17:58:41 by sof]sof1999-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Assorted minor Haskell 98 changes: * Maximal munch rule for "--" comments * _ as lower-case letter, "_" is a reserved id. Prefixing unused variable names in patterns with '_' causes the renamer not to report such names as being unused. * allow empty decls * comprehensions are now list comprehensions, not monadic. * use Monad.fail to signal pattern matching errors within do expressions. * remove record punning. * empty contexts are now legal (go wild!) * allow records with no fields * allow newtypes with a labelled field * default default is now (Integer, Double) * turn off defaulting mechanism for args & res to a _ccall_. * allow LHSs of the form (a -.- b) x = ... * Main.main can now have type (IO a) * nuked Void (and its use in the compiler sources.) * deriving machinery for Enum now also generate 'succ' and 'pred' method bindings.
* [project @ 1998-02-25 19:17:19 by sof]sof1998-02-251-8/+9
| | | | | Magic constant removal (id.h now has #defines for the `special-syntax' identifiers.)
* [project @ 1997-10-19 21:46:33 by sof]sof1997-10-191-0/+15
| | | | Added comment on special parser handling of non-qualified gtycons
* [project @ 1997-03-14 07:52:06 by simonpj]simonpj1997-03-141-1/+1
| | | | Major update to more-or-less 2.02
* [project @ 1997-01-17 00:32:23 by simonpj]simonpj1997-01-171-1/+1
| | | | Cross module worker-wrappers
* [project @ 1996-03-19 08:58:34 by partain]partain1996-03-191-0/+362
simonpj/sansom/partain/dnt 1.3 compiler stuff through 96/03/18