Portability | portable |
---|---|
Stability | experimental |
Maintainer | conal@conal.net |
Safe Haskell | Safe-Infered |
"Deep arrows" as a data type. Handy for code generation.
- data DArrow where
- Arr :: DVal (a -> b) -> a `DArrow` b
- Compose :: (a `DArrow` b) -> (b `DArrow` c) -> a `DArrow` c
- First :: (a `DArrow` a') -> (a, b) `DArrow` (a', b)
- Second :: (b `DArrow` b') -> (a, b) `DArrow` (a, b')
- Result :: (b `DArrow` b') -> (a -> b) `DArrow` (a -> b')
- FunF :: (c -> a, b) `DArrow` (c -> (a, b))
- FunS :: (a, c -> b) `DArrow` (c -> (a, b))
- FunR :: (a -> c -> b) `DArrow` (c -> a -> b)
- CurryA :: ((a, b) -> c) `DArrow` (a -> b -> c)
- UncurryA :: (a -> b -> c) `DArrow` ((a, b) -> c)
- LAssocA :: (a, (b, c)) `DArrow` ((a, b), c)
- RAssocA :: ((a, b), c) `DArrow` (a, (b, c))
- IdA :: a `DArrow` a
- DupA :: a `DArrow` (a, a)
- FstA :: (a, b) `DArrow` a
- SndA :: (a, b) `DArrow` b
- SwapA :: (a, b) `DArrow` (b, a)
- data DVal where
The DeepArrow data type
Arr :: DVal (a -> b) -> a `DArrow` b | |
Compose :: (a `DArrow` b) -> (b `DArrow` c) -> a `DArrow` c | |
First :: (a `DArrow` a') -> (a, b) `DArrow` (a', b) | |
Second :: (b `DArrow` b') -> (a, b) `DArrow` (a, b') | |
Result :: (b `DArrow` b') -> (a -> b) `DArrow` (a -> b') | |
FunF :: (c -> a, b) `DArrow` (c -> (a, b)) | |
FunS :: (a, c -> b) `DArrow` (c -> (a, b)) | |
FunR :: (a -> c -> b) `DArrow` (c -> a -> b) | |
CurryA :: ((a, b) -> c) `DArrow` (a -> b -> c) | |
UncurryA :: (a -> b -> c) `DArrow` ((a, b) -> c) | |
LAssocA :: (a, (b, c)) `DArrow` ((a, b), c) | |
RAssocA :: ((a, b), c) `DArrow` (a, (b, c)) | |
IdA :: a `DArrow` a | |
DupA :: a `DArrow` (a, a) | |
FstA :: (a, b) `DArrow` a | |
SndA :: (a, b) `DArrow` b | |
SwapA :: (a, b) `DArrow` (b, a) |