From: Mart Lubbers Date: Sun, 11 Aug 2019 16:30:01 +0000 (+0200) Subject: bork X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=1efaf0f46ac1f86a63091091c27d078cf35cc9ca;p=clean-tests.git bork --- diff --git a/test.icl b/test.icl index 99d51e1..9837893 100644 --- a/test.icl +++ b/test.icl @@ -1,9 +1,103 @@ module test import iTasks -import iTasks.Extensions.DateTime -Start w = doTasks (onStartup t) w +Start w = doTasks t w -t :: Task Int -t = throw "bork" +t:==palindrome + +palindrome :: Task (Maybe String) +palindrome + = enterInformation "Enter a palindrome" [] + >>* [ OnAction ActionOk (ifValue palindrome (\v -> return (Just v))) + , OnAction ActionCancel (always (return Nothing)) + ] + >>= viewInformation "Result is:" [] +where + palindrome s = lc == reverse lc + where + lc :: [Char] + lc = fromString s + +//t :: Task (Int, Int) +//t = enterInformation "Left" [] -&&- enterInformation "Right" [] +// >>= viewInformation "Result" [] + +//import Data.GenDefault +// +//:: T = +// { a0 :: Int +// , a1 :: Int +// , a2 :: Int +// , a3 :: Int +// , a4 :: Int +// , a5 :: Int +// , a6 :: Int +// , a7 :: Int +// , a8 :: Int +// , a9 :: Int +// , a10 :: Int +// , a11 :: Int +// , a12 :: Int +// , a14 :: Int +// , a15 :: Int +// , a16 :: Int +// , a17 :: Int +// , a18 :: Int +// , a19 :: Int +// , a20 :: Int +// , a21 :: Int +// , a22 :: Int +// , a23 :: Int +// , a24 :: Int +// , a25 :: Int +// , a26 :: Int +// , a27 :: Int +// , a28 :: Int +// , a29 :: Int +// , a30 :: Int +// , a31 :: Int +// , a32 :: Int +// } +// +//class c a +//where +// a0 :: a +// a1 :: a +// a2 :: a +// a3 :: a +// a4 :: a +// a5 :: a +// a6 :: a +// a7 :: a +// a8 :: a +// a9 :: a +// a10 :: a +// a11 :: a +// a12 :: a +// a14 :: a +// a15 :: a +// a16 :: a +// a17 :: a +// a18 :: a +// a19 :: a +// a20 :: a +// a21 :: a +// a22 :: a +// a23 :: a +// a24 :: a +// a25 :: a +// a26 :: a +// a27 :: a +// a28 :: a +// a29 :: a +// a30 :: a +// a31 :: a +// a32 :: a +// a33 :: a +// +// +//derive gDefault T +// +//Start :: T +//Start = gDefault{|*|}