errorful parser

small
This commit is contained in:
crumbtoo committed 2024-01-22 10:14:30 -07:00
1 parent 5a659d22dd
commit c146e1c450
3 files changed
+10 -5

No files matched your search

+4
View File
@@ -26,6 +26,7 @@ data MsgEnvelope e = MsgEnvelope
, _msgDiagnostic :: e
, _msgSeverity :: Severity
}
deriving Functor
newtype RlpcError = Text [Text]
deriving Show
@@ -55,3 +56,6 @@ liftRlpcErrors :: (Functor m, IsRlpcError e)
-> ErrorfulT RlpcError m a
liftRlpcErrors = mapErrorful liftRlpcError
instance (IsRlpcError e) => IsRlpcError (MsgEnvelope e) where
liftRlpcError msg = msg ^. msgDiagnostic & liftRlpcError