errorful parser
small
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user