| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
RULES-NOTES
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make clear in HsType whether a for-all is explicit
in the source program or not. Implicit for-alls now
look like
HsForAllTy Nothing ctxt ty
while explicit ones look like
HsForAllTy (Just tvs) ctxt ty
Before this, the scope analysis stuff in RnSource was
actually wrong (not that anyone had noticed), but Alex Ferguson
did notice a bogus (sort-of-duplicate) error message on types
like
f :: Eq a => Int -> Int
which led me to spot the deeper problem. Anyway, it's all
cool now.
|
| |
|
|
| |
import list adjustments
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
| |
foreign decls: use wlkHsSigType, not wlkHsType, since the tysig may
have implicitly quantified tyvars.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Another big commit from Simon. Actually, the last one
didn't all go into the main trunk; because of a CVS glitch it
ended up in the wrong branch.
So this commit includes:
* Scoped type variables
* Warnings for unused variables should work now (they didn't before)
* Simplifier improvements:
- Much better treatment of strict arguments
- Better treatment of bottoming Ids
- No need for w/w split for fns that are merely strict
- Fewer iterations needed, I hope
* Less gratuitous renaming in interface files and abs C
* OccName is a separate module, and is an abstract data type
I think the whole Prelude and Exts libraries compile correctly.
Something isn't quite right about typechecking existentials though.
|
| |
|
|
| |
Move 4.01 onto the main trunk.
|
| |
|
|
| |
Cleaned up the handling of the default calling conventions for 'foreign' decls
|
| |
|
|
| |
Allow 'foreign import' calling conv. to be optional
|
| |
|
|
| |
First take at 'foreign label's
|
| |
|
|
| |
Reading in foreign decls
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add NOINLINE pragma.
- add new type of inline info: IDontWantToBeINLINEd
- hopefully get the interactions between IMustNotBeINLINEd (which is
used by the simplifier to ensure termination when simplifying
recursive binding groups) and IDontWantToBeINLINEd.
- no need to pass NOINLINE across modules, we just make sure that any
function marked as NOLINE doesn't get an unfolding in the interface.
|
| |
|
|
| |
Misc changes by Simon to emit and handle cross-module specialisations
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Great Multi-Parameter Type Classes Merge.
Notes from Simon (abridged):
* Multi-parameter type classes are fully implemented.
* Error messages from the type checker should be noticeably improved
* Warnings for unused bindings (-fwarn-unused-names)
* many other minor bug fixes.
Internally there are the following changes
* Removal of Haskell 1.2 compatibility.
* Dramatic clean-up of the PprStyle stuff.
* The type Type has been substantially changed.
* The dictionary for each class is represented by a new
data type for that purpose, rather than by a tuple.
|
| |
|
|
| |
fix to have it compile with 2.09 (and later)
|
| |
|
|
|
| |
Fix for special prelude names ((),[],-> etc) when compiling with
-fno-implicit-prelude.
|
| |
|
|
| |
add missing IFaceFlavour field.
|
| |
|
|
| |
fix for qualified Prelude / () bug
|
| |
|
|
| |
Remove deforester
|
| |
|
|
| |
Updated to reflect RecordCon change
|
| |
|
|
| |
Added reader handling of let expressions in pattern guards
|
| |
|
|
| |
Use readRational__ rather than readRational (it copes with leading -)
|
| | |
|
| |
|
|
| |
Recognise SOURCE pragma for imports
|
| |
|
|
| |
Updated to reflect move of PprStyle to Outputable
|
| |
|
|
| |
2.04 changes
|
| |
|
|
| |
Major update to more-or-less 2.02
|
| |
|
|
| |
More polishing by Simon; to get nofib to run!
|
| |
|
|
| |
Cross module worker-wrappers
|
| |
|
|
| |
SLPJ new renamer and lots more
|
| |
|
|
| |
partain changes to 960714
|
| |
|
|
| |
partain 1.3 changes through 960629
|
| |
|
|
| |
SLPJ 1.3 changes through 96/06/25
|
| |
|
|
| |
SLPJ changes to 960611
|
| |
|
|
| |
SLPJ changes through 960604
|
| |
|
|
| |
Sansom changes through 960515
|
| |
|
|
| |
SLPJ changes through 960515
|
| |
|
|
| |
SLPJ 1.3 changes through 960425
|
| |
|
|
| |
Sansom 1.3 changes to 960425
|
| |
|
|
| |
SLPJ 1.3 changes through 960419
|
| |
|
|
| |
Sansom 1.3 changes through 960407
|
| |
|
|
| |
Add SLPJ/WDP 1.3 changes through 960404
|
| |
|
|
| |
simonpj/sansom/partain/dnt 1.3 compiler stuff through 96/03/18
|
|
|
Initial revision
|