1. 30 May, 2007 2 commits
  2. 14 May, 2007 1 commit
  3. 11 May, 2007 2 commits
  4. 04 May, 2007 1 commit
  5. 25 Apr, 2007 1 commit
    • chak@cse.unsw.edu.au.'s avatar
      Generating synonym instance representation tycons · 13cd965d
      chak@cse.unsw.edu.au. authored
      - Type synonym instances are turned into representation synonym tycons
      - They are entered into the pool of family instances (FamInst environments)
        in the same way as data/newtype instances
      - Still missing is writing the parent tycon information into ifaces and 
        various well-formedness checks.
      13cd965d
  6. 22 Apr, 2007 1 commit
    • simonpj@microsoft.com's avatar
      Fixes to datacon wrappers for indexed data types · 70918cf4
      simonpj@microsoft.com authored
      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'.
      70918cf4
  7. 14 Mar, 2007 1 commit
  8. 23 Feb, 2007 2 commits
  9. 21 Feb, 2007 1 commit
  10. 05 Jan, 2007 1 commit
  11. 03 Jan, 2007 1 commit
  12. 22 Oct, 2006 1 commit
  13. 11 Oct, 2006 1 commit
  14. 06 Oct, 2006 1 commit
    • simonpj@microsoft.com's avatar
      Fix up the typechecking of interface files during --make · 84f4c1df
      simonpj@microsoft.com authored
      This patch fixes Trac #909.  The problem was that when compiling 
      the base package, the handling of wired-in things wasn't right;
      in TcIface.tcWiredInTyCon it repeatedly loaded GHC.Base.hi into the
      PIT, even though that was the very module it was compiling.
      
      The main fix is by introducing TcIface.ifCheckWiredInThing.
      
      But I did some minor refactoring as well.
      84f4c1df
  15. 05 Oct, 2006 1 commit
  16. 04 Oct, 2006 2 commits
    • simonpj@microsoft.com's avatar
      Improve unboxing of strict fields · 08a681f1
      simonpj@microsoft.com authored
      Note [Recursive unboxing]
      ~~~~~~~~~~~~~~~~~~~~~~~~~
      Be careful not to try to unbox this!
      	data T = MkT !T Int
      But it's the *argument* type that matters. This is fine:
      	data S = MkS S !Int
      because Int is non-recursive.
      
      
      Before this patch, we were only doing the unboxing if the *parent*
      data type was non-recursive (eg that meant S was not unboxed), but
      that is over-conservative. 
      
      This showed up with indexed data types (thanks to Roman for finding it)
      because indexed data types are conservatively regarded as always recursive.
      08a681f1
    • simonpj@microsoft.com's avatar
      Tidy tyvar OccNames in TcTyClDecl · 4b922606
      simonpj@microsoft.com authored
      We want the universal and existential tyvars of a data constructor to
      have distinct OccNames.  It's confusing if they don't (in error messages,
      for example), and with the current way of generating IfaceSyn, it actally
      generates bogus interface files.  (Which bit Roman.)
      
      When IfaceSyn is full of Names, this won't matter so much, but it still
      seems cleaner.
      
      This patch adds a 'tidy' step to the generation of DataCon type 
      variables in TcTyClDecls.tcResultType 
      4b922606
  17. 20 Sep, 2006 20 commits
    • chak@cse.unsw.edu.au.'s avatar
      574022a8
    • chak@cse.unsw.edu.au.'s avatar
      Basic set up for global family instance environment · 138b885a
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 19:52:34 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Basic set up for global family instance environment
        Fri Sep 15 15:20:44 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Basic set up for global family instance environment
      138b885a
    • chak@cse.unsw.edu.au.'s avatar
      Use smart lookup for tycons · 24bb49b7
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 19:49:35 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Use smart lookup for tycons
        Tue Sep 12 12:55:10 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Use smart lookup for tycons
      24bb49b7
    • chak@cse.unsw.edu.au.'s avatar
      Option -findexed-types · 284d83ee
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 19:42:48 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Option -findexed-types
        Fri Sep  8 21:35:37 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Option -findexed-types
          - Introduced the switch -findexed-types to activate the indexed type family 
            framework.
          - The switch enables the special 'family' and allows kind signatures (which are
            currently compulsory for associated families).
      284d83ee
    • chak@cse.unsw.edu.au.'s avatar
      Get of fam inst index in ifaces · 0cb269be
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 19:40:42 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Get of fam inst index in ifaces
        Fri Sep  8 16:31:26 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Get of fam inst index in ifaces
          - Removes the explicit index to get unique names for derived tycons for family
            instances again, following a suggestion by SPJ.
          - We now derive the coercion tycon name from the name of the representation 
            tycon, which is in the iface anyways.
          
          *** WARNING: Change of interface file format! ***
          ***          Recompile from scratch!          ***
      0cb269be
    • chak@cse.unsw.edu.au.'s avatar
      ATs are now implicitTyThings · 14a3631d
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 19:36:03 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * ATs are now implicitTyThings
        Tue Sep  5 21:09:54 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * ATs are now implicitTyThings
      14a3631d
    • chak@cse.unsw.edu.au.'s avatar
      Straightened out implicit coercions for indexed types · d76c18e0
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 19:35:24 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Straightened out implicit coercions for indexed types
        Mon Sep  4 23:46:14 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Straightened out implicit coercions for indexed types
          - HscTypes.implicitTyThings and LoadIface.ifaceDeclSubBndrs now
            include the coercion of indexed data/newtypes.
          - Name generation for the internal names of indexed data/newtypes now uses
            the same counter that generates the dfun unique indexes (ie, class and type
            instances are counted with the one counter).  We could make this two 
            separate counters if that's what's preferred.
          - The unique index of a data/newtype instances needs to go into the iface, so
            that we can generate the same names on slurping in the iface as when the
            original module was generated.  This is a bit yucky, but I don't see a way
            to avoid that (other than putting the full blown internal tycon name and 
            coercion name into the iface, which IMHO would be worse).
          - The predicate for when a datacon has a wrapper didn't take GADT
            equations nor whether it comes froma  family instance into account.
          
          *** WARNING!  This patch changed the interface file format. ***
          ***           Please recompile from scratch.                ***
      d76c18e0
    • chak@cse.unsw.edu.au.'s avatar
      Fixed two bugs concerning fanilies · a1899edb
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 19:34:38 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Fixed two bugs concerning fanilies
        Mon Sep  4 20:59:49 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Fixed two bugs concerning fanilies
      a1899edb
    • 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
      Checking conformance of AT indexes with instance heads · 53569e14
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 19:18:18 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Checking conformance of AT indexes with instance heads
        Wed Aug 30 20:13:52 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Checking conformance of AT indexes with instance heads
      53569e14
    • chak@cse.unsw.edu.au.'s avatar
      Check that AT instance is in a class · feb584b7
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 19:16:40 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Check that AT instance is in a class
        Sat Aug 26 21:49:56 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Check that AT instance is in a class
      feb584b7
    • chak@cse.unsw.edu.au.'s avatar
      Introduce coercions for data instance decls · 909d2dd8
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 19:07:30 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Introduce coercions for data instance decls
        Tue Aug 22 20:33:46 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Introduce coercions for data instance decls
          - data instance declarations implicitly generate a coercion moving between the
            representation type and family instance type.
          - The coercion is *implicitly* generated when type checking both source and 
            ifaces.  Ie, we don't safe it in ifaces - this is really exactly as newtype 
            coercions are handled.
          - The previous addition of the instance types to DataCons has been moved to 
            the representation TyCon.  This is more efficient as it is shared between all
            constructors of one representation tycon and it also gathers everything about
            data instances (family tycon, instance types, and coercion) in one place: the
            algTcParent field of TyCon.
          - The coercion is already used in the datacon wrappers, but not yet during type
            checking pattern matching of indexed data types.
          - The code has only been lightly tested, but doesn't seem to break features not
            related to indexed types.  For indexed data types only the pattern matching
            tc code (in TcPat.tcConPat) and some well-formedness checks are still 
            missing.  And there will surely be some bugs to fix.  (newtypes still require
            some more work.)
          
          	   ** WARNING: Interface file format changed! **
          	   **          Recompile from scratch!        **
      909d2dd8
    • chak@cse.unsw.edu.au.'s avatar
      Fixed two data family bugs · 275dde6d
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 19:06:51 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Fixed two data family bugs
        Mon Aug 21 15:16:16 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Fixed two data family bugs
          - Too liberal pattern matching in `tcTyClDecl1'
          - Open TyCons must always be exposed (ie, never be turned into abstract tycons
            during tidying)
      275dde6d
    • chak@cse.unsw.edu.au.'s avatar
      Fix the tyvars used for data con signatures · 0e3e2862
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 19:06:12 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Fix the tyvars used for data con signatures
        Sat Aug 19 17:19:25 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Fix the tyvars used for data con signatures
      0e3e2862
    • chak@cse.unsw.edu.au.'s avatar
      Extend TyCons and DataCons to represent data instance decls · 80c89b80
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 19:05:18 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Extend TyCons and DataCons to represent data instance decls
        Fri Aug 18 19:11:37 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Extend TyCons and DataCons to represent data instance decls
          - This is a faily involved patch, but it is not entirely complete:
            + The data con wrapper code for instance data cons needs to apply the
              coercions (which we still have to generate).
            + There are still bugs, but it doesn't seem to affect the compilation of
              code that doesn't use type families.
          
          ** WARNING: Yet another change of the iface format.  **
          **          Recompile everything.                    **
      80c89b80
    • chak@cse.unsw.edu.au.'s avatar
      Make sure ATs are included into the temporary env for tc knot tying · f94a8dbd
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 19:03:31 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Make sure ATs are included into the temporary env for tc knot tying
        Wed Aug 16 17:52:40 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Make sure ATs are included into the temporary env for tc knot tying
      f94a8dbd
    • chak@cse.unsw.edu.au.'s avatar
      Extend Class.Class to include the TyCons of ATs · bb106f28
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 18:58:51 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Extend Class.Class to include the TyCons of ATs
        Wed Aug 16 16:15:31 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Extend Class.Class to include the TyCons of ATs
      bb106f28
    • chak@cse.unsw.edu.au.'s avatar
      Fix kind lookup in kcIdxTyPats · 229aaa59
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 18:58:14 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Fix kind lookup in kcIdxTyPats
        Tue Aug 15 21:02:34 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Fix kind lookup in kcIdxTyPats
      229aaa59
    • 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
      Kind and type checking of indexed types · 202ac08f
      chak@cse.unsw.edu.au. authored
      Mon Sep 18 18:39:03 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
        * Kind and type checking of indexed types
        Fri Aug 11 16:09:13 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
          * Kind and type checking of indexed types
          - Type checking of kind signatures
          - Kind and type checking of instances of indexed types
          - Validity checks for ATs are still *missing* (ie, that the type indexes 
            coincide with the class parameters and that the defined ATs really belong to
            the class).
      202ac08f