on master help sign in
Make impossible error more specific
e4fc35cEvan Czaplicki
compiler/Type/State.hs+2−1
@@ -139,7 +139,8 @@ makeCopy alreadyCopied variable = do
139 () | mark desc == alreadyCopied ->
139 () | mark desc == alreadyCopied ->
140 case copy desc of
140 case copy desc of
141 Just v -> return v
141 Just v -> return v
142− Nothing -> error "This should be impossible."
142+ Nothing -> error $ "Error copying type variable. This should be impossible." ++
143+ " Please report an error to the github repo!"
143
144
144 | rank desc /= noRank || flex desc == Constant ->
145 | rank desc /= noRank || flex desc == Constant ->
145 return variable
146 return variable