diff options
author | Trevor Elliott <trevor@galois.com> | 2013-09-08 18:25:48 -0700 |
---|---|---|
committer | Trevor Elliott <trevor@galois.com> | 2013-09-08 18:25:48 -0700 |
commit | 4174458178cf484b15874ac8656e41fe35be46f3 (patch) | |
tree | cc737628b0ebc89210d3476ab47ca9ccae568f9d /compiler/iface/MkIface.lhs | |
parent | 13d4096e0668e9f80a8601122affc64f8be295de (diff) | |
download | haskell-data-kind-syntax.tar.gz |
Add IfacePromotionInfodata-kind-syntax
* Remove the orphan instance for PromotionInfo from types/TyCon.lhs
Diffstat (limited to 'compiler/iface/MkIface.lhs')
-rw-r--r-- | compiler/iface/MkIface.lhs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/iface/MkIface.lhs b/compiler/iface/MkIface.lhs index 3fff2b81c7..ed96a533fb 100644 --- a/compiler/iface/MkIface.lhs +++ b/compiler/iface/MkIface.lhs @@ -1514,7 +1514,8 @@ tyConToIfaceDecl env tycon ifCons = ifaceConDecls (algTyConRhs tycon), ifRec = boolToRecFlag (isRecursiveTyCon tycon), ifGadtSyntax = isGadtSyntaxTyCon tycon, - ifPromotable = fmap (\_ -> ()) (promotableTyConInfo tycon), + ifPromotable = toIfacePromotionInfo + $ fmap (\_ -> ()) (promotableTyConInfo tycon), ifAxiom = fmap coAxiomName (tyConFamilyCoercion_maybe tycon) } | isForeignTyCon tycon @@ -1571,6 +1572,12 @@ tyConToIfaceDecl env tycon where (args,_) = splitFunTys (tyConKind ty_con) +toIfacePromotionInfo :: PromotionInfo () -> IfacePromotionInfo +toIfacePromotionInfo pi = case pi of + NeverPromote -> IfaceNeverPromote + NotPromotable -> IfaceNotPromotable + Promotable () -> IfacePromotable + toIfaceBang :: TidyEnv -> HsBang -> IfaceBang toIfaceBang _ HsNoBang = IfNoBang toIfaceBang _ (HsUnpack Nothing) = IfUnpack |