@@ -107,9 +107,9 @@ ctorToType env (name, (tvars, ctors)) =
107107
108108
109109get :: Environment -> (Environment -> Map.Map String a) -> String -> a
110−get env subDict key = Map.findWithDefault err key (subDict env)
110+get env subDict key = Map.findWithDefault (error msg) key (subDict env)
111111 where
112− err = error $ "Could not find type constructor '" ++ key ++ "' while checking types."
112+ msg = "Could not find type constructor '" ++ key ++ "' while checking types."
113113
114114
115115freshDataScheme :: Environment -> String -> IO (Int, [Variable], [Type], Type)