@@ -16,8 +16,10 @@ import qualified AST.Canonical as Can
16import qualified Elm.Name as N
16import qualified Elm.Name as N
17import qualified Reporting.Annotation as A
17import qualified Reporting.Annotation as A
18import qualified Reporting.Error.Type as Error
18import qualified Reporting.Error.Type as Error
19+import qualified Reporting.Render.Type as RT
19import qualified Type.Occurs as Occurs
20import qualified Type.Occurs as Occurs
20import Type.Type as Type
21import Type.Type as Type
22+import qualified Type.Error as ET
21import qualified Type.Unify as Unify
23import qualified Type.Unify as Unify
22import qualified Type.UnionFind as UF
24import qualified Type.UnionFind as UF
@@ -211,10 +213,13 @@ isGeneric var =
211 if rank == noRank
213 if rank == noRank
212 then return ()
214 then return ()
216+ do tipe <- Type.toErrorType var
215− "You ran into a compiler bug!\n\n\
218+ "You ran into a compiler bug. Here are some details for the developers:\n\n"
216− \I was unable to generalize a type variable during type inference. It was ranked.\n\n\
219+ ++ " " ++ show (ET.toDoc Map.empty RT.None tipe) ++ " [rank = " ++ show rank ++ "]\n\n"
221+ "Please create an <http://sscce.org/> and then report it\n\
217− \Please create an <http://sscce.org/> and report it at <https://github.com/elm-lang/elm-compiler/issues>\n\n"
222+ \at <https://github.com/elm-lang/elm-compiler/issues>\n\n"