| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases, the layout of the LANGUAGE/OPTIONS_GHC lines has been
reorganized, while following the convention, to
- place `{-# LANGUAGE #-}` pragmas at the top of the source file, before
any `{-# OPTIONS_GHC #-}`-lines.
- Moreover, if the list of language extensions fit into a single
`{-# LANGUAGE ... -#}`-line (shorter than 80 characters), keep it on one
line. Otherwise split into `{-# LANGUAGE ... -#}`-lines for each
individual language extension. In both cases, try to keep the
enumeration alphabetically ordered.
(The latter layout is preferable as it's more diff-friendly)
While at it, this also replaces obsolete `{-# OPTIONS ... #-}` pragma
occurences by `{-# OPTIONS_GHC ... #-}` pragmas.
|
|
|
|
|
| |
The build system would've complained loudly about these inclusions if it
weren't for #8527.
|
| |
|
| |
|
|
|
|
|
| |
We were using the Typeable.hs macros, but for no good reason as
far as I can tell.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Added a pragma {-# VECTORISE var = exp #-} that prevents
the vectoriser from vectorising the definition of 'var'.
Instead it uses the binding '$v_var = exp' to vectorise
'var'. The vectoriser checks that the Core type of 'exp'
matches the vectorised Core type of 'var'. (It would be
quite complicated to perform that check in the type checker
as the vectorisation of a type needs the state of the VM
monad.)
- Added parts of a related VECTORISE SCALAR pragma
- Documented -ddump-vect
- Added -ddump-vt-trace
- Some clean up
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch embodies many, many changes to the contraint solver, which
make it simpler, more robust, and more beautiful. But it has taken
me ages to get right. The forcing issue was some obscure programs
involving recursive dictionaries, but these eventually led to a
massive refactoring sweep.
Main changes are:
* No more "frozen errors" in the monad. Instead "insoluble
constraints" are now part of the WantedConstraints type.
* The WantedConstraint type is a product of bags, instead of (as
before) a bag of sums. This eliminates a good deal of tagging and
untagging.
* This same WantedConstraints data type is used
- As the way that constraints are gathered
- As a field of an implication constraint
- As both argument and result of solveWanted
- As the argument to reportUnsolved
* We do not generate any evidence for Derived constraints. They are
purely there to allow "impovement" by unifying unification
variables.
* In consequence, nothing is ever *rewritten* by a Derived
constraint. This removes, by construction, all the horrible
potential recursive-dictionary loops that were making us tear our
hair out. No more isGoodRecEv search either. Hurrah!
* We add the superclass Derived constraints during canonicalisation,
after checking for duplicates. So fewer superclass constraints
are generated than before.
* Skolem tc-tyvars no longer carry SkolemInfo. Instead, the
SkolemInfo lives in the GivenLoc of the Implication, where it
can be tidied, zonked, and substituted nicely. This alone is
a major improvement.
* Tidying is improved, so that we tend to get t1, t2, t3, rather
than t1, t11, t111, etc
Moreover, unification variables are always printed with a digit
(thus a0, a1, etc), so that plain 'a' is available for a skolem
arising from a type signature etc. In this way,
(a) We quietly say which variables are unification variables,
for those who know and care
(b) Types tend to get printed as the user expects. If he writes
f :: a -> a
f = ...blah...
then types involving 'a' get printed with 'a', rather than
some tidied variant.
* There are significant improvements in error messages, notably
in the "Cannot deduce X from Y" messages.
|
|
|
|
|
|
|
|
|
| |
This major patch implements the new OutsideIn constraint solving
algorithm in the typecheker, following our JFP paper "Modular type
inference with local assumptions".
Done with major help from Dimitrios Vytiniotis and Brent Yorgey.
|
|
|
|
|
| |
The instances (and deriving declarations) have been taken from the ghc-syb
package.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Older GHCs can't parse OPTIONS_GHC.
This also changes the URL referenced for the -w options from
WorkingConventions#Warnings to CodingStyle#Warnings for the compiler
modules.
|
| |
|
|
|
|
| |
Push this further along, and fix build problems in the first patch.
|
| |
|
|
Most of the other users of the fptools build system have migrated to
Cabal, and with the move to darcs we can now flatten the source tree
without losing history, so here goes.
The main change is that the ghc/ subdir is gone, and most of what it
contained is now at the top level. The build system now makes no
pretense at being multi-project, it is just the GHC build system.
No doubt this will break many things, and there will be a period of
instability while we fix the dependencies. A straightforward build
should work, but I haven't yet fixed binary/source distributions.
Changes to the Building Guide will follow, too.
|