Make impossible error more specific

This commit is contained in:
Evan Czaplicki 2013-08-12 14:30:32 -07:00
parent a3f62bdd14
commit e4fc35c901

View file

@ -139,7 +139,8 @@ makeCopy alreadyCopied variable = do
() | mark desc == alreadyCopied ->
case copy desc of
Just v -> return v
Nothing -> error "This should be impossible."
Nothing -> error $ "Error copying type variable. This should be impossible." ++
" Please report an error to the github repo!"
| rank desc /= noRank || flex desc == Constant ->
return variable