module test
-import Data.Func
-import qualified Data.Map as DM
-import iTasks
+import StdEnv
-/*
-Start w = doTasksWithOptions
-// (\a o->Ok o)
- (\a o->Ok {o & autoLayout=False})
- (parallel
- [(Embedded, tab "tab1")
- ,(Embedded, tab "tab2")
- ]
- [ OnAction (Action "New") (always (Embedded, tab "New tab"))
- , OnAction (Action " ") (always (Embedded, tab "New tab"))
- , OnAction (Action "Close") (never (Embedded, \_->treturn ()))
- , OnAction (Action "Dis no icon") (never (Embedded, \_->treturn ()))
- , OnAction (Action "+") (always (Embedded, \_->treturn ()))
- ]
-// <<@ ArrangeWithTabs True
- <<@ ApplyLayout (setActionIcon ('DM'.put " " "new" 'DM'.newMap))
- ) w
+import graph_copy_with_names, symbols_in_program
+import System.CommandLine
-tab title _ = tune (Title title)
- $ viewInformation [] title
- >>* [OnAction (Action "Close") (always (treturn ()))]
-*/
+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
-import StdDebug, Text.GenPrint
-Start w = doTasks (onStartup t) w
+polyid :: (A.a: a -> a) -> (Int, Bool)
+polyid f = (f 42, f True)
-null :: SDSSource () () ()
-null = nullShare
-
-t = tcpconnect "localhost" 9999 (Just 500) null
-//t = tcpconnect "localhost" 9999 Nothing null
- { onConnect = \cid host r = trace_n (printToString ("onConnect: ", cid, host, r))
- (Ok (), Nothing, [], False)
- , onData = \ data l r = trace_n (printToString ("onData: ", data, l, r))
- (Ok (), Nothing, [], False)
- , onShareChange = \ l r = trace_n (printToString ("onShareChange: ", l, r))
- (Ok (), Nothing, [], False)
- , onDisconnect = \ l r = trace_n (printToString ("onDisconnect: ", l, r))
- (Ok (), Nothing)
- , onDestroy = \ l = trace_n (printToString ("onDestroy: ", l))
- (Ok (), [])
- }
+Start w
+ # ([argv0:_], w) = getCommandLine w
+ # (symbols, w) = accFiles (read_symbols argv0) w
+ = test symbols (polyid id)