don't truncate error messages so much
authorAnders Mörtberg <andersmortberg@gmail.com>
Sun, 10 Jun 2018 17:20:54 +0000 (13:20 -0400)
committerAnders Mörtberg <andersmortberg@gmail.com>
Sun, 10 Jun 2018 17:20:54 +0000 (13:20 -0400)
Main.hs

diff --git a/Main.hs b/Main.hs
index ab8d6d3821bbf0c265c410da57589bb9233f7f48..8d62190551921cebdb7cfb744ab7522e04f5f62b 100644 (file)
--- a/Main.hs
+++ b/Main.hs
@@ -90,8 +90,10 @@ initLoop :: [Flag] -> FilePath -> History -> IO ()
 initLoop flags f hist = do
   -- Parse and type check files
   (_,_,mods) <- E.catch (imports True ([],[],[]) f)
-                        (\e -> do putStrLn ("Exception: " ++ takeWhile (/='\n')
-                                           (show (e :: SomeException)))
+                        (\e -> do putStrLn $ unlines $
+                                    ("Exception: " :
+                                     (takeWhile (/= "CallStack (from HasCallStack):")
+                                                   (lines $ show (e :: SomeException))))
                                   return ([],[],[]))
   -- Translate to TT
   let res = runResolver $ resolveModules mods