diff --git a/compiler/typecheck/FamInst.hs b/compiler/typecheck/FamInst.hs index 49fc5fe8b0eb1f4224445826b65e10882b9e973c..978e92e34c209a5e493d6f0ff0a49264a403c268 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