Portability | portable |
---|---|
Stability | experimental |
Maintainer | Drew Day <drewday@gmail.com> |
Safe Haskell | Safe-Infered |
Alib
Contents
Description
Code adapted from: http://web.engr.oregonstate.edu/~erwig/meta/
Documentation (and further updates in technique) forthcoming.
- cRose :: a
- dRose :: a
- nat :: SymA I Int
- evn :: SymA I Int
- halves :: SymA I Int
- nat2 :: (IxI -> Bool) -> (IxI -> IxI) -> A () (II Int) IxI
- rng :: A (I Int) (II Int) Int
- rng' :: A () (II Int) Int
- count :: A (II a Int) I Int
- prod :: A (II Int Int) I Int
- summ :: A (II Int Int) I Int
- bool :: BinA Bool Bool
- boolAnd :: BinA Bool Bool
- set :: (Num a, Eq a) => BinA a [a]
- list :: BinA a [a]
- queue :: BinA a [a]
- pqueue :: Ord a => BinA a [a]
- pqueueH :: Ord a => BinA a (Heap a)
- jPqueueH :: Ord a => JoinA a Heap
- jQueue :: JoinA a []
- jList :: JoinA a []
- jPqueue :: Ord a => JoinA a []
- bag :: Ord a => BinA a (FiniteMap a Int)
- arr :: Ord i => (a -> a -> a) -> BinA (i, a) (FiniteMap i a)
- fork :: Ord a => A (II a [a]) (IIV [a]) [a]
- final :: A (II a (Maybe a)) Id (Maybe a)
- combine :: A (IIV [a] [a]) (II a) [a]
- tree :: SymA (IIV a) (Tree a)
- rose :: SymA (Power a) (Rose a)
- graph :: BinA (Context a b) (Graph a b)
- type LinGraph a b = II (Context a b) (Graph a b)
- cGraph :: LinGraph a b -> Graph a b
- stack :: BinA a [a]
- jStack :: JoinA a []
- sel :: (a -> a -> Bool) -> [a] -> [a]
- rest :: Eq a => [a] -> [a]
- append213 :: [a] -> [a] -> [a] -> [a]
- accum :: Ord o => (a -> a -> a) -> (o, a) -> FiniteMap o a -> FiniteMap o a
- add :: (Ord o, Num a) => o -> FiniteMap o a -> FiniteMap o a
- split_bag :: (Ord o, Eq a, Num a) => FiniteMap o a -> (o, FiniteMap o a)
- split_arr :: Ord o => FiniteMap o a -> ((o, a), FiniteMap o a)
- cNat :: I Int -> Int
- dNat :: Int -> I Int
- cList :: II a [a] -> [a]
- dList :: [a] -> II a [a]
- dPqueue :: Ord a => [a] -> II a [a]
- dPqueueH :: Ord a => Heap a -> II a (Heap a)
- cProd :: II Int Int -> Int
- dProd :: Int -> II Int Int
- type IxI = (Int, Int)
- data Rose a
- type Forest a = [Rose a]
- forest' :: PowA a (Rose a)
- forest :: A (Id [Rose a]) (II [a]) [Rose a]
- isNull :: Rose a -> Bool
- cut :: Rose a -> (a, [Rose a])
- root :: Rose a -> a
- kids :: Rose t -> [Rose t]
- bufGraph :: JoinA c f -> (c -> Node) -> (c -> Context a b -> [c]) -> A () (II (MContext a b)) (f c, Graph a b)
- q1 :: (t, x, y, z) -> t
- q2 :: (t, x, y, z) -> x
- q23 :: (t, x, y, z) -> (x, y)
- q4 :: (t, x, y, z) -> z
- o :: (b1 -> c) -> (a -> b -> b1) -> a -> b -> c
- data NoK o
- (><) :: (t -> t2) -> (t1 -> t3) -> (t, t1) -> (t2, t3)
- (/\) :: (t2 -> t) -> (t2 -> t1) -> t2 -> (t, t1)
Constructors (Emitters) and Destructors (Absorbers) -- Functions
Familar Data Structures
22 data structures in 22 lines
Helpers (Selectors, Appends (with swap))
Helpers (Accumulation and Splitting)
Constructors (Emitters) and Destructors (Absorbers) -- Type Signatures
Rose Trees
Rose Tree Smart Constructors
Linear Graphs (not really complete)
bufGraph :: JoinA c f -> (c -> Node) -> (c -> Context a b -> [c]) -> A () (II (MContext a b)) (f c, Graph a b)Source
Utilities
o :: (b1 -> c) -> (a -> b -> b1) -> a -> b -> cSource
curried composition
o :: forall a f g b. (b -> a) -> (f -> g -> b) -> f -> g -> a