summaryrefslogtreecommitdiff
path: root/compiler/parser/RdrHsSyn.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2018-08-21 15:57:56 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2018-08-21 16:03:21 +0100
commit43b08cfbac5ce7ad6fc245651329094896de06e0 (patch)
tree9011abea19ca52380cbbff8fcaf2a9fbaddc9512 /compiler/parser/RdrHsSyn.hs
parent828e949318399752630f80f1fbefbbea08c55995 (diff)
downloadhaskell-43b08cfbac5ce7ad6fc245651329094896de06e0.tar.gz
Add a solveEqualities to tcClassDecl1
Trac #15505 showed that, when we have a type error, we could have an unfilled-in coercion hole. We don't want an assertion error in that case. The underlying cause is that tcClassDecl1 should call solveEqualities to fully solve all top-level equalities (or fail in the attempt). I also refactored the ClassDecl case for tcTyClDecl1 into a new function tcClassDecl1. That makes it symmetrical with the others.
Diffstat (limited to 'compiler/parser/RdrHsSyn.hs')
-rw-r--r--compiler/parser/RdrHsSyn.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/parser/RdrHsSyn.hs b/compiler/parser/RdrHsSyn.hs
index 681ecdeae0..5784b9ecdb 100644
--- a/compiler/parser/RdrHsSyn.hs
+++ b/compiler/parser/RdrHsSyn.hs
@@ -78,7 +78,6 @@ module RdrHsSyn (
import GhcPrelude
import HsSyn -- Lots of it
-import Class ( FunDep )
import TyCon ( TyCon, isTupleTyCon, tyConSingleDataCon_maybe )
import DataCon ( DataCon, dataConTyCon )
import ConLike ( ConLike(..) )
@@ -142,7 +141,7 @@ mkInstD (L loc d) = L loc (InstD noExt d)
mkClassDecl :: SrcSpan
-> Located (Maybe (LHsContext GhcPs), LHsType GhcPs)
- -> Located (a,[Located (FunDep (Located RdrName))])
+ -> Located (a,[LHsFunDep GhcPs])
-> OrdList (LHsDecl GhcPs)
-> P (LTyClDecl GhcPs)