on master help sign in
Give better name for errors when parsing docs.json
9c8dfd9evancz
compiler/Types/Hints.hs+1−1
@@ -15,7 +15,7 @@ hints = mapM toScheme values
15 addPrefixes = concatMap (\(m,vs) -> map (first (\n -> m ++ "." ++ n)) vs)
15 addPrefixes = concatMap (\(m,vs) -> map (first (\n -> m ++ "." ++ n)) vs)
16 values = addPrefixes (Map.toList (Map.map Map.toList libraries))
16 values = addPrefixes (Map.toList (Map.map Map.toList libraries))
17 toScheme (name, tipeString) =
17 toScheme (name, tipeString) =
18− case iParse (fmap toType typeExpr) "libraries" tipeString of
18+ case iParse (fmap toType typeExpr) "parsing types in docs.json" tipeString of
19 Left err -> error (show err)
19 Left err -> error (show err)
20 Right tipe -> do scheme <- generalize [] (Forall [] [] tipe)
20 Right tipe -> do scheme <- generalize [] (Forall [] [] tipe)
21 return (name, scheme)
21 return (name, scheme)