Portability | non-portable (GADTs, GeneralizedNewtypeDeriving) |
---|---|
Stability | unstable |
Maintainer | Marco Túlio Pimenta Gontijo <marcotmarcot@gmail.com> |
Safe Haskell | None |
- newtype ChuchuParser a = ChuchuParser (Parser a)
- type Chuchu m = ChuchuM m ()
- data ChuchuM m a where
- Given :: ChuchuParser a -> (a -> m ()) -> ChuchuM m ()
- When :: ChuchuParser a -> (a -> m ()) -> ChuchuM m ()
- Then :: ChuchuParser a -> (a -> m ()) -> ChuchuM m ()
- And :: ChuchuParser a -> (a -> m ()) -> ChuchuM m ()
- But :: ChuchuParser a -> (a -> m ()) -> ChuchuM m ()
- runChuchu :: ChuchuM m a -> Parser (m ())
Documentation
newtype ChuchuParser a Source
newtype
for Parsec's Parser
used on this library. The
main reason for not using Parser
directly is to be able to
define the IsString
instance.
ChuchuParser (Parser a) |
type Chuchu m = ChuchuM m ()Source
The most common use case where the return value of the Monad is ignored.
The Monad on which the step rules are constructed. Given
, When
,
Then
, And
and But
are interpreted in the same way by the program. All
of them receive a parser and an action to run if the parser finishes
correctly.
Given :: ChuchuParser a -> (a -> m ()) -> ChuchuM m () | |
When :: ChuchuParser a -> (a -> m ()) -> ChuchuM m () | |
Then :: ChuchuParser a -> (a -> m ()) -> ChuchuM m () | |
And :: ChuchuParser a -> (a -> m ()) -> ChuchuM m () | |
But :: ChuchuParser a -> (a -> m ()) -> ChuchuM m () |