-ddump-ast

This commit is contained in:
crumbtoo
2024-02-01 11:37:52 -07:00
parent 46f0393a03
commit dda0e17358
7 changed files with 75 additions and 60 deletions

View File

@@ -10,6 +10,7 @@ module Compiler.RlpcError
, msgSeverity
, liftRlpcErrors
, errorMsg
, debugMsg
-- * Located Comonad
, Located(..)
, SrcSpan(..)
@@ -46,6 +47,7 @@ instance IsRlpcError RlpcError where
data Severity = SevWarning
| SevError
| SevDebug
deriving Show
makeLenses ''MsgEnvelope
@@ -65,3 +67,11 @@ errorMsg s e = MsgEnvelope
, _msgSeverity = SevError
}
debugMsg :: e -> MsgEnvelope e
debugMsg e = MsgEnvelope
-- TODO: not pretty, but it is a debug message after all
{ _msgSpan = SrcSpan 0 0 0 0
, _msgDiagnostic = e
, _msgSeverity = SevDebug
}