1. 03 Aug, 2007 1 commit
  2. 02 Jul, 2007 1 commit
  3. 02 May, 2007 2 commits
  4. 25 Apr, 2007 1 commit
  5. 24 Apr, 2007 1 commit
  6. 02 Apr, 2007 1 commit
    • simonpj@microsoft.com's avatar
      Make type-tidying work for coercion variables · f2b02ce8
      simonpj@microsoft.com authored
      When tidying a TyVar binder, we must tidy its kind if it's a coercion
      variable!  I had forgotten to do this, which is a serious bug.  As a
      result some more complicated programs were getting a Lint error when
      reading in interface files.  Score one for Core Lint!
      
      f2b02ce8
  7. 11 Jan, 2007 1 commit
  8. 04 Jan, 2007 1 commit
    • chak@cse.unsw.edu.au.'s avatar
      Fix and improve deriving for indexed data types · 3548802d
      chak@cse.unsw.edu.au. authored
      - The test for being able to derive the requested classes needs to be made
        with the representation tycon (not the family tycon).
      - Standalone deriving for indexed types requires the instance types in the
        derive clause to match a data/newtype instance exactly (modulo alpha).
      3548802d
  9. 02 Jan, 2007 1 commit
    • simonpj@microsoft.com's avatar
      Big tidy-up of deriving code · 84923cc7
      simonpj@microsoft.com authored
      This tidy-up, triggered by Trac #1068, re-factors the way that 'deriving' 
      happens.  It took me way longer than I had intended.  The main changes,
      by far are to TcDeriv; everyting else is a minor consequence.
      
      While I was at it, I changed the syntax for standalone deriving, so that
      it goes
      	derive instance Show (T a)
      
      (instead of "derive Show for T").  However, there's still an implicit
      context, generated by the deriving code, and I wonder if it shouldn't really
      be
      	derive instance (..) => Show (T a)
      but I have left it simple for now.
      
      I also added a function Type.substTyVars, and used it here and there, which
      led to some one-line changes otherwise unrelated (sorry).
      
      Loose ends:
        * 'deriving Typeable' for indexed data types is still not right
        * standalone deriving should be documented
      84923cc7
  10. 18 Dec, 2006 1 commit
    • chak@cse.unsw.edu.au.'s avatar
      Deriving for indexed data types · 380512de
      chak@cse.unsw.edu.au. authored
      - This patch implements deriving clauses for data instance declarations
        (toplevel and associated)
      - Doesn't support standalone deriving.  This could be easily supported,
        but requires an extension of the syntax of standalone deriving clauses.
        Björn, fancy adding this?
      - We cannot derive Typeable.  This seems a problem of notation, more than 
        anything else.  Why?  For a binary vanilla data type "T a b", we would 
        generate an instance Typeable2 T; ie, the instance is for the constructor
        alone.  In the case of a family instance, such as (S [a] (Maybe b)), we
        simply have no means to denote the associated constuctor.  It appears to
        require type level lambda - something like (/\a b. S [a] (Maybe b).
      - Derivings are for *individual* family *instances*, not for entire families.
        Currently, I know of no simple translation of class instances for entire 
        families to System F_C.  This actually seems to be similar to implementing
        open data types à la Löh & Hinze.
      - This patch only covers data types, not newtypes.
      380512de
  11. 10 Dec, 2006 1 commit
    • mnislaih's avatar
      Closure inspection in GHCi · 121da25a
      mnislaih authored
      The :print, :sprint and :force commands for GHCi.
      This set of commands allows inspection of heap structures of the bindings in the interactive environment.
      This is useful to observe lazyness and specially to inspect things with undespecified polymorphic types, as happens often in breakpoints.
      121da25a
  12. 10 Nov, 2006 1 commit
  13. 06 Nov, 2006 1 commit
    • simonpj@microsoft.com's avatar
      Tidy up substitutions · 94b170a0
      simonpj@microsoft.com authored
      The new simplifer stuff exposed the fact that the invariants on the
      TvSubstEnv and IdSubstEnv were insufficiently explicit.  (Resulted in
      a bug found by Sam Brosnon.)
      
      This patch fixes the bug, and tries to document the invariants pretty
      thoroughly. See 
      	Note [Extending the TvSubst] in Type
      	Note [Extenting the Subst]   in CoreSubst
      
      (Most of the new lines are comments.)
      94b170a0
  14. 01 Nov, 2006 1 commit
  15. 13 Oct, 2006 1 commit
    • simonpj@microsoft.com's avatar
      Add assertion checks for mkCoVar/mkTyVar · ac704fca
      simonpj@microsoft.com authored
      A type variable has a flag saying whether it is a *type* variable or
      a *coercion* variable.  This patch adds assertions to check the flag.
      
      And it adds fixes to places which were Wrong (and hence fired the
      assertion)! 
      
      Also removed isCoVar from Coercion, since it's done by Var.isCoVar.
      
      
      ac704fca
  16. 11 Oct, 2006 1 commit
  17. 06 Oct, 2006 1 commit
  18. 23 Sep, 2006 3 commits
  19. 20 Sep, 2006 9 commits
    • chak@cse.unsw.edu.au.'s avatar
      Indexed newtypes · 27897431
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 19:24:27 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Indexed newtypes
        Thu Aug 31 22:09:21 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Indexed newtypes
          - This patch makes indexed newtypes work
          - Only lightly tested
          - We need to distinguish between open and closed newtypes in a number of 
            places, because looking through newtypes doesn't work easily for open ones.
      27897431
    • chak@cse.unsw.edu.au.'s avatar
      Check category of type instances and some newtype family fixes · d5c4754d
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 19:23:39 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Check category of type instances and some newtype family fixes
        Thu Aug 31 16:54:14 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Check category of type instances and some newtype family fixes
      d5c4754d
    • chak@cse.unsw.edu.au.'s avatar
      Extended TyCon and friends to represent family declarations · e8a591c1
      chak@cse.unsw.edu.au. authored
      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
      e8a591c1
    • chak@cse.unsw.edu.au.'s avatar
      Fix GADT refinement fix-pointing, add ASSERTs and a WARN, make type equality... · 67ee8a93
      chak@cse.unsw.edu.au. authored
      Fix GADT refinement fix-pointing, add ASSERTs and a WARN, make type equality functions work for PredTy Eqtype ...
      Mon Sep 18 17:07:38 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Fix GADT refinement fix-pointing, add ASSERTs and a WARN, make type equality functions work for PredTy Eqtype ...
        Sun Aug  6 20:28:50 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Fix GADT refinement fix-pointing, add ASSERTs and a WARN, make type equality functions work for PredTy Eqtype ...
          Tue Aug  1 06:14:43 EDT 2006  kevind@bu.edu
      67ee8a93
    • chak@cse.unsw.edu.au.'s avatar
      fix bugs, add boolean flag to identify coercion variables · 0b86bc9b
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 16:41:32 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * fix bugs, add boolean flag to identify coercion variables
        Sun Aug  6 17:04:02 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * fix bugs, add boolean flag to identify coercion variables
          Tue Jul 25 06:20:05 EDT 2006  kevind@bu.edu
      0b86bc9b
    • chak@cse.unsw.edu.au.'s avatar
      fix some coercion kind representation things, extend exprIsConApp_maybe to non-vanilla · 6fcf9006
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 14:51:33 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * fix some coercion kind representation things, extend exprIsConApp_maybe to non-vanilla
        Sat Aug  5 21:48:21 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * fix some coercion kind representation things, extend exprIsConApp_maybe to non-vanilla
          Wed Jul 19 08:06:28 EDT 2006  kevind@bu.edu
      6fcf9006
    • chak@cse.unsw.edu.au.'s avatar
      towards unboxing through newtypes · a4c34367
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 14:44:50 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * towards unboxing through newtypes
        Sat Aug  5 21:42:05 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * towards unboxing through newtypes
          Fri Jul 14 12:02:32 EDT 2006  kevind@bu.edu
      a4c34367
    • chak@cse.unsw.edu.au.'s avatar
      Complete the evidence generation for GADTs · 15cb792d
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 14:43:22 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Complete the evidence generation for GADTs
        Sat Aug  5 21:39:51 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Complete the evidence generation for GADTs
          Thu Jul 13 17:18:07 EDT 2006  simonpj@microsoft.com
            
            This patch completes FC evidence generation for GADTs.
            
            It doesn't work properly yet, because part of the compiler thinks
            	(t1 :=: t2) => t3
            is represented with FunTy/PredTy, while the rest thinks it's represented
            using ForAllTy.  Once that's done things should start to work.
      15cb792d
    • chak@cse.unsw.edu.au.'s avatar
      newtype fixes, coercions for non-recursive newtypes now optional · c94408e5
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 14:24:27 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * newtype fixes, coercions for non-recursive newtypes now optional
        Sat Aug  5 21:19:58 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * newtype fixes, coercions for non-recursive newtypes now optional
          Fri Jul  7 06:11:48 EDT 2006  kevind@bu.edu
      c94408e5
  20. 04 Aug, 2006 1 commit
  21. 18 Aug, 2006 1 commit
  22. 07 Apr, 2006 1 commit
    • Simon Marlow's avatar
      Reorganisation of the source tree · 0065d5ab
      Simon Marlow authored
      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.
      0065d5ab
  23. 25 Jan, 2006 1 commit
    • simonpj@microsoft.com's avatar
      Simon's big boxy-type commit · ac10f840
      simonpj@microsoft.com authored
      This very large commit adds impredicativity to GHC, plus
      numerous other small things.
        
      *** WARNING: I have compiled all the libraries, and
      ***	     a stage-2 compiler, and everything seems
      ***	     fine.  But don't grab this patch if you 
      ***	     can't tolerate a hiccup if something is
      ***	     broken.
        
      The big picture is this:
      
      a) GHC handles impredicative polymorphism, as described in the
         "Boxy types: type inference for higher-rank types and
         impredicativity" paper
      
      b) GHC handles GADTs in the new simplified (and very sligtly less
         epxrssive) way described in the
         "Simple unification-based type inference for GADTs" paper
      
        
      But there are lots of smaller changes, and since it was pre-Darcs
      they are not individually recorded.
        
      Some things to watch out for:
        
      c)   The story on lexically-scoped type variables has changed, as per
           my email.  I append the story below for completeness, but I 
           am still not happy with it, and it may change again.  In particular,
           the new story does not allow a pattern-bound scoped type variable
           to be wobbly, so (\(x::[a]) -> ...) is usually rejected.  This is
           more restrictive than before, and we might loosen up again.
        
      d)   A consequence of adding impredicativity is that GHC is a bit less
           gung ho about converting automatically between
        	(ty1 -> forall a. ty2)    and    (forall a. ty1 -> ty2)
           In particular, you may need to eta-expand some functions to make
           typechecking work again.
         
           Furthermore, functions are now invariant in their argument types,
           rather than being contravariant.  Again, the main consequence is
           that you may occasionally need to eta-expand function arguments when
           using higher-rank polymorphism.
        
      
      Please test, and let me know of any hiccups
      
      
      Scoped type variables in GHC
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      	January 2006
      
      0) Terminology.
         
         A *pattern binding* is of the form
      	pat = rhs
      
         A *function binding* is of the form
      	f pat1 .. patn = rhs
      
         A binding of the formm
      	var = rhs
         is treated as a (degenerate) *function binding*.
      
      
         A *declaration type signature* is a separate type signature for a
         let-bound or where-bound variable:
      	f :: Int -> Int
      
         A *pattern type signature* is a signature in a pattern: 
      	\(x::a) -> x
      	f (x::a) = x
      
         A *result type signature* is a signature on the result of a
         function definition:
      	f :: forall a. [a] -> a
      	head (x:xs) :: a = x
      
         The form
      	x :: a = rhs
         is treated as a (degnerate) function binding with a result
         type signature, not as a pattern binding.
      
      1) The main invariants:
      
           A) A lexically-scoped type variable always names a (rigid)
       	type variable (not an arbitrary type).  THIS IS A CHANGE.
              Previously, a scoped type variable named an arbitrary *type*.
      
           B) A type signature always describes a rigid type (since
      	its free (scoped) type variables name rigid type variables).
      	This is also a change, a consequence of (A).
      
           C) Distinct lexically-scoped type variables name distinct
      	rigid type variables.  This choice is open; 
      
      2) Scoping
      
      2(a) If a declaration type signature has an explicit forall, those type
         variables are brought into scope in the right hand side of the 
         corresponding binding (plus, for function bindings, the patterns on
         the LHS).  
      	f :: forall a. a -> [a]
      	f (x::a) = [x :: a, x]
         Both occurences of 'a' in the second line are bound by 
         the 'forall a' in the first line
      
         A declaration type signature *without* an explicit top-level forall
         is implicitly quantified over all the type variables that are
         mentioned in the type but not already in scope.  GHC's current
         rule is that this implicit quantification does *not* bring into scope
         any new scoped type variables.
      	f :: a -> a
      	f x = ...('a' is not in scope here)...
         This gives compatibility with Haskell 98
      
      2(b) A pattern type signature implicitly brings into scope any type
         variables mentioned in the type that are not already into scope.
         These are called *pattern-bound type variables*.
      	g :: a -> a -> [a]
      	g (x::a) (y::a) = [y :: a, x]
         The pattern type signature (x::a) brings 'a' into scope.
         The 'a' in the pattern (y::a) is bound, as is the occurrence on 
         the RHS.  
      
         A pattern type siganture is the only way you can bring existentials 
         into scope.
      	data T where
      	  MkT :: forall a. a -> (a->Int) -> T
      
      	f x = case x of
      		MkT (x::a) f -> f (x::a)
      
      2a) QUESTION
      	class C a where
      	  op :: forall b. b->a->a
      
      	instance C (T p q) where
      	  op = <rhs>
          Clearly p,q are in scope in <rhs>, but is 'b'?  Not at the moment.
          Nor can you add a type signature for op in the instance decl.
          You'd have to say this:
      	instance C (T p q) where
      	  op = let op' :: forall b. ...
      	           op' = <rhs>
      	       in op'
      
      3) A pattern-bound type variable is allowed only if the pattern's
         expected type is rigid.  Otherwise we don't know exactly *which*
         skolem the scoped type variable should be bound to, and that means
         we can't do GADT refinement.  This is invariant (A), and it is a 
         big change from the current situation.
      
      	f (x::a) = x	-- NO; pattern type is wobbly
      	
      	g1 :: b -> b
      	g1 (x::b) = x	-- YES, because the pattern type is rigid
      
      	g2 :: b -> b
      	g2 (x::c) = x	-- YES, same reason
      
      	h :: forall b. b -> b
      	h (x::b) = x	-- YES, but the inner b is bound
      
      	k :: forall b. b -> b
      	k (x::c) = x	-- NO, it can't be both b and c
      
      3a) You cannot give different names for the same type variable in the same scope
          (Invariant (C)):
      
      	f1 :: p -> p -> p		-- NO; because 'a' and 'b' would be
      	f1 (x::a) (y::b) = (x::a)	--     bound to the same type variable
      
      	f2 :: p -> p -> p		-- OK; 'a' is bound to the type variable
      	f2 (x::a) (y::a) = (x::a)	--     over which f2 is quantified
      					-- NB: 'p' is not lexically scoped
      
      	f3 :: forall p. p -> p -> p	-- NO: 'p' is now scoped, and is bound to
      	f3 (x::a) (y::a) = (x::a)	--     to the same type varialble as 'a'
      
      	f4 :: forall p. p -> p -> p	-- OK: 'p' is now scoped, and its occurences
      	f4 (x::p) (y::p) = (x::p)	--     in the patterns are bound by the forall
      
      
      3b) You can give a different name to the same type variable in different
          disjoint scopes, just as you can (if you want) give diferent names to 
          the same value parameter
      
      	g :: a -> Bool -> Maybe a
      	g (x::p) True  = Just x  :: Maybe p
      	g (y::q) False = Nothing :: Maybe q
      
      3c) Scoped type variables respect alpha renaming. For example, 
          function f2 from (3a) above could also be written:
      	f2' :: p -> p -> p
      	f2' (x::b) (y::b) = x::b
         where the scoped type variable is called 'b' instead of 'a'.
      
      
      4) Result type signatures obey the same rules as pattern types signatures.
         In particular, they can bind a type variable only if the result type is rigid
      
      	f x :: a = x	-- NO
      
      	g :: b -> b
      	g x :: b = x	-- YES; binds b in rhs
      
      5) A *pattern type signature* in a *pattern binding* cannot bind a 
         scoped type variable
      
      	(x::a, y) = ...		-- Legal only if 'a' is already in scope
      
         Reason: in type checking, the "expected type" of the LHS pattern is
         always wobbly, so we can't bind a rigid type variable.  (The exception
         would be for an existential type variable, but existentials are not
         allowed in pattern bindings either.)
       
         Even this is illegal
      	f :: forall a. a -> a
      	f x = let ((y::b)::a, z) = ... 
      	      in 
         Here it looks as if 'b' might get a rigid binding; but you can't bind
         it to the same skolem as a.
      
      6) Explicitly-forall'd type variables in the *declaration type signature(s)*
         for a *pattern binding* do not scope AT ALL.
      
      	x :: forall a. a->a	  -- NO; the forall a does 
      	Just (x::a->a) = Just id  --     not scope at all
      
      	y :: forall a. a->a
      	Just y = Just (id :: a->a)  -- NO; same reason
      
         THIS IS A CHANGE, but one I bet that very few people will notice.
         Here's why:
      
      	strange :: forall b. (b->b,b->b)
      	strange = (id,id)
      
      	x1 :: forall a. a->a
      	y1 :: forall b. b->b
      	(x1,y1) = strange
      
          This is legal Haskell 98 (modulo the forall). If both 'a' and 'b'
          both scoped over the RHS, they'd get unified and so cannot stand
          for distinct type variables. One could *imagine* allowing this:
         
      	x2 :: forall a. a->a
      	y2 :: forall a. a->a
      	(x2,y2) = strange
      
          using the very same type variable 'a' in both signatures, so that
          a single 'a' scopes over the RHS.  That seems defensible, but odd,
          because though there are two type signatures, they introduce just
          *one* scoped type variable, a.
      
      7) Possible extension.  We might consider allowing
      	\(x :: [ _ ]) -> <expr>
          where "_" is a wild card, to mean "x has type list of something", without
          naming the something.
      ac10f840
  24. 21 Nov, 2005 1 commit
  25. 19 Nov, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-11-19 14:59:53 by simonmar] · e72b2ad4
      simonmar authored
      fix repType after changes to the representation of type synonyms.
      This caused the stage2 compiler to crash, because various info tables
      misrepresented the pointerhood of constructor arguments.
      e72b2ad4
  26. 16 Nov, 2005 1 commit
    • simonpj's avatar
      [project @ 2005-11-16 12:55:58 by simonpj] · cdea9949
      simonpj authored
      Two significant changes to the representation of types
      
      1. Change the representation of type synonyms
      
          Up to now, type synonym applications have been held in
          *both* expanded *and* un-expanded form.  Unfortunately, this
          has exponential (!) behaviour when type synonyms are deeply
          nested.  E.g.
      	    type P a b = (a,b)
      	    f :: P a (P b (P c (P d e)))
          
          This showed up in a program of Joel Reymont, now immortalised
          as typecheck/should_compile/syn-perf.hs
      
          So now synonyms are held as ordinary TyConApps, and expanded
          only on demand.  
      
          SynNote has disappeared altogether, so the only remaining TyNote
          is a FTVNote.  I'm not sure if it's even useful.
      
      2. Eta-reduce newtypes
      
          See the Note [Newtype eta] in TyCon.lhs
          
          If we have 
      	    newtype T a b = MkT (S a b)
          
          then, in Core land, we would like S = T, even though the application
          of T is then not saturated. This commit eta-reduces T's RHS, and
          keeps that inside the TyCon (in nt_etad_rhs).  Result is that 
          coreEqType can be simpler, and has less need of expanding newtypes.
      cdea9949
  27. 14 Oct, 2005 1 commit
    • simonpj's avatar
      [project @ 2005-10-14 11:22:41 by simonpj] · 36436bc6
      simonpj authored
      Add record syntax for GADTs
      	~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Atrijus Tang wanted to add record syntax for GADTs and existential
      types, so he and I worked on it a bit at ICFP.  This commit is the
      result.  Now you can say
      
       data T a where
        T1 { x :: a }           	 :: T [a]
        T2 { x :: a, y :: Int } 	 :: T [a]
        forall b. Show b =>
       	T3 { naughty :: b, ok :: Int } :: T Int
        T4 :: Eq a => a -> b -> T (a,b)
      
      Here the constructors are declared using record syntax.
      
      Still to come after this commit:
        - User manual documentation
        - More regression tests
        - Some missing cases in the parser (e.g. T3 won't parse)
      Autrijus is going to do these.
      
      
      Here's a quick summary of the rules.  (Atrijus is going to write
      proper documentation shortly.)
      
      Defnition: a 'vanilla' constructor has a type of the form
      	forall a1..an. t1 -> ... -> tm -> T a1 ... an
      No existentials, no context, nothing.  A constructor declared with
      Haskell-98 syntax is vanilla by construction.  A constructor declared
      with GADT-style syntax is vanilla iff its type looks like the above.
      (In the latter case, the order of the type variables does not matter.)
      
      * You can mix record syntax and non-record syntax in a single decl
      
      * All constructors that share a common field 'x' must have the
        same result type (T [a] in the example).
      
      * You can use field names without restriction in record construction
        and record pattern matching.
      
      * Record *update* only works for data types that only have 'vanilla'
        constructors.
      
      * Consider the field 'naughty', which uses a type variable that does
        not appear in the result type ('b' in the example).  You can use the
        field 'naughty' in pattern matching and construction, but NO
        SELECTOR function is generated for 'naughty'.  [An attempt to use
        'naughty' as a selector function will elicit a helpful error
        message.]
      
      * Data types declared in GADT syntax cannot have a context. So this
      is illegal:
      	data (Monad m) => T a where
      		  ....
      
      * Constructors in GADT syntax can have a context (t.g. T3, T4 above)
        and that context is stored in the constructor and made available
        when the constructor is pattern-matched on.  WARNING: not competely
        implemented yet, but that's the plan.
      
      
      
      Implementation notes
      ~~~~~~~~~~~~~~~~~~~~
      - Data constructors (even vanilla ones) no longer share the type
        variables of their parent type constructor.
      
      - HsDecls.ConDecl has changed quite a bit
      
      - TyCons don't record the field labels and type any more (doesn't
        make sense for existential fields)
      
      - GlobalIdDetails records which selectors are 'naughty', and hence
        don't have real code.
      36436bc6
  28. 11 Aug, 2005 1 commit
    • simonpj's avatar
      [project @ 2005-08-11 08:04:33 by simonpj] · 89627230
      simonpj authored
      Do 'tidying' on Kinds before printing them.  This avoids printing
      stuff like 'k_43b' in user error messages.
      
      To do this, I ended up adding an OccName to Kind.KindVar.  Even
      then the implementation is a bit of hack (see comments with 
      Type.tidyKind).  Still, it's a highly localised hack, whereas the
      "right thing" entails making KindVar into a flavour of Var, which
      seems like an uncomfortably big change.
      
         I think this change can merge to the stable branch
      89627230
  29. 16 May, 2005 1 commit