summaryrefslogtreecommitdiff
path: root/compiler/main/PprTyThing.hs
Commit message (Collapse)AuthorAgeFilesLines
...
* This BIG PATCH contains most of the work for the New Coercion RepresentationSimon Peyton Jones2011-04-191-19/+20
| | | | | | | | | | | | | | See the paper "Practical aspects of evidence based compilation in System FC" * Coercion becomes a data type, distinct from Type * Coercions become value-level things, rather than type-level things, (although the value is zero bits wide, like the State token) A consequence is that a coerion abstraction increases the arity by 1 (just like a dictionary abstraction) * There is a new constructor in CoreExpr, namely Coercion, to inject coercions into terms
* Super-monster patch implementing the new typechecker -- at lastsimonpj@microsoft.com2010-09-131-4/+4
| | | | | | | | | 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.
* Refactor pretty printing of TyThings to fix Trac #4015simonpj@microsoft.com2010-05-251-72/+73
|
* Improve printing of TyThings; fixes Trac #4087simonpj@microsoft.com2010-05-251-14/+8
|
* Fix Trac #3966: warn about useless UNPACK pragmassimonpj@microsoft.com2010-05-061-6/+2
| | | | | | | | | | | | Warning about useless UNPACK pragmas wasn't as easy as I thought. I did quite a bit of refactoring, which improved the code by refining the types somewhat. In particular notice that in DataCon, we have dcStrictMarks :: [HsBang] dcRepStrictness :: [StrictnessMarks] The former relates to the *source-code* annotation, the latter to GHC's representation choice.
* Remove unused importsIan Lynagh2009-07-071-1/+0
|
* Fix the bug part of Trac #1930simonpj@microsoft.com2008-08-041-2/+2
|
* (F)SLIT -> (f)sLit in PprTyThingIan Lynagh2008-04-121-14/+12
|
* Don't import FastString in HsVersions.hIan Lynagh2008-03-291-0/+1
| | | | Modules that need it import it themselves instead.
* Make use of the SDoc type synonymIan Lynagh2008-03-261-16/+13
|
* Fix warnings in main/PprTyThingIan Lynagh2008-03-251-17/+27
|
* Fix Trac #2138: print the 'stupid theta' of a data typesimonpj@microsoft.com2008-03-061-2/+6
|
* Fix Trac #2082simonpj@microsoft.com2008-02-191-1/+1
|
* Move OPTIONS pragmas above commentsIan Lynagh2007-09-211-7/+7
| | | | Fixes building with -Werror (i.e. validate) and GHC < 6.6
* Define and use PprTyThing.pprTypeForUsersimonpj@microsoft.com2007-09-111-19/+44
| | | | | | | | | | | | | | | | | | | | | | When printing types for the user, the interactive UI often wants to leave foralls implicit. But then (as Claus points out) we need to be careful about name capture. For example with this source program class C a b where op :: forall a. a -> b we were erroneously displaying the class in GHCi (with suppressed foralls) thus: class C a b where op :: a -> b which is utterly wrong. This patch fixes the problem, removes GHC.dropForAlls (which is dangerous), and instead supplies PprTyThing.pprTypeForUser, which does the right thing.
* FIX #903: mkWWcpr: not a productSimon Marlow2007-09-101-4/+5
| | | | | | | | | | | | | | | This fixes the long-standing bug that prevents some code with mutally-recursive modules from being compiled with --make and -O, including GHC itself. See the comments for details. There are some additional cleanups that were forced/enabled by this patch: I removed importedSrcLoc/importedSrcSpan: it wasn't adding any useful information, since a Name already contains its defining Module. In fact when re-typechecking an interface file we were wrongly replacing the interesting SrcSpans in the Names with boring importedSrcSpans, which meant that location information could degrade after reloading modules. Also, recreating all these Names was a waste of space/time.
* Fix CodingStyle#Warnings URLsIan Lynagh2007-09-041-1/+1
|
* Use OPTIONS rather than OPTIONS_GHC for pragmasIan Lynagh2007-09-031-2/+2
| | | | | | | 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.
* Add {-# OPTIONS_GHC -w #-} and some blurb to all compiler modulesIan Lynagh2007-09-011-0/+7
|
* Add -fprint-explicit-foralls flag; fixes trac #1474Ian Lynagh2007-07-091-55/+61
|
* Print infix type constructors in an infix waysimonpj@microsoft.com2007-06-251-1/+1
| | | | | | | | | | | | | | | | Fixes Trac #1425. The printer for types doesn't know about fixities. (It could be educated to know, but it doesn't at the moment.) So it treats all infix tycons as of precedence less than application and function arrrow. I took a slight shortcut and reused function-arrow prededence, so I think you may get T -> T :% T meaning T -> (T :% T) If that becomes a problem we can fix it.
* Store a SrcSpan instead of a SrcLoc inside a NameSimon Marlow2007-05-111-4/+4
| | | | This has been a long-standing ToDo.
* Fixes to datacon wrappers for indexed data typessimonpj@microsoft.com2007-04-221-11/+13
| | | | | | | | | | | | | | | | | nominolo@gmail.com pointed out (Trac #1204) that indexed data types aren't quite right. I investigated and found that the wrapper functions for indexed data types, generated in MkId, are really very confusing. In particular, we'd like these combinations to work newtype + indexed data type GADT + indexted data type The wrapper situation gets a bit complicated! I did a bit of refactoring, and improved matters, I think. I am not certain that I have gotten it right yet, but I think it's better. I'm committing it now becuase it's been on my non-backed-up laptop for a month and I want to get it into the repo. I don't think I've broken anything, but I don't regard it as 'done'.
* Add the function TypeRep.pprTypeApp, and use itsimonpj@microsoft.com2007-01-111-1/+1
| | | | | pprTypeApp :: SDoc -> [Type] -> SDoc pprTypeApp pp tys = hang pp 2 (sep (map pprParendType tys))
* Fix ":i Maybe", noticed by Claus ReinkeIan Lynagh2006-11-211-4/+3
| | | | It looks like this was just commented out while FC was being developed.
* Extended TyCon and friends to represent family declarationsManuel M T Chakravarty2006-09-201-3/+11
| | | | | | | Mon Sep 18 18:50:35 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Extended TyCon and friends to represent family declarations Tue Aug 15 16:52:31 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Extended TyCon and friends to represent family declarations
* Massive patch for the first months work adding System FC to GHC #24Manuel M T Chakravarty2006-08-041-2/+7
| | | | | | | | Broken up massive patch -=chak Original log message: This is (sadly) all done in one patch to avoid Darcs bugs. It's not complete work... more FC stuff to come. A compiler using just this patch will fail dismally.
* Reorganisation of the source treeSimon Marlow2006-04-071-0/+223
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.