Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data RTuple a = RTuple {
- fromRTuple :: a
- data TList t a = TList {
- fromTList :: a
- class ShowRtup r where
- type family HeadOf a
- class Head a where
- type family TailOf a
- class Tail a where
- class UncurryTuple f out | f -> out where
- uncurryTuple :: f -> out
- type family AsRTuple a
- type family AsTListData t a
- type AsTList t lst = TList t (AsTListData t lst)
- type family AsTuple a
- class ToTuple a lst | a -> lst where
- toTuple :: a -> lst
- type family ElTypeAt idx a
- class ElAt idx a where
- class ElAt' idx t where
Documentation
RTuple | |
|
(ElAt ((-) n 1) (RTuple rs), (~) * (ElTypeAt n (RTuple (r, rs))) (ElTypeAt ((-) n 1) (RTuple rs))) => ElAt n (RTuple (r, rs)) Source | |
ElAt 0 (RTuple (r, rs)) Source | |
Eq a => Eq (RTuple a) Source | |
Ord a => Ord (RTuple a) Source | |
ShowRtup a => Show (RTuple a) Source | |
Wrapped (RTuple a) Source | |
Tail (RTuple (r, rs)) Source | |
Head (RTuple (r, rs)) Source | |
ToTuple (RTuple ()) () Source | |
ToTuple (RTuple (t1, ())) t1 Source | |
ToTuple (RTuple (t1, (t2, ()))) (t1, t2) Source | |
ToTuple (RTuple (t1, (t2, (t3, ())))) (t1, t2, t3) Source | |
ToTuple (RTuple (t1, (t2, (t3, (t4, ()))))) (t1, t2, t3, t4) Source | |
ToTuple (RTuple (t1, (t2, (t3, (t4, (t5, ())))))) (t1, t2, t3, t4, t5) Source | |
ToTuple (RTuple (t1, (t2, (t3, (t4, (t5, (t6, ()))))))) (t1, t2, t3, t4, t5, t6) Source | |
ToTuple (RTuple (t1, (t2, (t3, (t4, (t5, (t6, (t7, ())))))))) (t1, t2, t3, t4, t5, t6, t7) Source | |
ToTuple (RTuple (t1, (t2, (t3, (t4, (t5, (t6, (t7, (t8, ()))))))))) (t1, t2, t3, t4, t5, t6, t7, t8) Source | |
ToTuple (RTuple (t1, (t2, (t3, (t4, (t5, (t6, (t7, (t8, (t9, ())))))))))) (t1, t2, t3, t4, t5, t6, t7, t8, t9) Source | |
ToTuple (RTuple (t1, (t2, (t3, (t4, (t5, (t6, (t7, (t8, (t9, (t10, ()))))))))))) (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) Source | |
ToTuple (RTuple (t1, (t2, (t3, (t4, (t5, (t6, (t7, (t8, (t9, (t10, (t11, ())))))))))))) (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) Source | |
ToTuple (RTuple (t1, (t2, (t3, (t4, (t5, (t6, (t7, (t8, (t9, (t10, (t11, (t12, ()))))))))))))) (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) Source | |
UncurryTuple (RTuple () -> a) a Source | |
UncurryTuple (RTuple xs -> f) fout => UncurryTuple (RTuple (x, xs) -> f) (x -> fout) Source | |
type ElTypeAt n (RTuple (r, rs)) = If * ((:==) Nat n 0) r (ElTypeAt ((-) n 1) (RTuple rs)) Source | |
type Unwrapped (RTuple a) = a Source | |
type AsTuple (RTuple ()) = () Source | |
type AsTuple (RTuple (t1, ())) = t1 Source | |
type TailOf (RTuple (r, rs)) = RTuple rs Source | |
type HeadOf (RTuple (r, rs)) = r Source |
(ElAt ((-) n 1) (TList t rs), (~) * (ElTypeAt n (TList t (r, rs))) (ElTypeAt ((-) n 1) (TList t rs))) => ElAt n (TList t (r, rs)) Source | |
(~) * t r => ElAt 0 (TList t (r, rs)) Source | |
Eq a => Eq (TList t a) Source | |
Ord a => Ord (TList t a) Source | |
Wrapped (TList t a) Source | |
Tail (TList a (r, rs)) Source | |
(~) * a r => Head (TList a (r, rs)) Source | |
type ElTypeAt n (TList t lst) = t Source | |
type Unwrapped (TList t a) = a Source | |
type TailOf (TList a (r, rs)) = TList a rs Source | |
type HeadOf (TList a l) = a Source |
class UncurryTuple f out | f -> out where Source
converts function taking a tuple list as argument into standard haskell one eg. `(a,(b,(c,()))) -> out` into `a -> b -> c -> out`
uncurryTuple :: f -> out Source
UncurryTuple (RTuple () -> a) a Source | |
UncurryTuple (RTuple xs -> f) fout => UncurryTuple (RTuple (x, xs) -> f) (x -> fout) Source |
type family AsTListData t a Source
type AsTListData [*] t ([] *) = () Source | |
type AsTListData [*] t ((:) * l ls) = (t, Unwrapped (AsTList [*] t ls)) Source |
type AsTList t lst = TList t (AsTListData t lst) Source
class ToTuple a lst | a -> lst where Source
ToTuple (RTuple ()) () Source | |
ToTuple (RTuple (t1, ())) t1 Source | |
ToTuple (RTuple (t1, (t2, ()))) (t1, t2) Source | |
ToTuple (RTuple (t1, (t2, (t3, ())))) (t1, t2, t3) Source | |
ToTuple (RTuple (t1, (t2, (t3, (t4, ()))))) (t1, t2, t3, t4) Source | |
ToTuple (RTuple (t1, (t2, (t3, (t4, (t5, ())))))) (t1, t2, t3, t4, t5) Source | |
ToTuple (RTuple (t1, (t2, (t3, (t4, (t5, (t6, ()))))))) (t1, t2, t3, t4, t5, t6) Source | |
ToTuple (RTuple (t1, (t2, (t3, (t4, (t5, (t6, (t7, ())))))))) (t1, t2, t3, t4, t5, t6, t7) Source | |
ToTuple (RTuple (t1, (t2, (t3, (t4, (t5, (t6, (t7, (t8, ()))))))))) (t1, t2, t3, t4, t5, t6, t7, t8) Source | |
ToTuple (RTuple (t1, (t2, (t3, (t4, (t5, (t6, (t7, (t8, (t9, ())))))))))) (t1, t2, t3, t4, t5, t6, t7, t8, t9) Source | |
ToTuple (RTuple (t1, (t2, (t3, (t4, (t5, (t6, (t7, (t8, (t9, (t10, ()))))))))))) (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) Source | |
ToTuple (RTuple (t1, (t2, (t3, (t4, (t5, (t6, (t7, (t8, (t9, (t10, (t11, ())))))))))))) (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) Source | |
ToTuple (RTuple (t1, (t2, (t3, (t4, (t5, (t6, (t7, (t8, (t9, (t10, (t11, (t12, ()))))))))))))) (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) Source |
(ElAt ((-) n 1) (RTuple rs), (~) * (ElTypeAt n (RTuple (r, rs))) (ElTypeAt ((-) n 1) (RTuple rs))) => ElAt n (RTuple (r, rs)) Source | |
ElAt 0 (RTuple (r, rs)) Source | |
(ElAt ((-) n 1) (TList t rs), (~) * (ElTypeAt n (TList t (r, rs))) (ElTypeAt ((-) n 1) (TList t rs))) => ElAt n (TList t (r, rs)) Source | |
(~) * t r => ElAt 0 (TList t (r, rs)) Source |