summaryrefslogtreecommitdiff
path: root/compiler
Commit message (Collapse)AuthorAgeFilesLines
...
* Do pretty-printing of TyThings via IfaceDecl (Trac #7730)Simon Peyton Jones2014-06-0311-686/+1000
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the initial work on this was done fy 'archblob' (fcsernik@gmail.com); thank you! I reviewed the patch, started some tidying, up and then ended up in a huge swamp of changes, not all of which I can remember now. But: * To suppress kind arguments when we have -fno-print-explicit-kinds, - IfaceTyConApp argument types are in a tagged list IfaceTcArgs * To allow overloaded types to be printed with =>, add IfaceDFunTy to IfaceType. * When printing data/type family instances for the user, I've made them print out an informative RHS, which is a new feature. Thus ghci> info T data family T a data instance T Int = T1 Int Int data instance T Bool = T2 * In implementation terms, pprIfaceDecl has just one "context" argument, of type IfaceSyn.ShowSub, which says - How to print the binders of the decl see note [Printing IfaceDecl binders] in IfaceSyn - Which sub-comoponents (eg constructors) to print * Moved FastStringEnv from RnEnv to OccName It all took a ridiculously long time to do. But it's done!
* Fix inverted gadt-syntax flag for data familiesSimon Peyton Jones2014-06-032-11/+11
|
* Use mkTcEqPred rather than mkEqPredSimon Peyton Jones2014-06-031-2/+2
| | | | This was mostly done in an earlier commit, but I missed these two
* Rename TypeRep.Prec to TypeRep.TyPrecSimon Peyton Jones2014-06-033-22/+23
|
* Improve Note [Order of Coercible Instances] about Trac #9117Simon Peyton Jones2014-05-301-7/+20
|
* Just formattingSimon Marlow2014-05-303-39/+64
|
* Remove deprecated -optdep optionsSimon Marlow2014-05-301-14/+0
|
* mkHiPath & mkObjPath didn't need to be in IOSimon Marlow2014-05-301-11/+9
|
* s/implict/implicit/iEdward Z. Yang2014-05-294-9/+9
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Fix comment typoJan Stolarek2014-05-281-1/+2
|
* No need to call defaultKind in mkTcEqPredSimon Peyton Jones2014-05-281-1/+1
|
* Use mkTcEqPred rather than mkEqPred in the type checkerSimon Peyton Jones2014-05-283-3/+3
| | | | | | | | Type.mkEqPred has an assertion warning for kind compatibility. But during type checking we may form equality predicates with incompatible kinds; hence TcType.mkTcEqPred, which does not check. We were calling the former instead of the latter in a couple of places, leading to spurious debug warnings.
* Assert that matcher-derived PatSyn types match the (redundant) stored types ↵Dr. ERDI Gergo2014-05-271-7/+12
| | | | in IfacePatSyn
* Store IfExtNames for PatSyn matchers and wrappers in interface file.Dr. ERDI Gergo2014-05-2711-210/+169
| | | | | | | This way, the Ids for the matchers/wrappers are reused by importing modules, and thus unfoldings are kept. Also updates haddock submodule to accomodate tweaks in PatSyn representation
* Fix yet another bug in 'deriving' for polykinded classes (Trac #7269)Simon Peyton Jones2014-05-262-34/+28
| | | | This patch makes the code a bit simpler if anything.
* Typos in commentsGabor Greif2014-05-232-2/+2
|
* White space onlySimon Peyton Jones2014-05-231-1/+1
|
* More debug info for failures in typeKind and kindFunResultSimon Peyton Jones2014-05-232-29/+41
|
* Better pretty-printing for ClsInstSimon Peyton Jones2014-05-232-9/+8
|
* Make the unifier a fixpoint even for the free kind vars of a tyvarSimon Peyton Jones2014-05-231-7/+39
| | | | | | | | | | The (pure) unifier tcUnifyTys returns an idempotent substitution. But previously the kinds of type variables free in the range of the subst could have un-substituted kind variables. This patch fixes that, fixing Trac #9106. See Note [Finding the substitution fixpoint] in Unify
* Simple eta reduction in call to adjustMatchResults, just a tidy-upSimon Peyton Jones2014-05-231-4/+2
|
* Tweaks to note; also fixed unicode quotesGabor Greif2014-05-201-4/+4
| | | | to regular ones.
* Coercible: Unwrap newtypes before coercing under tyconsJoachim Breitner2014-05-201-30/+46
| | | | This fixes parts of #9117.
* Refactoring around TyCon.isSynTyConSimon Peyton Jones2014-05-158-42/+45
| | | | | | | | | | * Document isSynTyCon better * Add isTypeSyonymTyCon for regular H98 type synonyms * Use isTypeSynonymTyCon rather than isSynTyCon where the former is really intended All arose as part of a bug I introduced when fixing Trac #9102, thinking that isSynTyCon meant H98 type syononyms.
* Add LANGUAGE pragmas to compiler/ source filesHerbert Valerio Riedel2014-05-15303-201/+583
| | | | | | | | | | | | | | | | | | 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.
* Avoid trivial cases of NondecreasingIndentationHerbert Valerio Riedel2014-05-153-8/+7
| | | | | | | This cleanup allows the following refactoring commit to avoid adding a few `{-# LANGUAGE NondecreasingIndentation #-}` pragmas. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Remove LANGUAGE pragrams implied by Haskell2010Herbert Valerio Riedel2014-05-141-1/+1
| | | | | | | | | Haskell2010 implies (at least) EmptyDataDecls, ForeignFunctionInterface, PatternGuards, DoAndIfThenElse, and RelaxedPolyRec. This is a follow-up to dd92e2179e3171a0630834b773c08d416101980d Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Set cabal files to default-language:Haskell2010Herbert Valerio Riedel2014-05-141-6/+4
| | | | | | | This is a first step towards eliminating `default-extensions` in favour of per-file declared `{-# LANGUAGE ... #-}` pragmas. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Wibble to 4cfc1faeSimon Peyton Jones2014-05-141-1/+1
| | | | | isSynTyCon is true of type *family* TyCons, which *are* allowed in TyConAppCo
* Fix invariant in mkAppCoFlexibleSimon Peyton Jones2014-05-131-1/+3
| | | | | mkAppCoFlexible was breaking the invariant that the head of a TyConAppCo cannot be a type synonym. This small patch fixes it.
* Lint should check that TyConAppCo doesn't have a synonym in the tycon positionSimon Peyton Jones2014-05-131-0/+3
| | | | That is why Lint didn't nail Trac #9102
* Typo in noteGabor Greif2014-05-131-1/+1
|
* Typo in commentGabor Greif2014-05-131-1/+1
|
* Improve desugaring of lazy pattern matchSimon Peyton Jones2014-05-122-14/+12
| | | | | This patch implements a simpler, and nicer, desugaring for lazy pattern matching, fixing Trac #9098
* In splitHsFunType, take account of prefix (->)Simon Peyton Jones2014-05-121-7/+24
| | | | This fixes Trac #9096
* Comments only, on inert_fsks and inert_no_eqsSimon Peyton Jones2014-05-123-9/+53
| | | | I wrote these when studying Trac #9090
* Better error message in vectoriserSimon Peyton Jones2014-05-081-1/+1
|
* Preserve evaluated-ness in CoreTidySimon Peyton Jones2014-05-081-45/+70
| | | | | | | | The main effect of this patch is to preserve the evaluated-ness of case binders and suchlike, to avoid spurious Lint complaints after tidying. See Note [Preserve evaluatedness] in CoreTidy. Plus a bit of associated refactoring of tidyIdBndr, tidyLetBndr.
* Mark evaluated arguments in dataConInstPatSimon Peyton Jones2014-05-081-8/+27
| | | | | | See Note [Mark evaluated arguments] in CoreUtils. This is not a significant change, but avoids a spurious Lint complaint.
* Refactor buildClass and mkDictSelId a bit, to avoid the no_unf argumentSimon Peyton Jones2014-05-086-46/+41
| | | | | No change in functionality, just a cleaner story, with the RHS for dictionary selectors being treated less specially than before.
* Improve tracing in SimplifierSimon Peyton Jones2014-05-081-17/+18
|
* Add a bit more typechecker tracingSimon Peyton Jones2014-05-061-2/+6
| | | | This is in pursuit of Trac #9063
* Fix Trac #9071, an egregious bug in TcDeriv.inferConstraintsSimon Peyton Jones2014-05-063-23/+25
| | | | | | The constraints for Functor don't line up 1-1 with the arguments (they are fetched out from sub-terms of the type), but the surrounding code was mistakenly assuming they were in 1-1 association.
* Second go at fixing #9061Simon Peyton Jones2014-05-061-22/+24
| | | | | My first attempt introduce a bug in -fprint-minimal-imports, but fortunately a regression test caught it.
* Modularise pretty-printing for forallsSimon Peyton Jones2014-05-064-19/+22
| | | | | | | | | See TypeRep.pprUserForAll. This just makes forall-printing a bit more consistent. In particular, I wasn't seeing the kind foralls when displaying a CoAxiom or CoAxBranch The output on T7939 is just possible a bit too verbose now, but even if so that's an error in the right direction.
* Improve comments and tracing in SpecConstrSimon Peyton Jones2014-05-051-22/+31
|
* Fix over-zealous unused-import warningSimon Peyton Jones2014-05-051-4/+20
| | | | | | See Note [Un-warnable import decls] in RnNames. Fixes Trac #9061.
* Revert "Per-thread allocation counters and limits"Simon Marlow2014-05-042-202/+75
| | | | | | | | Problems were found on 32-bit platforms, I'll commit again when I have a fix. This reverts the following commits: 54b31f744848da872c7c6366dea840748e01b5cf b0534f78a73f972e279eed4447a5687bd6a8308e
* Improve docs for array indexing primopsJohan Tibell2014-05-041-0/+10
|
* Remove external coreAustin Seipp2014-05-0317-1612/+31
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>