Skip to content
Snippets Groups Projects
Commit 073d899a authored by niteria's avatar niteria Committed by Matthew Pickering
Browse files

Fix rendering of class methods for Eq and Ord

See #549 and GHC issue #12519
parent a3309e79
No related branches found
No related tags found
No related merge requests found
......@@ -81,7 +81,7 @@ tyThingToLHsDecl t = case t of
(map (noLoc . getName) l, map (noLoc . getName) r) ) $
snd $ classTvsFds cl
, tcdSigs = noLoc (MinimalSig mempty . noLoc . fmap noLoc $ classMinimalDef cl) :
map (noLoc . synifyIdSig DeleteTopLevelQuantification)
map (noLoc . synifyTcIdSig DeleteTopLevelQuantification)
(classMethods cl)
, tcdMeths = emptyBag --ignore default method definitions, they don't affect signature
-- class associated-types are a subset of TyCon:
......@@ -316,6 +316,8 @@ synifyName = noLoc . getName
synifyIdSig :: SynifyTypeState -> Id -> Sig Name
synifyIdSig s i = TypeSig [synifyName i] (synifySigWcType s (varType i))
synifyTcIdSig :: SynifyTypeState -> Id -> Sig Name
synifyTcIdSig s i = ClassOpSig False [synifyName i] (synifySigType s (varType i))
synifyCtx :: [PredType] -> LHsContext Name
synifyCtx = noLoc . map (synifyType WithinType)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment