tyClDeclName, tyClDeclNames, tyClDeclTyVars,
isClassDecl, isSynDecl, isDataDecl, isIfaceSigDecl,
isTypeOrClassDecl, countTyClDecls,
- isSourceInstDecl, ifaceRuleDeclName,
+ isSourceInstDecl, instDeclDFun, ifaceRuleDeclName,
conDetailsTys,
collectRuleBndrSigTys, isSrcRule
) where
have (Just binds) in the tcdMeths field, whereas interface decls have Nothing.
In *source-code* class declarations:
+
- When parsing, every ClassOpSig gets a DefMeth with a suitable RdrName
This is done by RdrHsSyn.mkClassOpSigDM
isSourceInstDecl :: InstDecl name -> Bool
isSourceInstDecl (InstDecl _ _ _ maybe_dfun _) = isNothing maybe_dfun
+
+instDeclDFun :: InstDecl name -> Maybe name
+instDeclDFun (InstDecl _ _ _ df _) = df -- A Maybe, but that's ok
\end{code}
\begin{code}
name -- Head of LHS
CoreRule
+isSrcRule :: RuleDecl name -> Bool
isSrcRule (HsRule _ _ _ _ _ _) = True
isSrcRule other = False