We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f7f0faf commit f29a37eCopy full SHA for f29a37e
1 file changed
src/KDL/Decoder/Internal/Error.hs
@@ -7,6 +7,7 @@
7
8
module KDL.Decoder.Internal.Error (
9
DecodeError (..),
10
+ BaseDecodeError,
11
DecodeErrorKind (..),
12
Context,
13
ContextItem (..),
@@ -28,14 +29,15 @@ import KDL.Types (
28
29
30
data DecodeError = DecodeError
31
{ filepath :: Maybe FilePath
- , errors :: [(Context, DecodeErrorKind)]
32
+ , errors :: [BaseDecodeError]
33
}
34
deriving (Show, Eq)
35
instance Semigroup DecodeError where
36
DecodeError fp1 e1 <> DecodeError fp2 e2 = DecodeError (fp1 <|> fp2) (e1 <> e2)
37
instance Monoid DecodeError where
38
mempty = DecodeError Nothing []
39
40
+type BaseDecodeError = (Context, DecodeErrorKind)
41
type Context = [ContextItem]
42
43
data ContextItem
0 commit comments