packages feed

lio 0.11.4.0 → 0.11.4.1

raw patch · 4 files changed

+43/−43 lines, 4 files

Files

LIO/TCB/LObj.hs view
@@ -55,7 +55,6 @@ instance (Label l, Show t) => ShowTCB (LObj l t) where   showTCB (LObjTCB l t) = show t ++ " {" ++ show l ++ "}" -#include "TypeVals.hs"  -- | Class for lifting 'IO' actions. class GuardIO l io lio | l io -> lio where@@ -70,7 +69,27 @@   {-# INLINE guardIOTCB #-}; \   guardIOTCB guard io vals = guard >> ioTCB (io vals); \ }-TypesVals (GUARDIO)++GUARDIO(a1, \+      a1); \+GUARDIO(a1 -> a2, \+      a1 a2); \+GUARDIO(a1 -> a2 -> a3, \+      a1 a2 a3); \+GUARDIO(a1 -> a2 -> a3 -> a4, \+      a1 a2 a3 a4); \+GUARDIO(a1 -> a2 -> a3 -> a4 -> a5, \+      a1 a2 a3 a4 a5); \+GUARDIO(a1 -> a2 -> a3 -> a4 -> a5 -> a6, \+      a1 a2 a3 a4 a5 a6); \+GUARDIO(a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7, \+      a1 a2 a3 a4 a5 a6 a7); \+GUARDIO(a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8, \+      a1 a2 a3 a4 a5 a6 a7 a8); \+GUARDIO(a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9, \+      a1 a2 a3 a4 a5 a6 a7 a8 a9); \+GUARDIO(a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> a10, \+      a1 a2 a3 a4 a5 a6 a7 a8 a9 a10)  -- | This function can be used to turn an 'IO' function into an 'LIO' -- one.  The 'LIO' version expects a 'LObj' argument, and before
LIO/TCB/MLObj.hs view
@@ -216,8 +216,6 @@                      Priv p -> MLObj policy l a -> (l -> LIO l l) -> LIO l () modifyMLObjLabelP p (MLObjTCB ml _) = modifyMLabelP p ml -#include "TypeVals.hs"- -- | Takes a @'liftIO'@-like function and an @IO@ function of an -- arbitrary number of arguments (up to 10).  Applies the arguments to -- the @IO@ function, then passed the result to its argument funciton@@ -232,7 +230,27 @@   {-# INLINE labelIO #-}; \   labelIO f io vals = f $ io vals; \ }-TypesVals (WRAPIO)++WRAPIO(a1, \+      a1); \+WRAPIO(a1 -> a2, \+      a1 a2); \+WRAPIO(a1 -> a2 -> a3, \+      a1 a2 a3); \+WRAPIO(a1 -> a2 -> a3 -> a4, \+      a1 a2 a3 a4); \+WRAPIO(a1 -> a2 -> a3 -> a4 -> a5, \+      a1 a2 a3 a4 a5); \+WRAPIO(a1 -> a2 -> a3 -> a4 -> a5 -> a6, \+      a1 a2 a3 a4 a5 a6); \+WRAPIO(a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7, \+      a1 a2 a3 a4 a5 a6 a7); \+WRAPIO(a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8, \+      a1 a2 a3 a4 a5 a6 a7 a8); \+WRAPIO(a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9, \+      a1 a2 a3 a4 a5 a6 a7 a8 a9); \+WRAPIO(a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> a10, \+      a1 a2 a3 a4 a5 a6 a7 a8 a9 a10)  -- | The 'MLObj' equivalent of 'blessTCB' in -- "LIO.TCB.LObj#v:blessTCB".  Use this for conveniently providing
− LIO/TCB/TypeVals.hs
@@ -1,36 +0,0 @@-{-# LANGUAGE CPP #-}--#if 0-genTypesVals :: Int -> IO ()-genTypesVals n0 =-  putStrLn $ "#define TypesVals(macro) \\\n" ++ concatMap doit [1..n0]-  where doit n = "  macro(" ++ icl " -> " (as n) ++ ", \\\n" ++-                 "        " ++ icl " " (as n) ++ ")" ++-                 (if n < n0 then "; \\\n" else "\n")-        as n = map (\i -> "a" ++ show i) [1..n]-        icl _ [] = []-        icl s (h:t) = h ++ concatMap (\a -> s ++ a) t-#endif--#define TypesVals(macro) \-  macro(a1, \-        a1); \-  macro(a1 -> a2, \-        a1 a2); \-  macro(a1 -> a2 -> a3, \-        a1 a2 a3); \-  macro(a1 -> a2 -> a3 -> a4, \-        a1 a2 a3 a4); \-  macro(a1 -> a2 -> a3 -> a4 -> a5, \-        a1 a2 a3 a4 a5); \-  macro(a1 -> a2 -> a3 -> a4 -> a5 -> a6, \-        a1 a2 a3 a4 a5 a6); \-  macro(a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7, \-        a1 a2 a3 a4 a5 a6 a7); \-  macro(a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8, \-        a1 a2 a3 a4 a5 a6 a7 a8); \-  macro(a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9, \-        a1 a2 a3 a4 a5 a6 a7 a8 a9); \-  macro(a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> a10, \-        a1 a2 a3 a4 a5 a6 a7 a8 a9 a10)-
lio.cabal view
@@ -1,5 +1,5 @@ Name:           lio-Version:        0.11.4.0+Version:        0.11.4.1 Cabal-Version:  >= 1.8 Build-type:     Simple License:        GPL@@ -53,7 +53,6 @@   Extra-source-files:-  LIO/TCB/TypeVals.hs   examples/dclabel.hs   examples/gate.hs   examples/waitAndCatch.hs