Make error message in solver slightly more specific
commit26738907c6571cba14f7bde0bbf2881833cd90c5
authorEvan Czaplicki <info@elm-lang.org>
dateFri 19 Jul 2013, 12:41 (13 years ago)
parentb540fb4
compiler/Type/Solve.hs+2−1
@@ -116,7 +116,8 @@ solve constraint =
116116
117117 CInstance name term -> do
118118 env <- TS.getEnv
119− freshCopy <- TS.makeInstance (Map.findWithDefault (error $ "Could not find " ++ name ++ " in the environment") name env)
119+ let msg = "Could not find '" ++ name ++ "' when solving type constraints."
120+ freshCopy <- TS.makeInstance (Map.findWithDefault (error msg) name env)
120121 t <- TS.flatten term
121122 unify freshCopy t
122123 TS.getEnv