summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2016-05-17 23:21:10 +0200
committerBen Gamari <ben@smart-cactus.org>2016-05-17 23:21:24 +0200
commit48c63554896118310579e66ec9859c9c29c6efc4 (patch)
tree2a149d87dc165fbbf47b39a15ac984152598b908
parent846eca4c5ad558141722443fd50ca9959f71e9d6 (diff)
downloadhaskell-wip/iface-type-pretty.tar.gz
-rw-r--r--compiler/iface/IfaceType.hs2
-rw-r--r--compiler/iface/IfaceType.hs-boot28
-rw-r--r--compiler/types/TyCoRep.hs1
-rw-r--r--compiler/types/TyCoRep.hs-boot1
4 files changed, 31 insertions, 1 deletions
diff --git a/compiler/iface/IfaceType.hs b/compiler/iface/IfaceType.hs
index 5627d91280..0ea7a485eb 100644
--- a/compiler/iface/IfaceType.hs
+++ b/compiler/iface/IfaceType.hs
@@ -63,7 +63,7 @@ import Coercion
import DataCon ( isTupleDataCon )
import TcType
import DynFlags
-import TyCoRep -- needs to convert core types to iface types
+import {-# SOURCE #-}TyCoRep -- needs to convert core types to iface types
import TyCon hiding ( pprPromotionQuote )
import CoAxiom
import Id
diff --git a/compiler/iface/IfaceType.hs-boot b/compiler/iface/IfaceType.hs-boot
new file mode 100644
index 0000000000..12859f64e1
--- /dev/null
+++ b/compiler/iface/IfaceType.hs-boot
@@ -0,0 +1,28 @@
+-- Exists to allow TyCoRep to import pretty-printers
+module IfaceType where
+
+import Var (TyVar)
+import {-# SOURCE #-} TyCoRep (Type, TyLit, TyBinder)
+import Outputable
+
+data IfaceType
+data IfaceTyLit
+data IfaceForAllBndr
+data IfaceTyConBinder
+data IfaceTvBndr
+
+pprIfaceType, pprParendIfaceType :: IfaceType -> SDoc
+pprIfaceSigmaType :: IfaceType -> SDoc
+pprIfaceTyLit :: IfaceTyLit -> SDoc
+pprIfaceForAll :: [IfaceForAllBndr] -> SDoc
+pprIfaceTvBndr :: Bool -> IfaceTvBndr -> SDoc
+pprUserIfaceForAll :: [IfaceForAllBndr] -> SDoc
+pprIfaceContext :: Outputable a => [a] -> SDoc
+pprIfaceContextArr :: Outputable a => [a] -> SDoc
+
+toIfaceType :: Type -> IfaceType
+toIfaceTyLit :: TyLit -> IfaceTyLit
+
+zipIfaceBinders :: [TyVar] -> [TyBinder] -> [IfaceTyConBinder]
+
+toDegenerateBinders :: [TyBinder] -> [IfaceTyConBinder]
diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs
index ac568cf70b..766bf8d23f 100644
--- a/compiler/types/TyCoRep.hs
+++ b/compiler/types/TyCoRep.hs
@@ -137,6 +137,7 @@ import {-# SOURCE #-} Type( isPredTy, isCoercionTy, mkAppTy
import {-# SOURCE #-} Coercion
import {-# SOURCE #-} ConLike ( ConLike(..), conLikeName )
import {-# SOURCE #-} TysWiredIn ( ptrRepLiftedTy )
+import {-# SOURCE #-} IfaceType
-- friends:
import Var
diff --git a/compiler/types/TyCoRep.hs-boot b/compiler/types/TyCoRep.hs-boot
index 0bcd9b369e..ef63d2a632 100644
--- a/compiler/types/TyCoRep.hs-boot
+++ b/compiler/types/TyCoRep.hs-boot
@@ -10,6 +10,7 @@ data Coercion
data LeftOrRight
data UnivCoProvenance
data TCvSubst
+data TyLit
mkForAllTys :: [TyBinder] -> Type -> Type