- 20 Sep, 2006 40 commits
-
-
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
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 19:17:18 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Warn of missing ATs and complain about bad ATs Mon Aug 28 22:26:22 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Warn of missing ATs and complain about bad ATs
-
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
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 19:13:47 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Kind sig for toplevel family decls is optional Sat Aug 26 19:03:50 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Kind sig for toplevel family decls is optional - Kind sigs are still compulsory for AT family decls. Changing this is more tricky, as AT decls don't have the family keyword and hence look like empty data decls. That impacts reduce/reduce conflicts and/or the criteria for checking whether a TyData variant is a family signature. - Also removed iso from the syntax (it's still in the lexer in case we want to resurrect it).
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 19:12:51 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Fixed bug in coercion for indexed data types Fri Aug 25 16:45:29 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Fixed bug in coercion for indexed data types - Significant examples are starting to work; eg, generic finite maps: class GMapKey k where data GMap k :: * -> * empty :: GMap k v lookup :: k -> GMap k v -> Maybe v insert :: k -> v -> GMap k v -> GMap k v instance GMapKey Int where data GMap Int v = GMapInt (Map.Map Int v) empty = GMapInt Map.empty lookup k (GMapInt m) = Map.lookup k m insert k v (GMapInt m) = GMapInt (Map.insert k v m) instance GMapKey Char where data GMap Char v = GMapChar (GMap Int v) empty = GMapChar empty lookup k (GMapChar m) = lookup (ord k) m insert k v (GMapChar m) = GMapChar (insert (ord k) v m) instance GMapKey () where data GMap () v = GMapUnit (Maybe v) empty = GMapUnit Nothing lookup () (GMapUnit v) = v insert () v (GMapUnit _) = GMapUnit $ Just v instance (GMapKey a, GMapKey b) => GMapKey (a, b) where data GMap (a, b) v = GMapPair (GMap a (GMap b v)) empty = GMapPair empty lookup (a, b) (GMapPair gm) = lookup a gm >>= lookup b insert (a, b) v (GMapPair gm) = GMapPair $ case lookup a gm of Nothing -> insert a (insert b v empty) gm Just gm2 -> insert a (insert b v gm2 ) gm instance (GMapKey a, GMapKey b) => GMapKey (Either a b) where data GMap (Either a b) v = GMapEither (GMap a v) (GMap b v) empty = GMapEither empty empty lookup (Left a) (GMapEither gm1 _gm2) = lookup a gm1 lookup (Right b) (GMapEither _gm1 gm2 ) = lookup b gm2 insert (Left a) v (GMapEither gm1 gm2) = GMapEither (insert a v gm1) gm2 insert (Right a) v (GMapEither gm1 gm2) = GMapEither gm1 (insert a v gm2)
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 19:11:24 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Pattern matching of indexed data types Thu Aug 24 14:17:44 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Pattern matching of indexed data types - This patch is the last major puzzle piece to type check and desugar indexed data types (both toplevel and associated with a class). - However, it needs more testing - esp wrt to accumlating CoPats - and some static sanity checks for data instance declarations are still missing. - There are now two detailed notes in MkIds and TcPat on how the worker/wrapper and coercion story for indexed data types works.
-
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! **
-
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)
-
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
-
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. **
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 19:04:12 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Fix TcSplice after some type family related changes Wed Aug 16 19:51:27 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Fix TcSplice after some type family related changes
-
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
-
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
-
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
-
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
-
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).
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:45:06 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Another comment Wed Aug 9 04:48:18 EDT 2006 simonpj@microsoft.com * Another comment
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:44:24 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Add missing co_vars to tcIfaceDataAlt Wed Aug 9 04:45:33 EDT 2006 simonpj@microsoft.com * Add missing co_vars to tcIfaceDataAlt
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:43:31 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Comments only Wed Aug 9 04:45:19 EDT 2006 simonpj@microsoft.com * Comments only
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:41:37 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Small refactoring Wed Aug 9 04:41:54 EDT 2006 simonpj@microsoft.com * Small refactoring
-
chak@cse.unsw.edu.au. authored
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:28:37 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Missing change re additional info in TcTyThing Mon Aug 7 14:22:08 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Missing change re additional info in TcTyThing
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:27:42 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Complete OccName->FS change in TcIface Mon Aug 7 13:03:26 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Complete OccName->FS change in TcIface
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:27:00 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Missing imports in CoreUtils Mon Aug 7 11:15:54 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Missing imports in CoreUtils
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:25:23 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Removed spurious + due to manual patching Mon Aug 7 11:07:37 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Removed spurious + due to manual patching
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:23:13 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Makefile comment Sun Aug 6 21:03:20 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Makefile comment Fri Aug 4 11:44:49 EDT 2006 kevind@bu.edu
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:22:43 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Fix newtype deriving bug Sun Aug 6 21:02:35 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Fix newtype deriving bug Fri Aug 4 06:45:21 EDT 2006 kevind@bu.edu
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:22:14 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Include the existential dictionaries in dataConOrigInstPat Sun Aug 6 20:59:00 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Include the existential dictionaries in dataConOrigInstPat Fri Aug 4 04:24:25 EDT 2006 simonpj@microsoft.com
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:21:20 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Comments about datacon worker and wrappers Sun Aug 6 20:57:48 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Comments about datacon worker and wrappers Fri Aug 4 04:23:28 EDT 2006 simonpj@microsoft.com
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:20:17 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Make newtype Coercion eta-contract if the tails of lhs and rhs match up Sun Aug 6 20:57:10 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Make newtype Coercion eta-contract if the tails of lhs and rhs match up Thu Aug 3 12:26:52 EDT 2006 kevind@bu.edu
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:19:19 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Flip direction of newtype coercions, fix some comments Sun Aug 6 20:56:23 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Flip direction of newtype coercions, fix some comments Thu Aug 3 10:53:37 EDT 2006 kevind@bu.edu
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:17:57 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Chagne newtype wrapper into worker Sun Aug 6 20:55:30 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Chagne newtype wrapper into worker Wed Aug 2 11:54:28 EDT 2006 kevind@bu.edu
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:17:20 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Clean up unused imports, definitions and arguments Sun Aug 6 20:54:31 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Clean up unused imports, definitions and arguments Wed Aug 2 11:05:33 EDT 2006 kevind@bu.edu
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:16:10 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Fix assertion and default case for GADT record selectors Sun Aug 6 20:53:39 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Fix assertion and default case for GADT record selectors Wed Aug 2 11:04:21 EDT 2006 kevind@bu.edu
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:15:25 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * make dataConInstPat take a list of FastStrings rather than OccNames, remove out-of-date comment Sun Aug 6 20:52:24 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * make dataConInstPat take a list of FastStrings rather than OccNames, remove out-of-date comment Wed Aug 2 09:26:47 EDT 2006 kevind@bu.edu
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:14:51 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Just clean-up, no functional changes Sun Aug 6 20:49:23 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Just clean-up, no functional changes Wed Aug 2 06:48:44 EDT 2006 simonpj@microsoft.com
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:13:44 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Get rid of special case for Vanilla tycon record selectors and make uniq splitting more uniform Sun Aug 6 20:48:06 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Get rid of special case for Vanilla tycon record selectors and make uniq splitting more uniform Wed Aug 2 06:04:19 EDT 2006 kevind@bu.edu
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:13:11 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Fix problem with selectors for GADT records with unboxed fields Sun Aug 6 20:47:11 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Fix problem with selectors for GADT records with unboxed fields Wed Aug 2 05:37:38 EDT 2006 kevind@bu.edu
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:11:59 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Make sym coercion smart constructor smarter, add comments Sun Aug 6 20:32:58 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Make sym coercion smart constructor smarter, add comments Tue Aug 1 11:30:14 EDT 2006 kevind@bu.edu
-
chak@cse.unsw.edu.au. authored
Mon Sep 18 17:11:25 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Refactoring in TcGadt Sun Aug 6 20:32:20 EDT 2006 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Refactoring in TcGadt Tue Aug 1 10:28:25 EDT 2006 kevind@bu.edu
-