License | BSD-3-Clause |
---|---|
Maintainer | Jamie Willis |
Stability | unstable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Since: 0.1.0.0
Synopsis
- data Parser a
- data CharPred
- data Defunc a where
- ID :: Defunc (a -> a)
- COMPOSE :: Defunc ((b -> c) -> (a -> b) -> a -> c)
- FLIP :: Defunc ((a -> b -> c) -> b -> a -> c)
- APP_H :: Defunc (a -> b) -> Defunc a -> Defunc b
- EQ_H :: Eq a => Defunc a -> Defunc (a -> Bool)
- LIFTED :: (Show a, Lift a, Typeable a) => a -> Defunc a
- CONS :: Defunc (a -> [a] -> [a])
- CONST :: Defunc (a -> b -> a)
- EMPTY :: Defunc [a]
- BLACK :: WQ a -> Defunc a
- RANGES :: Bool -> [(Char, Char)] -> Defunc (Char -> Bool)
- IF_S :: Defunc Bool -> Defunc a -> Defunc a -> Defunc a
- LAM_S :: (Defunc a -> Defunc b) -> Defunc (a -> b)
- LET_S :: Defunc a -> (Defunc a -> Defunc b) -> Defunc b
- pattern UNIT :: Defunc ()
- pattern FLIP_CONST :: () => x ~ (a -> b -> b) => Defunc x
- pattern FLIP_H :: () => (x -> y) ~ ((a -> b -> c) -> b -> a -> c) => Defunc x -> Defunc y
- pattern COMPOSE_H :: () => (x -> y -> z) ~ ((b -> c) -> (a -> b) -> a -> c) => Defunc x -> Defunc y -> Defunc z
- charPred :: Defunc (Char -> Bool) -> CharPred
- module Parsley.Internal.Core.InputTypes
Documentation
Represents Char -> Bool
functions, potentially in a more inspectable way.
Since: 2.1.0.0
This datatype is useful for providing an inspectable representation of common Haskell functions.
These can be provided in place of WQ
to any combinator that requires it. The only difference is
that the Parsley compiler is able to manipulate and match on the constructors, which might lead to
optimisations. They can also be more convenient than constructing the WQ
object itself:
ID ~= WQ id [||id||] APP_H f x ~= WQ (f x) [||f x||]
Since: 0.1.0.0
ID :: Defunc (a -> a) | Corresponds to the standard |
COMPOSE :: Defunc ((b -> c) -> (a -> b) -> a -> c) | Corresponds to the standard |
FLIP :: Defunc ((a -> b -> c) -> b -> a -> c) | Corresponds to the standard |
APP_H :: Defunc (a -> b) -> Defunc a -> Defunc b | Corresponds to function application of two other |
EQ_H :: Eq a => Defunc a -> Defunc (a -> Bool) | Corresponds to the partially applied |
LIFTED :: (Show a, Lift a, Typeable a) => a -> Defunc a | Represents a liftable, showable, typable value. |
CONS :: Defunc (a -> [a] -> [a]) | Represents the standard |
CONST :: Defunc (a -> b -> a) | Represents the standard |
EMPTY :: Defunc [a] | Represents the empty list |
BLACK :: WQ a -> Defunc a | Wraps up any value of type |
RANGES | Designed to be a specialised form of character predicate: is a character within some given ranges (which are inclusive at both ends). Since: 2.0.0.0 |
IF_S :: Defunc Bool -> Defunc a -> Defunc a -> Defunc a | Represents the regular Haskell Since: 0.1.1.0 |
LAM_S :: (Defunc a -> Defunc b) -> Defunc (a -> b) | Represents a Haskell lambda abstraction. Since: 0.1.1.0 |
LET_S :: Defunc a -> (Defunc a -> Defunc b) -> Defunc b | Represents a Haskell let binding. Since: 0.1.1.0 |
pattern FLIP_CONST :: () => x ~ (a -> b -> b) => Defunc x Source #
Represents the flipped standard const
function applied to no arguments.
Since: 0.1.0.0
pattern FLIP_H :: () => (x -> y) ~ ((a -> b -> c) -> b -> a -> c) => Defunc x -> Defunc y Source #
This pattern corresponds to the standard flip
function applied to a single argument.
Since: 0.1.0.0
pattern COMPOSE_H :: () => (x -> y -> z) ~ ((b -> c) -> (a -> b) -> a -> c) => Defunc x -> Defunc y -> Defunc z Source #
This pattern represents fully applied composition of two Defunc
values.
Since: 0.1.0.0