on master help sign in
cosmetic: make line a bit shorter
d970976Evan Czaplicki
compiler/Type/Environment.hs+2−2
@@ -107,9 +107,9 @@ ctorToType env (name, (tvars, ctors)) =
107
107
108
108
109get :: Environment -> (Environment -> Map.Map String a) -> String -> a
109get :: 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)
111 where
111 where
112− err = error $ "Could not find type constructor '" ++ key ++ "' while checking types."
112+ msg = "Could not find type constructor '" ++ key ++ "' while checking types."
113
113
114
114
115freshDataScheme :: Environment -> String -> IO (Int, [Variable], [Type], Type)
115freshDataScheme :: Environment -> String -> IO (Int, [Variable], [Type], Type)