@@ -98,6 +98,7 @@ data Err = Msg String
98 -- unification succeed
98 -- unification succeed
99 | InfiniteUnify Name Term [(Name, Type)]
99 | InfiniteUnify Name Term [(Name, Type)]
100 | CantConvert Term Term [(Name, Type)]
100 | CantConvert Term Term [(Name, Type)]
101+ | CantSolveGoal Term [(Name, Type)]
101 | UnifyScope Name Name Term [(Name, Type)]
102 | UnifyScope Name Name Term [(Name, Type)]
102 | CantInferType String
103 | CantInferType String
103 | NonFunctionType Term Term
104 | NonFunctionType Term Term
@@ -155,6 +156,7 @@ score (CantUnify _ _ _ m _ s) = s + score m
155score (CantResolve _) = 20
156score (CantResolve _) = 20
156score (NoSuchVariable _) = 1000
157score (NoSuchVariable _) = 1000
157score (ProofSearchFail _) = 10000
158score (ProofSearchFail _) = 10000
159+score (CantSolveGoal _ _) = 10000
158score (InternalMsg _) = -1
160score (InternalMsg _) = -1
159score _ = 0
161score _ = 0
@@ -163,6 +165,7 @@ instance Show Err where
163 show (InternalMsg s) = "Internal error: " ++ show s
165 show (InternalMsg s) = "Internal error: " ++ show s
164 show (CantUnify _ l r e sc i) = "CantUnify " ++ show l ++ " " ++ show r ++ " "
166 show (CantUnify _ l r e sc i) = "CantUnify " ++ show l ++ " " ++ show r ++ " "
165 ++ show e ++ " in " ++ show sc ++ " " ++ show i
167 ++ show e ++ " in " ++ show sc ++ " " ++ show i
168+ show (CantSolveGoal g _) = "CantSolve " ++ show g
166 show (Inaccessible n) = show n ++ " is not an accessible pattern variable"
169 show (Inaccessible n) = show n ++ " is not an accessible pattern variable"
167 show (ProviderError msg) = "Type provider error: " ++ msg
170 show (ProviderError msg) = "Type provider error: " ++ msg
168 show (LoadingFailed fn e) = "Loading " ++ fn ++ " failed: (TT) " ++ show e
171 show (LoadingFailed fn e) = "Loading " ++ fn ++ " failed: (TT) " ++ show e