--- /dev/null
+definition module B
+
+import main
+
+B :: T
+isB :: T -> Bool
--- /dev/null
+implementation module B
+
+import main
+
+:: T | E
+
+B :: T
+B = E
+
+isB :: T -> Bool
+isB E = True
+isB _ = False
--- /dev/null
+definition module C
+
+import main
+
+C :: T
+isC :: T -> Bool
--- /dev/null
+implementation module C
+
+import main
+
+:: T | E
+
+C :: T
+C = E
+
+isC :: T -> Bool
+isC E = True
+isC _ = False
--- /dev/null
+definition module main
+
+:: T = A | ..
--- /dev/null
+implementation module main
+
+import B, C
+
+Start = isB C
--- /dev/null
+module test
+
+import StdEnv
+
+Start = fun 42 [0, 1, 2, 42]
+
+(oo) infixr 9 :: ((a -> b) (c d -> a) c d -> b)
+(oo) = (o) o (o)
+
+(ooo) infixr 9 :: ((a -> b) (c d e -> a) c d e -> b)
+(ooo) = (o) o (o) o (o)
+
+(oooo) infixr 9 :: ((a -> b) (c d e -> a) c d e -> b)
+(oooo) = (o) o (o) o (o) o (o)
+
+//(on) infixr 9// :: (a -> b) -> (c -> a) c -> b)
+//(on) n = fold [(o) = (o)
+//(on) n = (o) o ((on) (n-1))
+
+//fun = fmap not isMember
+fun = fmap (fmap not) isMember
--- /dev/null
+all:
+ mkdir -p Clean\ System\ Files
+ gcc -c test.c -o test.o
+ clm -l test.o -dynamics -IL Dynamics test -o test
--- /dev/null
+module test
+
+import iTasks
+
+Start w = startEngine (treturn 42) w
+
+derive gEditor Set
+derive gDefault Set
+
+t :: Editor (Set Int)
+t = gEditor{|*->*|}
+ slider
+ gText{|*|}
+ gDefault{|*|}
+ JSONEncode{|*|}
+ JSONDecode{|*|}
--- /dev/null
+module test
+
+from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
+from Data.Maybe import :: Maybe
+
+:: T = T String
+
+derive JSONEncode T
+derive JSONDecode T
+
+Start = 42
--- /dev/null
+This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex 2018.6.6) 10 JUL 2018 07:48
+entering extended mode
+ restricted \write18 enabled.
+ %&-line parsing enabled.
+**test.icl
+(./test.icl
+LaTeX2e <2018-04-01> patch level 5
+
+! LaTeX Error: Missing \begin{document}.
+
+See the LaTeX manual or LaTeX Companion for explanation.
+Type H <return> for immediate help.
+ ...
+
+l.1 m
+ odule test
+?
+! Emergency stop.
+ ...
+
+l.1 m
+ odule test
+You're in trouble here. Try typing <return> to proceed.
+If that doesn't work, type X <return> to quit.
+
+
+Here is how much of TeX's memory you used:
+ 7 strings out of 494587
+ 252 string characters out of 6177827
+ 51857 words of memory out of 5000000
+ 3741 multiletter control sequences out of 15000+600000
+ 3640 words of font info for 14 fonts, out of 8000000 for 9000
+ 14 hyphenation exceptions out of 8191
+ 5i,0n,4p,22b,14s stack positions out of 5000i,500n,10000p,200000b,80000s
+! ==> Fatal error occurred, no output PDF file produced!
import iTasks
-Start w = startEngine (t1 -|| t2 -|| t3 -|| t4) w
+Start w = startEngine (viewInformation () [] v) w
-:: Field = {field :: String}
-:: Type1 = {fields :: [Field]}
-:: Type2 = Type Int [Field]
-:: Type3 :== [Field]
-derive class iTask Field, Type1, Type2
+derive class iTask B, C
-t1 :: Task Type1
-t1 = enterInformation () []
+v :: B
+v = B2 C2
-t2 :: Task Type2
-t2 = enterInformation () []
-
-t3 :: Task Type3
-t3 = enterInformation () []
-
-t4 :: Task (Type2, Type3)
-t4 = enterInformation () []
+:: B = B1 | B2 C
+:: C = C1 Int | C2
--- /dev/null
+all:
+ mkdir -p Clean\ System\ Files
+ gcc -c test.c -o test.o
+ clm -l test.o -dynamics -IL Dynamics test -o test
--- /dev/null
+module test
+
+import iTasks
+
+derive class iTask T1
+
+:: T1 =
+ { f1 :: Bool
+ , f2 :: Bool
+ }
+
+Start w = startEngine t w
+
+t :: Task (Maybe T1)
+t = enterInformation () []
--- /dev/null
+module test
+
+import StdMisc
+
+:: T a = T a
+
+class c a v :: a -> v Int
+instance c a T where c a = T 42
+
+//fun :: v Int | c a v
+fun :: v Int | c Bool v
+fun = c True
+
+Start :: T Int
+Start = fun
--- /dev/null
+definition module ext
+
+import main
+
+:: Poly | Ext
+//:: Poly a | Ext a
--- /dev/null
+implementation module ext
+
+
--- /dev/null
+definition module main
+
+:: Poly a = Poly a | ..
--- /dev/null
+implementation module main
+
+Start = 42
--- /dev/null
+module test
+
+import Data.Maybe => qualified :: Maybe
+
+Start = 4
+
--- /dev/null
+all:
+ mkdir -p Clean\ System\ Files
+ gcc -c test.c -o test.o
+ clm -l test.o -dynamics -IL Dynamics test -o test
--- /dev/null
+module test
+
+import StdFunc => qualified return
+import Data.Func
+import System.Time
+import iTasks
+import iTasks.Internal.IWorld
+
+Start w = flip startEngine w
+ $ foreverSt 0 \i->
+ waitForSTimer 0.1
+ -|| viewInformation () [] (toString i +++ "th waitForSTimer")
+ >>| treturn (i+1)
+
+waitForSTimer :: Real -> Task ()
+waitForSTimer secondsToWait
+= get currentTimespec
+ >>= \ts->watch (sdsFocus {start=ts,interval=realToTs secondsToWait} iworldTimespec)
+ >>* [OnValue (ifValue (\t->t > ts+realToTs secondsToWait) \_->treturn ())]
+where
+ realToTs :: Real -> Timespec
+ realToTs t =
+ {tv_sec = floor t
+ ,tv_nsec = toInt $ (t - toReal (floor t)) * 1E9
+ }
+ floor :: Real -> Int
+ floor x
+ | toReal (toInt x) == x = (toInt x)
+ | otherwise = toInt (x - 0.5)