mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-11-30 13:57:20 +03:00
Checkpoint
This commit is contained in:
parent
111904d453
commit
6f23c7b08d
@ -176,7 +176,7 @@ instance PP ModuleError where
|
||||
|
||||
NoIncludeErrors _src errs -> vcat (map NoInc.ppIncludeError errs)
|
||||
|
||||
TypeCheckingFailed _src errs -> vcat (map T.ppError errs)
|
||||
TypeCheckingFailed _src errs -> T.ppErrors errs
|
||||
|
||||
ModuleNameMismatch expected found ->
|
||||
hang (text "[error]" <+> pp (P.srcRange found) <.> char ':')
|
||||
@ -279,7 +279,7 @@ data ModuleWarning
|
||||
|
||||
instance PP ModuleWarning where
|
||||
ppPrec _ w = case w of
|
||||
TypeCheckWarnings ws -> vcat (map T.ppWarning ws)
|
||||
TypeCheckWarnings ws -> T.ppWarnings ws
|
||||
RenamerWarnings ws -> vcat (map pp ws)
|
||||
|
||||
warn :: [ModuleWarning] -> ModuleM ()
|
||||
|
@ -19,8 +19,10 @@ module Cryptol.TypeCheck
|
||||
, nameSeeds
|
||||
, Error(..)
|
||||
, Warning(..)
|
||||
, ppWarning
|
||||
, ppError
|
||||
-- , ppWarning
|
||||
-- , ppError
|
||||
, ppWarnings
|
||||
, ppErrors
|
||||
) where
|
||||
|
||||
import Cryptol.ModuleSystem.Name
|
||||
@ -121,4 +123,8 @@ ppWarning (r,w) = text "[warning] at" <+> pp r <.> colon $$ nest 2 (pp w)
|
||||
ppError :: (Range,Error) -> Doc
|
||||
ppError (r,w) = text "[error] at" <+> pp r <.> colon $$ nest 2 (pp w)
|
||||
|
||||
ppWarnings :: [(Range,Warning)] -> Doc
|
||||
ppWarnings = vcat . map ppWarning
|
||||
|
||||
ppErrors :: [(Range,Error)] -> Doc
|
||||
ppErrors = vcat . map ppError
|
||||
|
@ -36,7 +36,7 @@ main =
|
||||
print (pp prog)
|
||||
InferFailed ws errs ->
|
||||
do mapM_ (print . TC.ppWarning IMap.empty) ws
|
||||
mapM_ (print . TC.ppError IMap.empty) errs
|
||||
print (TC.ppErrors errs)
|
||||
(_,errs) -> hPrint stderr $ vcat $ map pp errs
|
||||
|
||||
where
|
||||
|
Loading…
Reference in New Issue
Block a user