more structured format for errors and warnings from the compiler

This commit is contained in:
kr.angelov
2011-11-15 13:33:44 +00:00
parent 9b482722c3
commit 48558197a8
8 changed files with 110 additions and 105 deletions

View File

@@ -38,7 +38,7 @@ getSourceModule opts file0 = ioe $
case runP pModDef content of
Left (Pn l c,msg) -> do file <- writeTemp tmp
let location = file++":"++show l++":"++show c
return (Bad (location++": "++msg))
return (Bad (location++":\n "++msg))
Right (i,mi) -> do removeTemp tmp
return (Ok (i,mi{mflags=mflags mi `addOptions` opts, msrc=file0}))
`catch` (return . Bad . show)