X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=test.icl;h=dddfbe1a6c9d7473d65aa7aee81aef0e21f935c6;hb=dd851e8574c37cad729a3ba3b4e64a548bb4422e;hp=6459207b3017032dc00225c4f19b598bdf8b6967;hpb=0ca0e0086ac4e1b0be40f820d213fcfcb7deec20;p=clean-tests.git diff --git a/test.icl b/test.icl index 6459207..dddfbe1 100644 --- a/test.icl +++ b/test.icl @@ -1,18 +1,20 @@ module test import StdEnv -from Data.Func import $ -import System.Directory -import System.Time -:: S s a = S .(s -> *(a, s)) -runS (S s) = s +import graph_copy_with_names, symbols_in_program +import System.CommandLine -(>>=) infixl 1 :: u:(S .a .b) v:(.b -> .(S .a .c)) -> w:(S .a .c), [w <= u,w <= v] -(>>=) ma a2mb = S \s - # (a, s) = runS ma s - = runS (a2mb a) s +test :: !{#Symbol} a -> a +test symbols a + # (a, b, c) = copy_to_string_with_names a + # (a, r) = copy_from_string_with_names a b c symbols + = a -Start world = flip runS world - $ (S time) - >>= \_->S (readDirectory "/home/mrl") +polyid :: (A.a: a -> a) -> (Int, Bool) +polyid f = (f 42, f True) + +Start w + # ([argv0:_], w) = getCommandLine w + # (symbols, w) = accFiles (read_symbols argv0) w + = test symbols (polyid id)