Copyright | (c) Edward Kmett, Dan Doel 2012-2013 |
---|---|
License | BSD3 |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Smart builders for convenient building of patterns.
- data Binder v a = Binder {}
- note :: Binder v v -> Binder v v
- noted :: v -> Binder v v
- type P t v = Binder v (Pattern t)
- varp :: v -> P (Annot t) v
- sigp :: v -> t -> P t v
- _p :: P t v
- strictp :: P t v -> P t v
- lazyp :: P t v -> P t v
- asp :: v -> P t v -> P t v
- conp :: Global -> [P t v] -> P t v
- litp :: Literal -> P t v
- alt :: (Monad f, Eq v) => P t v -> Guarded (f v) -> Alt t f v
Documentation
Bitraversable Binder | |
Bifunctor Binder | |
Bifoldable Binder | |
((~) (* -> * -> *) p (Tagged *), (~) (* -> *) f Identity, Tup (Tagged *) Identity t) => Tup p f (Binder v t) | |
Functor (Binder v) | |
Applicative (Binder v) | |
Foldable (Binder v) | |
Traversable (Binder v) | |
Comonad (Binder v) | |
(Eq v, Eq a) => Eq (Binder v a) | |
(Ord v, Ord a) => Ord (Binder v a) | |
(Read v, Read a) => Read (Binder v a) | |
(Show v, Show a) => Show (Binder v a) | |
IsString s => IsString (P (Annot t) s) |
note :: Binder v v -> Binder v v Source
If the annotation and item types correspond, we can push the item onto the annotations
noted :: v -> Binder v v Source
Injects a value into a binder, placing the value in the annotations as well.
varp :: v -> P (Annot t) v Source
A pattern that binds a variable with (effectively) no type annotation.