@@ -2041,7 +2041,8 @@ elabInstance info syn what fc cs n ps t expn ds = do
20412041 (CantResolveAlts (map (show . fst) cs))
20422042 let constraint = PApp fc (PRef fc n) (map pexp ps)
20432043 let iname = mkiname n ps expn
2044− when (what /= EDefns || null ds) $ do
2044+ let emptyclass = null (class_methods ci)
2045+ when (what /= EDefns || (null ds && not emptyclass)) $ do
20452046 nty <- elabType' True info syn emptyDocstring [] fc [] iname t
20462047 -- if the instance type matches any of the instances we have already,
20472048 -- and it's not a named instance, then it's overlapping, so report an error
@@ -2050,7 +2051,7 @@ elabInstance info syn what fc cs n ps t expn ds = do
20502051 (class_instances ci)
20512052 addInstance intInst n iname
20522053 Just _ -> addInstance intInst n iname
2053− when (what /= ETypes && (not (null ds))) $ do
2054+ when (what /= ETypes && (not (null ds && not emptyclass))) $ do
20542055 let ips = zip (class_params ci) ps
20552056 let ns = case n of
20562057 NS n ns' -> ns'