@@ -37,14 +37,14 @@ newtype Pos = Pos { fromPos :: Int }
3737--
3838-- This type is an instance of 'Functor', where 'fmap' transforms the
3939-- value in a 'Done' result.
40−data IResult i t r =
40+data IResult i r =
4141 Fail i [String] String
4242 -- ^ The parse failed. The @i@ parameter is the input that had
4343 -- not yet been consumed when the failure occurred. The
4444 -- @[@'String'@]@ is a list of contexts in which the error
4545 -- occurred. The 'String' is the message describing the error, if
4646 -- any.
47− | Partial (i -> IResult i t r)
47+ | Partial (i -> IResult i r)
4848 -- ^ Supply this continuation with more input so that the parser
4949 -- can resume. To indicate that no more input is available, pass
5050 -- an empty string to the continuation.
@@ -55,19 +55,19 @@ data IResult i t r =
5555 -- ^ The parse succeeded. The @i@ parameter is the input that had
5656 -- not yet been consumed (if any) when the parse succeeded.
5757
58−instance (Show i, Show r) => Show (IResult i t r) where
58+instance (Show i, Show r) => Show (IResult i r) where
5959 show (Fail t stk msg) =
6060 unwords [ "Fail", show t, show stk, show msg]
6161 show (Partial _) = "Partial _"
6262 show (Done t r) = unwords ["Done", show t, show r]
6363
64−instance (NFData i, NFData r) => NFData (IResult i t r) where
64+instance (NFData i, NFData r) => NFData (IResult i r) where
6565 rnf (Fail t stk msg) = rnf t `seq` rnf stk `seq` rnf msg
6666 rnf (Partial _) = ()
6767 rnf (Done t r) = rnf t `seq` rnf r
6868 {-# INLINE rnf #-}
6969
70−instance Functor (IResult i t) where
70+instance Functor (IResult i) where
7171 fmap _ (Fail t stk msg) = Fail t stk msg
7272 fmap f (Partial k) = Partial (fmap f . k)
7373 fmap f (Done t r) = Done t (f r)
@@ -94,12 +94,12 @@ newtype Parser i t a = Parser {
9494 runParser :: forall r. t -> Pos -> More
9595 -> Failure i t r
9696 -> Success i t a r
97− -> IResult i t r
97+ -> IResult i r
9898 }
9999
100100type Failure i t r = t -> Pos -> More -> [String] -> String
101− -> IResult i t r
102−type Success i t a r = t -> Pos -> More -> a -> IResult i t r
101+ -> IResult i r
102+type Success i t a r = t -> Pos -> More -> a -> IResult i r
103103
104104-- | Have we read all available input?
105105data More = Complete | Incomplete