summaryrefslogtreecommitdiff
path: root/compiler/typecheck/TcTypeNats.hs
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2016-02-04 10:42:56 -0500
committerRichard Eisenberg <eir@cis.upenn.edu>2016-02-24 13:31:30 -0500
commitd8c64e86361f6766ebe26a262bb229fb8301a42a (patch)
tree94d68ebcb1cc6e9eabff08d3cd1d7e61dd99c01e /compiler/typecheck/TcTypeNats.hs
parentce36115b369510c51f402073174d82d0d1244589 (diff)
downloadhaskell-wip/runtime-rep.tar.gz
Address #11471 by putting RuntimeRep in kinds.wip/runtime-rep
See Note [TYPE] in TysPrim. There are still some outstanding pieces in #11471 though, so this doesn't actually nail the bug. This commit also contains a few performance improvements: * Short-cut equality checking of nullary type syns * Compare types before kinds in eqType * INLINE coreViewOneStarKind * Store tycon binders separately from kinds. This resulted in a ~10% performance improvement in compiling the Cabal package. No change in functionality other than performance. (This affects the interface file format, though.) This commit updates the haddock submodule.
Diffstat (limited to 'compiler/typecheck/TcTypeNats.hs')
-rw-r--r--compiler/typecheck/TcTypeNats.hs12
1 files changed, 8 insertions, 4 deletions
diff --git a/compiler/typecheck/TcTypeNats.hs b/compiler/typecheck/TcTypeNats.hs
index e7fb85fdbe..e6a6c7ed70 100644
--- a/compiler/typecheck/TcTypeNats.hs
+++ b/compiler/typecheck/TcTypeNats.hs
@@ -100,7 +100,8 @@ typeNatExpTyCon = mkTypeNatFunTyCon2 name
typeNatLeqTyCon :: TyCon
typeNatLeqTyCon =
mkFamilyTyCon name
- (mkFunTys [ typeNatKind, typeNatKind ] boolTy)
+ (map mkAnonBinder [ typeNatKind, typeNatKind ])
+ boolTy
(mkTemplateTyVars [ typeNatKind, typeNatKind ])
Nothing
(BuiltInSynFamTyCon ops)
@@ -119,7 +120,8 @@ typeNatLeqTyCon =
typeNatCmpTyCon :: TyCon
typeNatCmpTyCon =
mkFamilyTyCon name
- (mkFunTys [ typeNatKind, typeNatKind ] orderingKind)
+ (map mkAnonBinder [ typeNatKind, typeNatKind ])
+ orderingKind
(mkTemplateTyVars [ typeNatKind, typeNatKind ])
Nothing
(BuiltInSynFamTyCon ops)
@@ -138,7 +140,8 @@ typeNatCmpTyCon =
typeSymbolCmpTyCon :: TyCon
typeSymbolCmpTyCon =
mkFamilyTyCon name
- (mkFunTys [ typeSymbolKind, typeSymbolKind ] orderingKind)
+ (map mkAnonBinder [ typeSymbolKind, typeSymbolKind ])
+ orderingKind
(mkTemplateTyVars [ typeSymbolKind, typeSymbolKind ])
Nothing
(BuiltInSynFamTyCon ops)
@@ -162,7 +165,8 @@ typeSymbolCmpTyCon =
mkTypeNatFunTyCon2 :: Name -> BuiltInSynFamily -> TyCon
mkTypeNatFunTyCon2 op tcb =
mkFamilyTyCon op
- (mkFunTys [ typeNatKind, typeNatKind ] typeNatKind)
+ (map mkAnonBinder [ typeNatKind, typeNatKind ])
+ typeNatKind
(mkTemplateTyVars [ typeNatKind, typeNatKind ])
Nothing
(BuiltInSynFamTyCon tcb)