From 8c0eca3dccd58b41b226d3f3aad9a02a18bef6de Mon Sep 17 00:00:00 2001 From: Jan Stolarek Date: Fri, 11 Sep 2015 22:29:02 +0200 Subject: [PATCH] Add assertions --- compiler/typecheck/FamInst.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/typecheck/FamInst.hs b/compiler/typecheck/FamInst.hs index 49fc5fe8b0..978e92e34c 100644 --- a/compiler/typecheck/FamInst.hs +++ b/compiler/typecheck/FamInst.hs @@ -423,7 +423,8 @@ makeInjectivityErrors -> [CoAxBranch] -- ^ List of injectivity conflicts -> [(SDoc, SrcSpan)] makeInjectivityErrors tycon axiom inj conflicts - = let lhs = coAxBranchLHS axiom + = ASSERT2( any id inj, text "No injective type variables" ) + let lhs = coAxBranchLHS axiom rhs = coAxBranchRHS axiom are_conflicts = not $ null conflicts -- GitLab