@@ -4,8 +4,7 @@ module Reporting.Error.Json
4 ( Error(..)
4 ( Error(..)
5 , Problem(..)
5 , Problem(..)
6 , DecodeExpectation(..)
6 , DecodeExpectation(..)
7− , ParseExpectation(..)
7+ , ParseError(..)
@@ -14,7 +13,6 @@ module Reporting.Error.Json
14import qualified Data.Utf8 as Utf8
13import qualified Data.Utf8 as Utf8
15import Data.Word (Word16)
14import Data.Word (Word16)
17−import qualified Parse.Primitives as P
18import qualified Reporting.Report as Report
16import qualified Reporting.Report as Report
@@ -24,7 +22,7 @@ import qualified Reporting.Report as Report
25data Error e
23data Error e
26 = DecodeProblem (Problem e)
24 = DecodeProblem (Problem e)
27− | ParseProblem Word16 Word16 (P.Context Context) ParseExpectation
25+ | ParseProblem ParseError
@@ -50,32 +48,32 @@ data DecodeExpectation
53−-- PARSE EXPECTATION
51+-- PARSE ERROR
56−data ParseExpectation
54+data ParseError
55+ = PIndex Int ParseError Row Col
56+ | PField Utf8.String ParseError Row Col
57− = ObjectStart
57+ | ObjectStart Row Col
58− | ObjectMore
58+ | ObjectMore Row Col
59− | ObjectEnd
59+ | ObjectEnd Row Col
60− | ArrayStart
60+ | ArrayStart Row Col
61− | ArrayMore
61+ | ArrayMore Row Col
62− | ArrayEnd
62+ | ArrayEnd Row Col
63− | StringStart
63+ | StringStart Row Col
64− | StringEnd
64+ | StringEnd Row Col
65− | IntStart
65+ | IntStart Row Col
66− | NoLeadingZeros
66+ | NoLeadingZeros Row Col
67− | NoFloats
67+ | NoFloats Row Col
68− | Bool
68+ | Bool Row Col
69− | Null
69+ | Null Row Col
70− | Value
70+ | Value Row Col
71− | Colon
71+ | Colon Row Col
72− | EndOfFile
72+ | EndOfFile Row Col
76−data Context
76+type Col = Word16
@@ -331,4 +329,4 @@ indexToName :: Int -> String
331indexToName index =
329indexToName index =
332 "[" ++ show index ++ "]"
330 "[" ++ show index ++ "]"