diff options
Diffstat (limited to 'lib/Data/Packed/Internal/Common.hs')
-rw-r--r-- | lib/Data/Packed/Internal/Common.hs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/Data/Packed/Internal/Common.hs b/lib/Data/Packed/Internal/Common.hs index 2310f5f..879dade 100644 --- a/lib/Data/Packed/Internal/Common.hs +++ b/lib/Data/Packed/Internal/Common.hs | |||
@@ -60,6 +60,44 @@ ww2 w1 o1 w2 o2 f = w1 o1 $ \a1 -> w2 o2 $ \a2 -> f a1 a2 | |||
60 | ww3 w1 o1 w2 o2 w3 o3 f = w1 o1 $ \a1 -> ww2 w2 o2 w3 o3 (f a1) | 60 | ww3 w1 o1 w2 o2 w3 o3 f = w1 o1 $ \a1 -> ww2 w2 o2 w3 o3 (f a1) |
61 | ww4 w1 o1 w2 o2 w3 o3 w4 o4 f = w1 o1 $ \a1 -> ww3 w2 o2 w3 o3 w4 o4 (f a1) | 61 | ww4 w1 o1 w2 o2 w3 o3 w4 o4 f = w1 o1 $ \a1 -> ww3 w2 o2 w3 o3 w4 o4 (f a1) |
62 | 62 | ||
63 | type Adapt f t r = t -> ((f -> r) -> IO()) -> IO() | ||
64 | |||
65 | app1 :: f | ||
66 | -> Adapt f t (IO CInt) | ||
67 | -> t | ||
68 | -> String | ||
69 | -> IO() | ||
70 | |||
71 | app2 :: f | ||
72 | -> Adapt f t1 r | ||
73 | -> t1 | ||
74 | -> Adapt r t2 (IO CInt) | ||
75 | -> t2 | ||
76 | -> String | ||
77 | -> IO() | ||
78 | |||
79 | app3 :: f | ||
80 | -> Adapt f t1 r1 | ||
81 | -> t1 | ||
82 | -> Adapt r1 t2 r2 | ||
83 | -> t2 | ||
84 | -> Adapt r2 t3 (IO CInt) | ||
85 | -> t3 | ||
86 | -> String | ||
87 | -> IO() | ||
88 | |||
89 | app4 :: f | ||
90 | -> Adapt f t1 r1 | ||
91 | -> t1 | ||
92 | -> Adapt r1 t2 r2 | ||
93 | -> t2 | ||
94 | -> Adapt r2 t3 r3 | ||
95 | -> t3 | ||
96 | -> Adapt r3 t4 (IO CInt) | ||
97 | -> t4 | ||
98 | -> String | ||
99 | -> IO() | ||
100 | |||
63 | app1 f w1 o1 s = w1 o1 $ \a1 -> f // a1 // check s | 101 | app1 f w1 o1 s = w1 o1 $ \a1 -> f // a1 // check s |
64 | app2 f w1 o1 w2 o2 s = ww2 w1 o1 w2 o2 $ \a1 a2 -> f // a1 // a2 // check s | 102 | app2 f w1 o1 w2 o2 s = ww2 w1 o1 w2 o2 $ \a1 a2 -> f // a1 // a2 // check s |
65 | app3 f w1 o1 w2 o2 w3 o3 s = ww3 w1 o1 w2 o2 w3 o3 $ | 103 | app3 f w1 o1 w2 o2 w3 o3 s = ww3 w1 o1 w2 o2 w3 o3 $ |