summaryrefslogtreecommitdiff
path: root/compiler
Commit message (Collapse)AuthorAgeFilesLines
* Remove Show instance for ForestSimon Peyton Jones2012-03-281-6/+0
| | | | | | | | | A Forest is just a list, and we have a Show instance for lists already. We don't need a special Show instance for Forests. If we change our minds we can add a newtype, but I don't think it's worth it. Fixes Trac #5960
* Merge with HEADSimon Peyton Jones2012-03-271-14/+2
|\
| * Remove dead codeJose Pedro Magalhaes2012-03-271-12/+1
| | | | | | | | | | RdrHsSyn.extractGenericPatTyVars was a leftover from the old generic classes.
* | Merge branch 'master' of http://darcs.haskell.org//ghcSimon Peyton Jones2012-03-2654-132/+587
|\ \ | |/ | | | | | | | | Conflicts: compiler/hsSyn/Convert.lhs compiler/hsSyn/HsDecls.lhs
| * Merge remote-tracking branch 'origin/master' into type-natsIavor S. Diatchki2012-03-2416-1600/+1609
| |\
| * | Add -XExplicitNamespaces to enable using 'type' in import/exports.Iavor S. Diatchki2012-03-244-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | This extension is implied by: * TypeOperators: so that we can import/export things like (+) * TypeFamilies: because associated type synonyms use "type T" to name the associated type in a subordinate list.
| * | Fix printing of type operators in declarations.Iavor S. Diatchki2012-03-241-2/+2
| | |
| * | Fix pretty-printing of type operators in imports/exports.Iavor S. Diatchki2012-03-246-7/+30
| | | | | | | | | | | | | | | | | | When we see a type operator in an import or an export, we tag it with the keyword 'type' so that it is not confused with value level operators with the same name.
| * | Merge remote-tracking branch 'origin/master' into type-natsIavor S. Diatchki2012-03-204-64/+58
| |\ \
| * \ \ Merge remote-tracking branch 'origin/master' into type-natsIavor S. Diatchki2012-03-1919-124/+178
| |\ \ \
| * | | | Add type-literals in the ordering hierarchy.Iavor S. Diatchki2012-03-191-1/+8
| | | | |
| * | | | Only parse type literals when using `DataKinds`.Iavor S. Diatchki2012-03-183-2/+22
| | | | |
| * | | | Add an `Outputable` instance for `HsTyLit`Iavor S. Diatchki2012-03-181-0/+3
| | | | |
| * | | | Fix the printing of * (the kind).Iavor S. Diatchki2012-03-181-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Type and kinds use the same printing code, but the kind * is not an infix operator and so it should not be wrapped in parens. As is, 'parenSymOcc', can't get this right because it does not know if it is looking at *, the type, or *, the kind. This is why I added a special case in 'ppr_tc'.
| * | | | Add TH support for type-level literals.Iavor S. Diatchki2012-03-152-1/+6
| | | | |
| * | | | Merge remote-tracking branch 'origin/master' into type-natsIavor S. Diatchki2012-03-13144-6238/+6635
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: compiler/coreSyn/CoreLint.lhs compiler/deSugar/DsBinds.lhs compiler/hsSyn/HsTypes.lhs compiler/iface/IfaceType.lhs compiler/rename/RnHsSyn.lhs compiler/rename/RnTypes.lhs compiler/stgSyn/StgLint.lhs compiler/typecheck/TcHsType.lhs compiler/utils/ListSetOps.lhs
| * \ \ \ \ Merge remote-tracking branch 'origin/master' into type-natsIavor S. Diatchki2012-02-1245-1374/+1461
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: compiler/coreSyn/CoreLint.lhs
| * | | | | | Add support for type-level "strings".Iavor S. Diatchki2012-01-2423-104/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are types that look like "this" and "that". They are of kind `Symbol`, defined in module `GHC.TypeLits`. For each type-level symbol `X`, we have a singleton type, `TSymbol X`. The value of the singleton type can be named with the overloaded constant `tSymbol`. Here is an example: tSymbol :: TSymbol "Hello"
| * | | | | | Merge remote-tracking branch 'origin/master' into type-natsIavor S. Diatchki2012-01-2479-4527/+1488
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: compiler/typecheck/TcEvidence.lhs
| * \ \ \ \ \ \ Merge in more HEAD, fix stuff upSimon Peyton Jones2012-01-2378-1442/+1920
| |\ \ \ \ \ \ \
| * | | | | | | | Mainly, rename LiteralTy to LitTySimon Peyton Jones2012-01-1326-75/+72
| | | | | | | | |
| * | | | | | | | Change -XTypeOperators to treat all type-operators as type-constructors.Iavor S. Diatchki2012-01-083-17/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, only type operators starting with ":" were type constructors, and writing "+" in a type resulted in a type variable. Now, type variables are always ordinary identifiers, and all operators are treated as constructors. One can still write type variables in infix form though, for example, "a `fun` b" is a type expression with 3 type variables: "a", "fun", and "b". Writing (+) in an import/export list always refers to the value (+) and not the type. To refer to the type one can write either "type (+)", or provide an explicit suobrdinate list (e.g., "(+)()"). For clarity, one can also combine the two, for example "type (+)(A,B,C)" is also accepted and means the same thing as "(+)(A,B,C)" (i.e., export the type (+), with the constructors A,B,and C).
| * | | | | | | | Merge remote-tracking branch 'origin/master' into type-natsIavor S. Diatchki2012-01-0781-2439/+2503
| |\ \ \ \ \ \ \ \
| * | | | | | | | | Go back to using an Integer as evidence, rather then just a Word.Iavor S. Diatchki2012-01-072-11/+2
| | | | | | | | | |
| * | | | | | | | | Monadify dsEvTerm in preparation for generating Integer & String evidence.Iavor S. Diatchki2012-01-075-46/+58
| | | | | | | | | |
| * | | | | | | | | Add the built-in instances for class NatI.Iavor S. Diatchki2011-12-294-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note 1: For the moment, we provide instances only for numbers that fit in a Word. The reason is a quite mundane: to generate evidence for arbitrary integers we need to generate integer literals. In the core syntax this is a monadic operation but the function that generates the core for evidence is pure. It would not be hard to monadify it but requires changes to a bunch of other functions so I thought it is better left for a separate change. Note 2: The evidence that we generate for a NatI is just a word. Technically, we should be generate a word with two coercions: one to turn it into a NatS and another to turn that into a NatI. Operationally, these do not do anything, but it would be better to fix this. I didn't do it yet because I need to look up how to make these coercions.
| * | | | | | | | | Add the wired-in names for manipulating type-level nats.Iavor S. Diatchki2011-12-292-3/+35
| | | | | | | | | |
| * | | | | | | | | Merge branch 'master' into type-natsIavor S. Diatchki2011-12-2961-1072/+1249
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: compiler/typecheck/TcCanonical.lhs compiler/typecheck/TcSMonad.lhs
| * | | | | | | | | | Remove tabs, again.Iavor S. Diatchki2011-12-181-1/+1
| | | | | | | | | | |
| * | | | | | | | | | Fix the implementation of the type literal trie.Iavor S. Diatchki2011-12-181-4/+2
| | | | | | | | | | |
| * | | | | | | | | | Remove tabs, so that I can push.Iavor S. Diatchki2011-12-183-40/+19
| | | | | | | | | | |
| * | | | | | | | | | Merge branch 'master' into type-natsIavor S. Diatchki2011-12-183-15/+35
| |\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | Add some missing cases for type literals.Iavor S. Diatchki2011-12-182-1/+8
| | | | | | | | | | | |
| * | | | | | | | | | | Extend GHC's type with a representation for type level literals.Iavor S. Diatchki2011-12-1827-11/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we support only numeric literals but---hopefully---these modifications should make it fairly easy to add other ones, if necessary.
| * | | | | | | | | | | Add numeric types to the parsing part of the front end.Iavor S. Diatchki2011-12-186-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the moment, the kind of the numerical literals is the type "Word" lifted to the kind level. This should probably be changed in the future.
* | | | | | | | | | | | Make the 'extract' functions to find free type variablesSimon Peyton Jones2012-03-264-29/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of an HsType return RdrNames rather than (Located RdrNames). This means less clutter, and the individual locations are a bit arbitrary if a name occurs more than once.
* | | | | | | | | | | | Complete refactoring of HsDecls/HsTyDefnSimon Peyton Jones2012-03-262-8/+7
| | | | | | | | | | | |
* | | | | | | | | | | | Merge branch 'master' of http://darcs.haskell.org//ghcSimon Peyton Jones2012-03-2410-970/+1090
|\ \ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: compiler/main/HscStats.lhs
| * | | | | | | | | | | Rename optimisation flag for uniformity with existing flags.David Terei2012-03-231-1/+1
| | | | | | | | | | | |
| * | | | | | | | | | | Clean of PackageConfigDavid Terei2012-03-231-27/+23
| | | | | | | | | | | |
| * | | | | | | | | | | Cleaning of HscStatsDavid Terei2012-03-231-77/+56
| | | | | | | | | | | |
| * | | | | | | | | | | Tabs -> SpacesDavid Terei2012-03-231-71/+64
| | | | | | | | | | | |
| * | | | | | | | | | | Clean up GhcMake a littleDavid Terei2012-03-231-282/+266
| | | | | | | | | | | |
| * | | | | | | | | | | Tabs -> SpacesDavid Terei2012-03-231-463/+455
| | | | | | | | | | | |
| * | | | | | | | | | | Clean and comment AnnotationsDavid Terei2012-03-231-21/+27
| | | | | | | | | | | |
| * | | | | | | | | | | Tabs -> SpacesDavid Terei2012-03-231-9/+2
| | | | | | | | | | | |
| * | | | | | | | | | | Add -favoid-vectManuel M T Chakravarty2012-03-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Enables vectorisation avoidance (This commit only adds the flag, not the actual vectorisation avoidance transformation.)
| * | | | | | | | | | | PPC: Handle right shift of > 31 bits. Fix #5900.Erik de Castro Lopo2012-03-231-3/+11
| | | | | | | | | | | |
| * | | | | | | | | | | PPC ppr: tabs -> spaces.Erik de Castro Lopo2012-03-231-232/+225
| | | | | | | | | | | |
* | | | | | | | | | | | Refactor HsDecls.TyClDecl to extract the type HsTyDefn, which is theSimon Peyton Jones2012-03-2216-836/+807
|/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RHS of a data type or type synonym declaration. This can be shared between type declarations and type *instance* declarations.