on master help sign in
Move source location to first line of type error message
commitcfaeff971e5a549f2121aaa12901e5991acb6f45 authorEvan Czaplicki <info@elm-lang.org> dateWed 3 Dec 2014, 15:54 (12 years ago) parent629a71d
1 file changed+2−2
src/Type/State.hs+2−2
src/Type/State.hs+2−2
@@ -79,14 +79,14 @@ addError region hint t1 t2 =
7979 t1' <- pretty <$> toSrcType t1
8080 t2' <- pretty <$> toSrcType t2
8181 return . foldr ($+$) P.empty $
82− [ P.text "Type mismatch between the following types:"
82+ [ P.text "Type mismatch between the following types" <+> pretty region <> P.text ":"
8383 , P.text ""
8484 , P.nest 8 t1'
8585 , P.text ""
8686 , P.nest 8 t2'
8787 , P.text ""
8888 , maybe P.empty (P.nest 4 . P.text) hint
89− , P.text " It is related to the expression" <+> pretty region
89+ , P.text " It is related to the following expression:"
9090 , P.text ""
9191 , P.nest 8 $ A.getRegionDocs region
9292 ]