| UfCoerce (HsType name)
| UfInlineCall
| UfInlineMe
+ | UfCoreNote String
type UfAlt name = (UfConAlt name, [name], UfExpr name)
toUfNote (Coerce t1 _) = UfCoerce (toHsType t1)
toUfNote InlineCall = UfInlineCall
toUfNote InlineMe = UfInlineMe
+toUfNote (CoreNote s) = UfCoreNote s
---------------------
toUfBind (NonRec b r) = UfNonRec (toUfBndr b) (toUfExpr r)
ppr (UfCoerce ty) = ptext SLIT("__coerce") <+> pprParendHsType ty
ppr UfInlineCall = ptext SLIT("__inline_call")
ppr UfInlineMe = ptext SLIT("__inline_me")
+ ppr (UfCoreNote s)= ptext SLIT("__core_note") <+> pprHsString (mkFastString s)
instance Outputable name => Outputable (UfConAlt name) where
ppr UfDefault = text "__DEFAULT"
eq_ufNote (UfCoerce t1) (UfCoerce t2) = eq_hsType env t1 t2
eq_ufNote UfInlineCall UfInlineCall = True
eq_ufNote UfInlineMe UfInlineMe = True
+ eq_ufNote (UfCoreNote s1) (UfCoreNote s2) = s1==s2
eq_ufNote _ _ = False
eq_ufExpr env _ _ = False