--- A Prag conveys pragmas from the type checker to the desugarer
-type LPrag = Located Prag
-data Prag
- = InlinePrag
- InlineSpec
-
- | SpecPrag
- (HsExpr Id) -- An expression, of the given specialised type, which
- PostTcType -- specialises the polymorphic function
- [Id] -- Dicts mentioned free in the expression
- -- Apr07: I think this is pretty useless
- -- see Note [Const rule dicts] in DsBinds
- InlineSpec -- Inlining spec for the specialised function
-
-isInlinePrag (InlinePrag _) = True
-isInlinePrag prag = False
-
-isSpecPrag (SpecPrag {}) = True
-isSpecPrag prag = False
+-- TsSpecPrags conveys pragmas from the type checker to the desugarer
+data TcSpecPrags
+ = IsDefaultMethod -- Super-specialised: a default method should
+ -- be macro-expanded at every call site
+ | SpecPrags [Located TcSpecPrag]
+
+data TcSpecPrag
+ = SpecPrag
+ HsWrapper -- An wrapper, that specialises the polymorphic function
+ InlinePragma -- Inlining spec for the specialised function
+
+noSpecPrags :: TcSpecPrags
+noSpecPrags = SpecPrags []
+
+hasSpecPrags :: TcSpecPrags -> Bool
+hasSpecPrags (SpecPrags ps) = not (null ps)
+hasSpecPrags IsDefaultMethod = False
+
+isDefaultMethod :: TcSpecPrags -> Bool
+isDefaultMethod IsDefaultMethod = True
+isDefaultMethod (SpecPrags {}) = False
+