Skip to content

Commit f7f0faf

Browse files
Rename BaseDecodeError => DecodeErrorKind
1 parent 591ff8c commit f7f0faf

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/KDL/Decoder/Internal/DecodeM.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ runDecodeM (DecodeM f) = f Left Left Right
7070
--
7171
-- This error is non-fatal and can be handled by '<|>'. See 'makeFatal'
7272
-- for more information.
73-
decodeThrow :: BaseDecodeError -> DecodeM a
73+
decodeThrow :: DecodeErrorKind -> DecodeM a
7474
decodeThrow e = DecodeM $ \_ onFail _ -> onFail $ DecodeError Nothing [([], e)]
7575

7676
-- | Throw a 'DecodeError_Custom' error.

src/KDL/Decoder/Internal/Error.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
module KDL.Decoder.Internal.Error (
99
DecodeError (..),
10-
BaseDecodeError (..),
10+
DecodeErrorKind (..),
1111
Context,
1212
ContextItem (..),
1313
renderDecodeError,
@@ -28,7 +28,7 @@ import KDL.Types (
2828

2929
data DecodeError = DecodeError
3030
{ filepath :: Maybe FilePath
31-
, errors :: [(Context, BaseDecodeError)]
31+
, errors :: [(Context, DecodeErrorKind)]
3232
}
3333
deriving (Show, Eq)
3434
instance Semigroup DecodeError where
@@ -51,7 +51,7 @@ data ContextItem
5151
}
5252
deriving (Show, Eq, Ord)
5353

54-
data BaseDecodeError
54+
data DecodeErrorKind
5555
= DecodeError_Custom Text
5656
| DecodeError_ParseError Text
5757
| DecodeError_ExpectedNode {name :: Text, index :: Int}

0 commit comments

Comments
 (0)