From: Mart Lubbers Date: Thu, 16 Aug 2018 14:24:41 +0000 (+0200) Subject: testsssss X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=9f05ee89761c00fe033bddc6a4a3c25c21c77a68;p=clean-tests.git testsssss --- diff --git a/228-rawvarcons-in-default-layout-for-certain-adt/test.icl b/228-rawvarcons-in-default-layout-for-certain-adt/test.icl new file mode 100644 index 0000000..501d45a --- /dev/null +++ b/228-rawvarcons-in-default-layout-for-certain-adt/test.icl @@ -0,0 +1,15 @@ +module test + +import iTasks + +Start w = startEngineWithOptions + (\args opts->(Just {opts & autoLayout=True}, [])) + (updateInformation () [] v) w + +derive class iTask B, C + +v :: B +v = B2 C2 + +:: B = B1 | B2 C +:: C = C1 Int | C2 diff --git a/237-deriving-generic-editors-for-newtypes-crashes/test.icl b/237-deriving-generic-editors-for-newtypes-crashes/test.icl new file mode 100644 index 0000000..51274fd --- /dev/null +++ b/237-deriving-generic-editors-for-newtypes-crashes/test.icl @@ -0,0 +1,6 @@ +module test + +:: MTDeviceData = + { deviceState :: BCState + , deviceSpec :: Maybe MTDeviceSpec + } diff --git a/238-geditor-for-maybe-is-broken/test.icl b/238-geditor-for-maybe-is-broken/test.icl new file mode 100644 index 0000000..8d8ee67 --- /dev/null +++ b/238-geditor-for-maybe-is-broken/test.icl @@ -0,0 +1,14 @@ +module test + +import iTasks + +derive class iTask T1 +:: T1 = + { f1 :: Bool + , f2 :: Bool + } + +Start w = startEngine t w + +t :: Task (Maybe T1) +t = enterInformation () [] diff --git a/239-derived-editor-for-map-broken/test.icl b/239-derived-editor-for-map-broken/test.icl new file mode 100644 index 0000000..7f4816d --- /dev/null +++ b/239-derived-editor-for-map-broken/test.icl @@ -0,0 +1,9 @@ +module test + +import iTasks +import qualified Data.Map as DM + +Start w = startEngine t w + +t :: Task ('DM'.Map Int String) +t = viewInformation () [] ('DM'.fromList [(42, "foo")]) diff --git a/dupworld/test.icl b/dupworld/test.icl new file mode 100644 index 0000000..a2e7805 --- /dev/null +++ b/dupworld/test.icl @@ -0,0 +1,9 @@ +module test + +Start :: *World -> Int +Start w = + let (w1, w2) = dup w + in 42 + +dup :: *a -> *(*a, *a) +dup a = (a, a) diff --git a/filepicker/test.icl b/filepicker/test.icl index 27c5ac0..e1989a7 100644 --- a/filepicker/test.icl +++ b/filepicker/test.icl @@ -1,58 +1,55 @@ module test -import Control.Monad.State -import Control.Monad.Identity -import Control.Applicative -import System.OS -import qualified Control.Monad as M -from Control.Monad import `b`, mapM, class Monad(bind) -import StdArray -import Data.Tree +from iTasks.UI.Editor.Controls import :: ChoiceNode{..} +import StdEnv +import Data.List +import Data.Func import Data.Functor import Data.Tuple -import Data.Func -import System.Directory +import Data.Tree +import Data.Maybe +import Data.Error +import Control.Applicative +import Control.Monad +import Control.Monad.State +import Control.Monad.Identity +import System.FilePath import System.File -import Text.HTML -import Text -import iTasks -import iTasks.Internal.SDS => qualified modify -import iTasks.Internal.Task - -import StdDebug, StdMisc +import System.Directory -derive class iTask RTree, FileInfo, Tm +import Text.GenPrint +import iTasks => qualified >>=, >>|, forever, sequence, return -Start w = startEngine (selecter "/home/mrl/projects" 2) w +derive class iTask RTree, ChoiceNode -recurseDirectory :: Int FilePath FilePath *World -> *(MaybeOSError (RTree (FilePath, Bool)), *World) -recurseDirectory maxdepth acc fp w -# fp = acc fp -= case getFileInfo fp w of - (Error (i, e), w) = (Error (i, e +++ " in fileinfo " +++ fp), w) - (Ok fi, w) - | not fi.directory = (Ok $ RNode (fp, False) [], w) - = case readDirectory fp w of - (Error (i, e), w) = (Error (i, e +++ " in readDir " +++ fp), w) - (Ok cs, w) - | maxdepth == 0 = (Ok $ RNode (fp, True) [], w) - = appFst ((fmap $ RNode (fp, True)) o 'M'.sequence) - $ mapSt (recurseDirectory (maxdepth - 1) fp) (filter real cs) w -where - real i = IF_POSIX (i <> ".." && i <> ".") True +Start w = startEngine (selectFile "/opt/clean/lib/StdLib" () False) w -selecter :: !FilePath Int -> Task String -selecter fp maxdepth = accWorldOSError (recurseDirectory maxdepth fp "") - >>= \ds->editSelection "Examples" False (SelectInTree (\x->[evalState (toTree x) 0]) fromTree) ds [] - @? tvHd +selectFile :: FilePath d Bool -> Task [FilePath] | toPrompt d +selectFile root p m = tbind + (accWorldOSError (appFst (fmap numberTree) o recurseDirectory root "")) + \tree->editSelection p m (SelectInTree (pure o toChoiceNode fp2cn) fromTree) tree [] where - toTree :: (RTree (FilePath, Bool)) -> State Int ChoiceNode - toTree (RNode (fp, _) forest) - = getState `b` \i->put (i+1) `b` \_->mapM toTree forest `b` \cs->pure - {id=i,label=bn fp,icon=Nothing,expanded=i==0,children=cs} - - bn :: FilePath -> FilePath - bn x = if (endsWith {pathSeparator} x) (bn $ fst $ splitFileName x) (dropDirectory x) - - fromTree :: (RTree (FilePath, Bool)) [Int] -> [FilePath] - fromTree t [i] = map fst $ filter (not o snd) [foldTree (\f fs->[f:flatten fs]) t !! i] + numberTree :: ((RTree a) -> RTree (Int, a)) + numberTree = flip evalState zero o foldTree \a cs-> + (\lvs i->RNode (i, a) lvs) <$> sequence cs <*> getState <* modify ((+)one) + + toChoiceNode :: (Int a -> ChoiceNode) -> ((RTree (Int, a)) -> ChoiceNode) + toChoiceNode tfun = foldTree \a cs->{ChoiceNode | uncurry tfun a & children=cs} + + fp2cn :: Int (FilePath, Bool) -> ChoiceNode + fp2cn i (fp, bool) = {id =if bool (~i) i,label=dropDirectory fp,icon=Nothing,expanded=False,children=[]} + + fromTree :: (RTree (Int, (FilePath, Bool))) [Int] -> [FilePath] + fromTree tree sel = [f\\(i, (f, _))<-leafs tree | isMember i sel] + +recurseDirectory :: !FilePath !FilePath !*World -> *(MaybeOSError (RTree (FilePath, Bool)), !*World) +recurseDirectory acc fp w + # fp = acc fp + # (mfi, w) = getFileInfo fp w + | isError mfi = (liftError mfi, w) + # (Ok fi) = mfi + | not fi.directory = (Ok $ RNode (fp, False) [], w) + # (mcs, w) = readDirectory fp w + | isError mfi = (liftError mcs, w) + # (cs, w) = appFst sequence $ mapSt (recurseDirectory fp) (filter (\c->not (elem c [".", ".."])) (fromOk mcs)) w + = (RNode (fp, True) <$> cs, w) diff --git a/fixwidthstr/test.icl b/fixwidthstr/test.icl new file mode 100644 index 0000000..215683f --- /dev/null +++ b/fixwidthstr/test.icl @@ -0,0 +1,28 @@ +module test + +import StdEnv + +:: Z = Z +:: S a = S a + +class peano a :: a +instance peano Z where peano = Z +instance peano (S a) | peano a where peano = S peano + +class peanoplus a b ~c +where + peanoplus :: a b -> c + +instance peanoplus a Z a | peano a +where + peanoplus a b = a + +:: FString n = FS [Char] + +fsempty :: FString Z +fsempty = FS [] + +fappend :: (FString a) Char -> FString (S a) | peano a +fappend (FS l) c = FS (l ++ [c]) + +Start = peanoplus Z Z diff --git a/gast-der/test Time Profile.pcl b/gast-der/test Time Profile.pcl new file mode 100644 index 0000000..2db37a0 --- /dev/null +++ b/gast-der/test Time Profile.pcl @@ -0,0 +1,399 @@ +Gast.Testable blank 2 0 0 3 13 196 +Gast.Testable withBlank;72 1 0 0 2 17 178 +Gast.Testable _f13.showName.<+.toString;.toString; 0 1 0 2 2 64 +Gast.Testable showName 1 0 0 2 5 238 +Gast.Testable msgStr;858 1 0 0 1 0 22 +Text copyChars;45 3 0 0 3 0 220 +Text concat`;44 1 0 0 4 0 202 +Text +;41 4 0 0 4 13 344 +Text.Language pluralise 1 0 0 1 6 188 +Text.Language [line:26];38;5 1 0 0 2 0 122 +Text.Language _f1.pluralisen._if;26;38;5.==;16 0 1 0 2 0 330 +Text.Language _f0.pluralisen.<+.toString;.toString; 0 1 0 2 2 294 +Text <+ 4 0 0 12 19 1582 +Text.Language pluralisen 0 1 0 3 6 98 +Gast.Testable showLabels;74 1 0 0 1 2 32 +StdOrdList msort;21 1 0 0 1 0 22 +StdOrdList pair;20 1 0 0 1 0 40 +StdOrdList sort 1 0 0 4 6 716 +Gast.Testable [line:222];18;870 1 0 0 3 10 918 +Gast.Testable [line:225];18;872 0 1 0 2 0 580 +Text [line:12];49;103 3 0 0 3 0 60 +Text foldl;104 1 0 0 6 0 586 +Text concat;1 1 0 0 3 5 144 +Gast.Testable conclude;73 1 0 0 2 23 88 +Gast.Testable [line:200];14;874 1 0 0 3 10 1006 +Gast.Testable humanReadableResOutput 0 0 1 5 9 650 +Gast.Testable PassedTest 0 1 0 1 3 154 +Gast.Testable TestsResult 0 1 0 2 2 84 +Gast.CommandLine snd;47 2 0 0 2 0 72 +System.File fflushl;18 2 0 0 2 0 20886 +System.File fflush 2 0 0 4 0 110 +Gast.CommandLine [line:89];23;527 2 0 0 6 10 29566 +Gast.Gen [line:112];87;434 1 0 0 1 21 126 +Gast.Gen _f6.ggen_Int;6._if;112;87;434.==;16.maxint 0 1 0 3 0 356 +Gast.Gen _f0.ggen_EITHER;13.map 0 1 0 3 0 120 +test gEq_PAIR;555 152254 0 0 456770 0 9956498 +test gEq_PAIR;558 152254 0 0 456766 0 10056518 +test gEq_CONS;557 152254 0 0 304508 0 6877982 +Gast.Gen g_c1;112;75;433 4 0 0 4 16 94 +Gast.Gen c;112;71;406 3 1 0 8 0 34892 +Gast.Gen c;112;36;405 3 0 0 6 51 334 +Gast.Gen _f5.ggen_Int;6.c;112;36;405.-;7 0 3 0 6 0 700 +test gEq_CONS;550 134152 0 0 268308 0 6081944 +test gEq_EITHER;570 152087 0 0 304174 0 7526750 +Data.Map [line:1829];27;635 10 0 0 10 40 732 +Gast.Gen _f19.g_c1;194;34;449.+;6.one;11 0 583 0 583 0 14230 +StdList _f5.take;88.take;88.-;7 0 583 0 1166 0 23872 +test gEq_EITHER;583 287939 0 0 575878 0 13423744 +Gast.Gen _f18.genElem;71.toChar;21.+;6.rem;28.abs;13 0 634 0 634 0 13836 +Gast.Gen genElem;71 0 0 634 1268 3804 28132 +StdList take;88 634 0 0 634 1749 14194 +StdList repeat 0 51 0 51 0 2258 +Gast.Gen _f17.rndStrings;72.rndStrings;72.+;6.rem;28 0 55 0 110 0 5978 +test gEq_PAIR;565 298624 0 0 895876 0 19312620 +test gEq_CONS;564 298624 0 0 597248 0 13376856 +Gast.Gen g_c1;194;34;449 692 0 0 2543 1902 59482 +Gast.Gen cu;194;30;414 692 0 0 1384 0 31958 +Gast.Gen g_c1;194;34;450 692 0 0 1960 0 41584 +Gast.Gen cu;194;30;415 692 0 0 1384 0 29842 +StdList take 58 0 0 160 0 11450 +StdList repeatn 58 0 0 116 174 6684 +Gast.Gen _f15.rndStrings;72.repeatn.rem;28.abs;13 0 58 0 116 0 22860 +StdFunc seqList 0 692 0 2025 13314 61296 +Gast.Gen _f16.rndStrings;72.cu;194;30;414._createArray;16.cu;194;30;415 0 58 0 232 220 14090 +Math.Random _f0.gr_mti;5.gr_mti;5.+;6.one;11 0 747 0 1494 0 39616 +Math.Random gr_mti;5 750 0 0 751 5250 22454 +Math.Random ind;4 2496 0 0 2496 0 50314 +Math.Random new_mti;6 4 0 0 2500 0 55818 +Math.Random init_i;21 3 0 0 3 0 11286 +Math.Random initrand 3 0 0 6 0 174 +Math.Random genRandInt 3 0 0 13 1881 4700 +Gast.Gen aStream 0 3 0 6 0 298 +Data.GenEq gEq_Int;7 706923 0 0 706923 0 15004314 +test gEq_CONS;579 706923 0 0 1413847 0 30125042 +test gEq_EITHER;585 706923 0 0 1413846 0 30572530 +test gEq_OBJECT;584 706923 0 0 1413846 0 30572118 +test toGenericPriority;128 1413846 0 0 1413897 6807140 37695706 +test fromGenericPriority;127 0 0 8 8 64 1900 +test isoPriority;129 0 1 0 1 0 18 +test gEq_Priority;33 0 0 706923 3534662 5655384 75662918 +Data.Maybe gEq_CONS;57 707920 0 0 1415840 0 30070132 +Gast.Gen ggen_Int;6 0 0 3 6 54 168 +test tdi_Priority;120 0 4 0 4 32 198 +test gti_NoAssoc;123 0 1 0 1 8 24 +test cdi_NoAssoc;126 0 1 0 1 13 24 +test gti_RightAssoc;122 0 1 0 1 8 18 +test cdi_RightAssoc;125 0 1 0 1 13 2408 +test gti_LeftAssoc;121 0 1 0 1 8 42 +test cdi_LeftAssoc;124 0 1 0 1 13 20 +test cli_Priority;119 0 1 0 1 15 18 +test ggen_Priority;24 0 0 1 4 68 192 +System garbage_collector 5089 0 0 5089 -859551492 1099701744 +test gEq_CONS;551 441859 0 0 883726 0 19118982 +test gEq_EITHER;568 502825 0 0 1005650 0 22590670 +test gEq_EITHER;576 654912 0 0 1309824 0 29489814 +Gast.Gen _f20._c;152;15;454.map 0 8 0 24 0 2000 +Gast.Gen rndStrings;72 55 6 0 177 1059 10368 +test gEq_PAIR;562 992114 0 0 2976352 0 62791554 +test gEq_CONS;561 992114 0 0 1984228 0 42528092 +test gEq_EITHER;575 992269 0 0 1984538 0 42384214 +test gEq_OBJECT;574 992269 0 0 1984538 0 42823246 +test toGenericTypeRestriction;117 1984538 0 0 1984617 13891766 48325304 +test fromGenericTypeRestriction;116 0 0 6 12 42 1872 +test isoTypeRestriction;118 0 2 0 2 0 56 +test gEq_TypeRestriction;32 0 0 992269 4961413 7938152 105659036 +test tdi_TypeRestriction;111 0 6 0 6 48 332 +test gti_Derivation;113 0 4 0 4 60 118 +test cdi_Derivation;115 0 2 0 2 26 70 +test gti_Instance;112 0 4 0 4 88 92 +test cdi_Instance;114 0 2 0 2 26 44 +test cli_TypeRestriction;110 0 2 0 2 18 54 +test ggen_TypeRestriction;21 0 0 2 8 122 2818 +test gEq_CONS;547 1368519 0 0 2737038 0 58026270 +test gEq_EITHER;567 1459807 0 0 2919614 0 62502462 +test gEq_EITHER;573 1740341 0 0 3480682 0 75115350 +test gEq_EITHER;578 2395253 0 0 4790506 0 102496868 +test gEq_OBJECT;577 2395253 0 0 4790506 0 104249866 +test toGenericType;62 4790506 0 0 4790760 40819774 130726222 +test fromGenericType;61 0 0 23 31 251 8042 +test isoType;63 0 10 0 10 0 264 +test gEq_Type;28 585030 0 1810223 11391363 17991964 243467730 +test tdi_Type;46 0 30 0 30 240 1038 +test gti_Arrow;53 0 10 0 10 150 276 +test cdi_Arrow;60 0 10 0 10 130 694 +test gti_Forall;52 0 11 0 11 319 476 +test cdi_Forall;59 0 10 0 10 130 218 +test gti_Uniq;51 0 10 0 10 80 226 +test cdi_Uniq;58 0 10 0 10 130 694 +test gti_Cons;50 0 11 0 11 242 394 +test cdi_Cons;57 0 10 0 10 130 492 +Data.Set [line:589];35;169 40 0 0 40 360 1138 +test gti_Var;49 0 10 0 10 80 238 +test cdi_Var;56 0 10 0 10 130 640 +Data.Set [line:585];21;170 424 0 0 464 1152 13014 +test gti_Func;48 0 11 0 11 319 526 +test cdi_Func;55 0 10 0 10 130 480 +Data.Set [line:576];10;166 265 0 0 265 1305 6650 +Data.Set [line:575];18;171 689 0 0 1378 0 31384 +Data.Set balanceL 689 0 0 1378 0 28002 +test gti_Type;47 0 12 0 12 264 784 +test cdi_Type;54 0 10 0 10 130 744 +test cli_Type;45 0 10 0 10 390 552 +test ggen_Type;6 0 0 10 40 1600 3220 +Data.GenEq gEq_PAIR;6 0 0 4620394 18481636 9240788 470354748 +Data.Map [line:1820];10;631 51 0 0 51 330 2972 +Data.Map [line:1819];19;636 61 0 0 122 0 3730 +Data.Map balance 61 0 0 122 0 2766 +Data.Map [line:420];31;649 61 0 0 183 183 4852 +Data.Map [line:60];16;647 61 0 0 61 183 3868 +Data.Set member 71 0 78 227 966 30146 +Gast.Gen [line:84];14;395 0 0 71 142 355 5254 +Gast.Gen _f21._f455;455.map 0 15 0 45 0 2058 +Gast.Testable rev;69 1999 0 0 2025 3000000 42388264 +Gast.Gen [line:213];41;427 1003005 0 0 2009131 3009015 43601930 +Gast.Gen _f13.skew;51._if;213;41;427.<;17 0 1003005 0 2006010 0 43517868 +Gast.Testable admin;81 1000000 0 0 1000000 0 21894776 +StdList reverse_;89 2000000 0 0 2000036 6000000 43601088 +StdList reverse 0 2000000 0 4000000 0 84701638 +Gast.Testable [line:42];96;880 0 1000000 0 1000000 0 21730432 +Gast.Testable _upd1 0 1000000 0 4000028 6000000 86090986 +Gast.Testable _match0 0 1000000 0 1000000 0 21761372 +Gast.Testable res 0 1000000 0 2000000 0 43185186 +Gast.Testable [line:363];50;878 0 1000000 0 5000019 3000000 109512270 +test _f0.Start.-;7.one;11 0 1 0 1 0 18 +Gast.Testable _f17._c;353;9;879.+;6.-;7 0 1000000 0 1000000 0 22045364 +Gast.Testable countEvery 0 0 1000000 3000017 2000006 77178784 +Gast.Testable [line:353];9;879 1000001 0 0 1000271 46000015 25860114 +Gast.Testable analyse`;80 1000001 0 0 1000001 9 21973692 +Gast.Testable analyse;79 1000001 0 0 3000037 6000006 66554498 +Data.Maybe gEq_UNIT;58 733940 0 0 733940 0 15531530 +Data.Maybe gEq_CONS;103 733940 0 0 1467880 0 31060814 +Data.Maybe gEq_EITHER;107 1441860 0 0 2883720 0 62159834 +Data.Maybe gEq_OBJECT;106 1441860 0 0 2883720 0 61342682 +Data.Maybe toGenericMaybe;53 2883720 0 0 2883791 11534880 66377000 +Data.Maybe gEq_Maybe;37 1441860 0 0 5767511 8651160 122865080 +test fromGenericMaybe;107 0 0 13 13 91 2754 +test isoMaybe;109 0 4 0 4 0 120 +test gEq_FIELD;589 1000001 0 0 2000020 0 42761784 +test gEq_PAIR;593 1000001 0 0 3000003 0 67980912 +test gEq_PAIR;594 1000001 0 0 3000003 0 73173900 +Data.GenEq gEq_UNIT;5 0 0 4296625 8593287 8593250 181382332 +Data.GenEq gEq_CONS;1 0 0 8917019 26751180 17834038 564072138 +Data.GenEq gEq_EITHER;4 0 0 8917019 26751158 17834038 570205712 +Data.GenEq gEq_OBJECT;0 8917019 0 0 17834038 0 382546036 +Data.GenEq toGeneric_List;31 17834038 0 0 17834639 99058516 408089516 +Data.GenEq gEq__List;14 4296625 0 4620394 40289497 169747130 860282586 +test gEq_FIELD;587 3000003 0 0 6000234 0 128706648 +Data.GenEq gEq__String;11 3659258 0 1818899 7297090 3637798 232091154 +test gEq_FIELD;586 1000001 0 0 2000052 0 43077290 +test gEq_PAIR;597 1000001 0 0 3000003 0 64063800 +test gEq_PAIR;599 1000001 0 0 3000003 0 74158040 +test gEq_RECORD;598 1000001 0 0 2000002 0 43804636 +test toGenericConstructor;43 2000002 0 0 2000277 44000044 47398072 +test gEq_Constructor;600 1000001 0 0 4000043 6000006 85269054 +Gast.Gen _f12.g_c1;210;58;425 0 1003028 0 1003042 3009084 22649380 +test fromGenericConstructor;42 0 0 1000001 2002924 9000009 49445890 +test isoConstructor;44 0 1 0 1 0 22 +test prop 0 0 1000001 4999601 2000002 106082958 +Gast.Testable evaluate;24 0 0 1000001 2000119 20000020 47714518 +Gast.Testable apply 0 1000001 0 2000168 28000028 62795058 +Gast.Testable f;68 1 1000000 0 3002087 14012005 92548248 +Gast.Testable diagonal 1 0 0 2 0 186 +Gast.Testable g_c1;72;63;864 1000001 0 0 1000093 14000014 22527860 +Gast.Testable c;72;59;67 1 1000000 0 4000050 8000008 89222128 +Gast.Testable forAll 1 0 0 3 12 100 +Gast.Gen ggen__String;10 0 0 21 41 336 1564 +Gast.Gen g_c1;210;58;425 1003028 0 0 1003081 8024224 21514246 +Gast.Gen map/PAIR;169 0 0 154 154 1386 9278 +Gast.Gen bimap/PAIR;170 0 154 0 154 2772 8850 +Gast.Gen map/CONS;171 0 0 154 154 924 9666 +Gast.Gen bimap/CONS;172 0 154 0 154 1540 13594 +Gast.Gen map/EITHER;175 0 0 154 154 924 9394 +Gast.Gen bimap/EITHER;176 0 154 0 154 2772 12060 +StdGeneric _f1.doit;35.doit;35.-;7./;10.-;7./;10 0 40 0 80 0 1734 +Gast.Gen _upd3 0 48 0 96 336 5234 +Gast.Gen tdi__List;134 0 48 0 48 384 1072 +Gast.Gen recInfo 0 97 0 97 0 2070 +Data.Set singleton 213 0 0 213 639 8348 +Data.Set insert 902 0 0 2494 4134 85636 +Data.Set ins;57 213 0 0 426 0 9380 +Gast.Gen gti__Nil;136 0 20 0 20 120 452 +Gast.Gen cdi__Nil;138 0 20 0 20 260 414 +Gast.Gen gti__Cons;135 0 28 0 28 644 934 +Gast.Gen cdi__Cons;137 0 20 0 20 260 426 +Gast.Gen cli__List;133 0 20 0 20 180 538 +Gast.Gen toGeneric_List;140 0 0 154 308 1540 15710 +Gast.Gen map/OBJECT;177 0 0 154 462 924 14614 +Gast.Gen bimap/OBJECT;178 0 154 0 154 1540 9034 +Gast.Gen fromGeneric_List;139 0 0 308 1674 1540 92592 +Gast.Gen iso_List;141 0 328 0 328 0 8008 +Gast.Gen bimap/fromto;179 0 0 154 462 924 17020 +Gast.Gen bimap/from_Bimap;180 154 0 0 154 4312 5722 +Gast.Gen bimap__List;79 20 134 0 443 4158 20772 +Gast.Gen ggen__List;25 0 0 20 77 1160 5210 +Gast.Gen _upd6 0 23 0 46 161 1166 +Gast.Gen c;210;53;49 0 1003028 0 2007649 0 43050008 +Gast.Gen [line:51];16;428 1567 0 0 1567 0 39648 +Gast.Gen _f14.skew;51.splitAt._c;51;16;428.<;17 0 1567 0 4701 0 200260 +Gast.Gen rev;52 1582 0 0 1626 3005718 34057594 +Gast.Gen g_c1;210;70;426 1567 0 0 1567 12536 42584 +Gast.Gen c;210;65;50 0 1567 0 4700 0 171816 +Gast.Gen skew;51 1003028 0 0 2007703 8044790 44548372 +Gast.Gen diag 23 0 0 46 230 938 +Gast.Gen [line:142];38;451 23 0 0 23 0 562 +Gast.Gen [line:142];62;452 23 0 0 23 0 584 +Gast.Gen get`;396 256 0 0 256 0 21648 +StdList _f1.splitAt.splitAt.-;7 0 1583 0 3166 0 95590 +test gti__Constructor;34 0 1 0 1 57 40 +StdList splitAt 3150 23 0 4764 19092 291662 +Gast.Gen g_c1;183;72;459 177 0 0 177 885 10384 +Gast.Gen c;183;66;68 5 172 0 645 0 40538 +Control.GenBimap map/PAIR;86 0 0 1000051 1000107 9000459 23381016 +Control.GenBimap bimap/PAIR;87 0 1000051 0 1000154 18000918 22878606 +Control.GenBimap map/CONS;78 0 0 1000051 1000080 6000306 22056282 +Control.GenBimap bimap/CONS;79 0 1000051 0 1000107 10000510 22620778 +Control.GenBimap map/EITHER;80 0 0 1000051 1000082 6000306 23071710 +Control.GenBimap bimap/EITHER;81 0 1000051 0 1000139 18000918 22633750 +Gast.Gen g_c1;166;26;457 204 0 0 204 1020 6894 +Gast.Gen c;166;21;64 37 167 0 575 0 22774 +Gast.Gen interleave 66 66 0 207 369 8292 +Gast.Gen _upd2 0 61 0 122 427 3038 +Gast.Gen ggen_UNIT;11 0 0 24 48 72 1054 +StdGeneric _f0.doit;35.doit;35./;10 0 17 0 34 0 980 +StdList drop 0 65 0 122 0 4118 +Gast.Gen _upd4 0 17 0 34 119 884 +Gast.Gen ggen_CONS;14 0 0 61 286 1159 19064 +Gast.Gen [line:152];15;454 17 0 0 68 204 1898 +Gast.Gen _f455;455 65 0 0 226 576 6834 +Gast.Gen [line:152];15;456 65 0 0 130 0 3054 +StdList isEmpty 66 0 0 66 0 1680 +StdGeneric doit;35 94 0 0 94 171 2922 +test tdi_Maybe;102 0 10 0 10 80 402 +StdGeneric getConsPath 0 37 0 111 0 3294 +Gast.Gen g_c1;169;25;458 37 0 0 37 222 746 +StdOrdList mergeBy 0 57 0 108 124 4510 +StdOrdList merge_stage;25 47 57 0 134 399 8832 +StdOrdList msort;24 37 0 0 168 423 6410 +Gast.Gen argCount;67 0 0 88 176 176 4062 +Gast.Gen recCount;398 90 226 0 1241 2560 38402 +StdOrdList pair;23 37 57 0 276 513 9372 +StdList or 125 46 0 712 0 17990 +Gast.Gen scanArgs;397 143 226 0 369 1808 10622 +Gast.Gen recArgs 125 18 0 304 0 7190 +Gast.Gen [line:170];30;66 0 0 125 500 1000 11564 +StdOrdList sortBy 0 37 0 185 222 5906 +Gast.Gen c;169;17;65 0 37 0 111 0 3788 +StdList hd 38 37 0 223 0 6398 +Data.Map singleton 37 0 0 37 148 1824 +Data.Set foldl;163 37 0 0 463 639 11688 +Data.Set newSet 37 0 0 37 0 1118 +Data.Set fromList 37 0 0 111 185 4116 +test gti_Just;104 0 4 0 4 44 2416 +test cdi_Just;106 0 4 0 4 52 78 +Gast.Gen allTypes;45 125 357 0 936 1503 32518 +StdList init 125 185 0 495 555 17048 +Gast.Gen types;44 310 185 0 865 1110 31866 +test gti_Nothing;103 0 4 0 4 24 152 +Gast.Gen scan;43 125 0 0 625 750 16190 +test cdi_Nothing;105 0 4 0 4 52 282 +Gast.Gen foldr;392 37 125 0 412 375 27762 +test cli_Maybe;101 0 4 0 4 36 288 +Gast.Gen directNames 0 37 0 148 111 7682 +Data.Maybe maybe 256 37 0 445 0 12668 +Data.Map [line:416];17;646 37 0 0 111 0 4550 +Gast.Gen [line:15];13;394 0 0 37 37 148 2256 +Data.Map alter 98 0 0 294 684 11472 +Data.Map map 169 0 0 372 710 13652 +Data.Map fmap;41 37 0 0 74 0 2356 +Gast.Gen addRecInfo 0 37 0 111 888 4722 +Gast.Gen _upd1 0 37 0 111 259 5606 +Gast.Gen ggen_EITHER;13 0 0 66 260 874 9572 +Gast.Gen ggen_OBJECT;15 0 37 0 111 1924 13866 +test ggen_Maybe;18 0 0 4 15 212 588 +Gast.Gen [line:185];12;460 5 0 0 10 0 742 +Gast.Gen get`;416 5 0 0 5 0 128 +test rdi__Constructor;36 0 5 0 5 60 136 +Gast.Gen ggen_FIELD;16 0 0 5 30 110 1044 +Gast.Gen _f22.genPairTree.genPairTree.-;7 0 23 0 46 0 1658 +Gast.Gen _upd5 0 23 0 46 161 1362 +Gast.Gen [line:141];7;453 23 0 0 161 483 9636 +Gast.Gen genPairTree 23 85 0 108 690 3850 +Gast.Gen _upd0 0 1 0 2 7 306 +Gast.Gen ggen_PAIR;12 0 0 23 69 69 1972 +Gast.Gen ggen_RECORD;17 0 1 0 3 16 348 +Control.GenBimap toGeneric_List;25 0 0 1000051 2000162 10000510 42488582 +StdGeneric map_to 0 1000205 0 2000410 0 42610642 +Control.GenBimap map/OBJECT;82 0 0 1000051 3000185 6000306 65670302 +Control.GenBimap bimap/OBJECT;83 0 1000051 0 1000116 10000510 21830256 +Control.GenBimap fromGeneric_List;24 0 0 1000051 9000472 3000153 251797532 +Control.GenBimap iso_List;26 0 2000102 0 2000102 0 42076494 +StdGeneric map_from 0 7000975 0 13002205 0 276571358 +Control.GenBimap bimap/fromto;84 0 0 1000051 3000188 6000306 65817040 +Control.GenBimap bimap/from_Bimap;85 1000051 0 0 1000221 28001428 22882690 +Control.GenBimap bimap__List;1 18 1000033 0 3000297 27001377 65675436 +test ggen_Constructor;3 0 0 1 3 97 566 +Gast.Testable generateAll 1 0 0 2 10 938 +Gast.Gen maxint 3 1 0 6 0 504 +Gast.Gen genState 0 1 0 5 13 108 +Gast.Testable evaluate;30 0 0 1 4 16 546 +Data.Map newMap 3 0 0 3 0 84 +Gast.Testable newAdmin 0 1 0 3 9 244 +Gast.CommandLine evaluate;3 0 0 1 3 12 472 +Gast.Testable _f16.testConfig.analyse;79 0 1 0 3 0 688 +Gast.CommandLine foldl;529 1000002 0 0 1000006 0 22209840 +Gast.CommandLine foldl;528 1000002 0 0 2000004 0 42154216 +Gast.Testable [line:107];27;866 1000002 0 0 2000002 10 43487578 +Gast.ThunkNames thunk_name_to_string 2 0 0 2 6 672 +Gast.Testable testname;31 0 0 2 6 4 496 +Gast.CommandLine testname;4 0 0 2 6 4 788 +Gast.Testable noBeforeOutput 0 0 1 3 2 174 +Gast.Testable [line:111];9;865 1000002 0 0 2000004 0 44203036 +Gast.Testable printEvents 2000002 2 0 4000008 0 86465830 +Gast.CommandLine [line:90];15;552 1000002 0 0 1000003 0 24415008 +Gast.CommandLine stream;21 1 0 0 4000078 15000030 89867328 +Gast.Testable countPrintConfig 1 0 0 1 13 22 +Gast.Testable handleOption;76 0 1 0 3 3 264 +Gast.CommandLine getPrintOptions;6 0 1 0 1 0 90 +Gast.Testable foldl;862 1 0 0 3 3 116 +Gast.Testable foldl;861 0 0 1 4 6 108 +Gast.Testable toPrintConfig 1 0 0 1 3 20 +Gast.Testable testConfig 1 0 0 1 22 20 +Gast.Testable handleOption;77 1 0 0 1 3 44 +Gast.CommandLine getOptions;5 0 1 0 1 0 74 +Gast.Testable foldl;863 1 0 0 3 0 298 +Gast.Testable defaultTestConfig 1 0 0 1 10 46 +Gast.Testable Test 1 0 0 4 0 110 +StdList ++ 186 227 0 639 672 20814 +Data.Tuple tuple3 0 0 1 2 5 38 +Gast.CommandLine test;534 0 0 1 8 55 1102 +Gast.CommandLine seqSt;33 2 0 0 5 0 1098 +StdList isMember 1 0 0 1 0 40 +Gast.CommandLine [line:61];16;531 0 0 1 3 8 258 +StdList filter 1 163 0 291 378 11198 +StdList map 153 1000323 0 2000830 6002742 43490834 +Gast.CommandLine [line:54];8;553 1 0 0 2 3 196 +Testing.Options fromGenericTestOptions;16 1 0 0 8 0 288 +Testing.Options gDefault_TestOptions;1 0 1 0 4 34 114 +Data.GenDefault gDefault__List;10 0 4 0 4 0 76 +Data.GenDefault gDefault_FIELD;7 0 6 0 6 0 122 +Data.GenDefault gDefault_PAIR;4 0 4 0 4 0 94 +Gast.CommandLine fromGenericOptions;58 1 0 0 9 0 510 +Data.GenDefault gDefault_RECORD;9 2 0 0 2 0 68 +Gast.CommandLine gDefault_Options;36 0 1 0 4 35 98 +Data.Error fromOk 1 0 0 2 0 224 +Data.Error isError 1 0 0 1 0 20 +System.Options parse;13 1 0 0 1 0 20 +System.CommandLine _f2.c;10;66;2.c;10;66;2.+;6.one;11 0 1 0 2 0 38 +System.CommandLine c;10;66;2 2 0 0 2 7 58 +System._Pointer readInt4Z 1 0 0 1 0 50 +System.CommandLine global_argclc;4 1 0 0 1 0 18 +System.CommandLine global_argc;3 1 0 0 2 0 36 +System.CommandLine getCommandLine 0 1 0 5 6 6262 +_system _S.1 23 1004477 0 3009587 0 64721064 +Gast.CommandLine _match0 0 1 0 2 0 214 +_system _S.2 0 1000602 0 2001251 0 43197914 +System.Options parseOptions 1 0 0 3 5 360 +Gast.CommandLine exposeProperties 1 0 0 7 52 12350 +test Start 0 1 0 2 42 10140 +System start 0 0 0 1 5 604 diff --git a/gast-der/test.icl b/gast-der/test.icl new file mode 100644 index 0000000..1659d82 --- /dev/null +++ b/gast-der/test.icl @@ -0,0 +1,19 @@ +module test + +import StdEnv +import Data.Func +import Control.GenBimap +import Clean.Types + +import Gast +import Gast.CommandLine + +derive class Gast Constructor, Type, TypeDef, TypeDefRhs, RecordField, Maybe, TypeRestriction, Priority +derive gEq Constructor, Type, TypeDef, TypeDefRhs, RecordField, TypeRestriction, Priority + +//million +numt :== 1000000 +Start w = exposeProperties [Concise (dec numt)] [Tests numt] [prop] w + +prop :: Constructor -> Bool +prop x = gEq{|*|} x x diff --git a/gast-der/testnf b/gast-der/testnf new file mode 100755 index 0000000..3dc81f7 Binary files /dev/null and b/gast-der/testnf differ diff --git a/gast-der/testnf Time Profile.pcl b/gast-der/testnf Time Profile.pcl new file mode 100644 index 0000000..e2fef20 --- /dev/null +++ b/gast-der/testnf Time Profile.pcl @@ -0,0 +1,400 @@ +Gast.Testable blank 2 0 0 3 13 152 +Gast.Testable withBlank;72 1 0 0 2 17 148 +Gast.Testable _f13.showName.<+.toString;.toString; 0 1 0 2 2 60 +Gast.Testable showName 1 0 0 2 5 60 +Gast.Testable msgStr;590 1 0 0 1 0 38 +Text copyChars;45 3 0 0 3 0 216 +Text concat`;44 1 0 0 4 0 210 +Text +;41 4 0 0 4 13 360 +Text.Language pluralise 1 0 0 1 6 182 +Text.Language [line:26];38;5 1 0 0 2 0 246 +Text.Language _f1.pluralisen._if;26;38;5.==;16 0 1 0 2 0 96 +Text.Language _f0.pluralisen.<+.toString;.toString; 0 1 0 2 2 42 +Text <+ 4 0 0 12 19 1470 +Text.Language pluralisen 0 1 0 3 6 114 +Gast.Testable showLabels;74 1 0 0 1 2 22 +StdOrdList msort;21 1 0 0 1 0 56 +StdOrdList pair;20 1 0 0 1 0 46 +StdOrdList sort 1 0 0 4 6 378 +Gast.Testable [line:222];18;615 1 0 0 3 10 496 +Gast.Testable [line:225];18;617 0 1 0 2 0 296 +Text [line:12];49;103 3 0 0 3 0 64 +Text foldl;104 1 0 0 6 0 522 +Text concat;1 1 0 0 3 5 494 +Gast.Testable conclude;73 1 0 0 2 23 42 +Gast.Testable [line:200];14;619 1 0 0 3 10 576 +Gast.Testable humanReadableResOutput 0 0 1 5 9 936 +Gast.Testable PassedTest 0 1 0 1 3 146 +Gast.Testable TestsResult 0 1 0 2 2 88 +Gast.CommandLine snd;47 2 0 0 2 0 44 +System.File fflushl;18 2 0 0 2 0 19572 +System.File fflush 2 0 0 4 0 92 +Gast.CommandLine [line:89];23;527 2 0 0 6 10 35752 +Gast.Gen [line:112];87;434 1 0 0 1 21 24 +Gast.Gen _f6.ggen_Int;6._if;112;87;434.==;16.maxint 0 1 0 3 0 310 +Gast.Gen _f0.ggen_EITHER;13.map 0 1 0 3 0 62 +test gEq_PAIR;555 152254 0 0 456770 0 9505262 +test gEq_PAIR;558 152254 0 0 456766 0 9740300 +test gEq_CONS;557 152254 0 0 304508 0 6642588 +Gast.Gen g_c1;112;75;433 4 0 0 4 16 86 +Gast.Gen c;112;71;406 3 1 0 8 0 268 +Gast.Gen c;112;36;405 3 0 0 6 51 248 +Gast.Gen _f5.ggen_Int;6.c;112;36;405.-;7 0 3 0 6 0 410 +test gEq_CONS;550 134152 0 0 268308 0 5718928 +test gEq_EITHER;570 152087 0 0 304174 0 7117032 +Data.Map [line:1829];27;514 10 0 0 10 40 1160 +Gast.Gen _f19.g_c1;194;34;449.+;6.one;11 0 583 0 583 0 11814 +StdList _f5.take;88.take;88.-;7 0 583 0 1166 0 26726 +test gEq_EITHER;583 287939 0 0 575878 0 12966084 +Gast.Gen _f18.genElem;71.toChar;21.+;6.rem;28.abs;13 0 634 0 634 0 14072 +Gast.Gen genElem;71 0 0 634 1268 3804 28082 +StdList take;88 634 0 0 634 1749 13658 +StdList repeat 0 51 0 51 0 1960 +Gast.Gen _f17.rndStrings;72.rndStrings;72.+;6.rem;28 0 55 0 110 0 4564 +test gEq_PAIR;565 298624 0 0 895876 0 18534140 +test gEq_CONS;564 298624 0 0 597248 0 12894750 +Gast.Gen g_c1;194;34;449 692 0 0 2543 1902 68954 +Gast.Gen cu;194;30;414 692 0 0 1384 0 28162 +Gast.Gen g_c1;194;34;450 692 0 0 1960 0 41028 +Gast.Gen cu;194;30;415 692 0 0 1384 0 32826 +StdList take 58 0 0 160 0 7532 +StdList repeatn 58 0 0 116 174 8848 +Gast.Gen _f15.rndStrings;72.repeatn.rem;28.abs;13 0 58 0 116 0 17384 +StdFunc seqList 0 692 0 2025 13314 61724 +Gast.Gen _f16.rndStrings;72.cu;194;30;414._createArray;16.cu;194;30;415 0 58 0 232 220 18610 +Math.Random _f0.gr_mti;5.gr_mti;5.+;6.one;11 0 747 0 1494 0 36484 +Math.Random gr_mti;5 750 0 0 751 5250 21806 +Math.Random ind;4 2496 0 0 2496 0 50922 +Math.Random new_mti;6 4 0 0 2500 0 55068 +Math.Random init_i;21 3 0 0 3 0 11400 +Math.Random initrand 3 0 0 6 0 158 +Math.Random genRandInt 3 0 0 13 1881 4932 +Gast.Gen aStream 0 3 0 6 0 298 +Data.GenEq gEq_Int;7 706923 0 0 706923 0 14516970 +test gEq_CONS;579 706923 0 0 1413847 0 29450470 +test gEq_EITHER;585 706923 0 0 1413846 0 30234434 +test gEq_OBJECT;584 706923 0 0 1413846 0 29452524 +test toGenericPriority;128 1413846 0 0 1413897 6807140 36360214 +test fromGenericPriority;127 0 0 8 8 64 1946 +test isoPriority;129 0 1 0 1 0 22 +test gEq_Priority;33 0 0 706923 3534662 5655384 73720452 +Data.Maybe gEq_CONS;57 707920 0 0 1415840 0 29425306 +Gast.Gen ggen_Int;6 0 0 3 6 54 1048 +test tdi_Priority;120 0 4 0 4 32 1068 +test gti_NoAssoc;123 0 1 0 1 8 24 +test cdi_NoAssoc;126 0 1 0 1 13 24 +test gti_RightAssoc;122 0 1 0 1 8 22 +test cdi_RightAssoc;125 0 1 0 1 13 2480 +test gti_LeftAssoc;121 0 1 0 1 8 22 +test cdi_LeftAssoc;124 0 1 0 1 13 20 +test cli_Priority;119 0 1 0 1 15 20 +test ggen_Priority;24 0 0 1 4 68 184 +System garbage_collector 5089 0 0 5089 -859551493 999662148 +test gEq_CONS;551 441859 0 0 883726 0 18412644 +test gEq_EITHER;568 502825 0 0 1005650 0 21560478 +test gEq_EITHER;576 654912 0 0 1309824 0 27968482 +Gast.Gen _f20._c;152;15;454.map 0 8 0 24 0 1540 +Gast.Gen rndStrings;72 55 6 0 177 1059 12790 +test gEq_PAIR;562 992114 0 0 2976352 0 61639022 +test gEq_CONS;561 992114 0 0 1984228 0 41367770 +test gEq_EITHER;575 992269 0 0 1984538 0 41128868 +test gEq_OBJECT;574 992269 0 0 1984538 0 41520740 +test toGenericTypeRestriction;117 1984538 0 0 1984617 13891766 47686756 +test fromGenericTypeRestriction;116 0 0 6 12 42 1454 +test isoTypeRestriction;118 0 2 0 2 0 70 +test gEq_TypeRestriction;32 0 0 992269 4961413 7938152 103412512 +test tdi_TypeRestriction;111 0 6 0 6 48 246 +test gti_Derivation;113 0 4 0 4 60 156 +test cdi_Derivation;115 0 2 0 2 26 46 +test gti_Instance;112 0 4 0 4 88 100 +test cdi_Instance;114 0 2 0 2 26 64 +test cli_TypeRestriction;110 0 2 0 2 18 64 +test ggen_TypeRestriction;21 0 0 2 8 122 2820 +test gEq_CONS;547 1368519 0 0 2737038 0 56804382 +test gEq_EITHER;567 1459807 0 0 2919614 0 60606330 +test gEq_EITHER;573 1740341 0 0 3480682 0 73149952 +test gEq_EITHER;578 2395253 0 0 4790506 0 100357216 +test gEq_OBJECT;577 2395253 0 0 4790506 0 101193594 +test toGenericType;62 4790506 0 0 4790760 40819774 129072896 +test fromGenericType;61 0 0 23 31 251 8076 +test isoType;63 0 10 0 10 0 276 +test gEq_Type;28 585030 0 1810223 11391363 17991964 238064582 +test tdi_Type;46 0 30 0 30 240 1834 +test gti_Arrow;53 0 10 0 10 150 258 +test cdi_Arrow;60 0 10 0 10 130 408 +test gti_Forall;52 0 11 0 11 319 426 +test cdi_Forall;59 0 10 0 10 130 212 +test gti_Uniq;51 0 10 0 10 80 196 +test cdi_Uniq;58 0 10 0 10 130 304 +test gti_Cons;50 0 11 0 11 242 358 +test cdi_Cons;57 0 10 0 10 130 568 +Data.Set [line:589];35;169 40 0 0 40 360 862 +test gti_Var;49 0 10 0 10 80 250 +test cdi_Var;56 0 10 0 10 130 378 +Data.Set [line:585];21;170 424 0 0 464 1152 14064 +test gti_Func;48 0 11 0 11 319 646 +test cdi_Func;55 0 10 0 10 130 392 +Data.Set [line:576];10;166 265 0 0 265 1305 7146 +Data.Set [line:575];18;171 689 0 0 1378 0 31096 +Data.Set balanceL 689 0 0 1378 0 29036 +test gti_Type;47 0 12 0 12 264 678 +test cdi_Type;54 0 10 0 10 130 366 +test cli_Type;45 0 10 0 10 390 330 +test ggen_Type;6 0 0 10 40 1600 3498 +Data.GenEq gEq_PAIR;6 0 0 4620394 18481636 9240788 471775958 +Data.Map [line:1820];10;510 51 0 0 51 330 4312 +Data.Map [line:1819];19;515 61 0 0 122 0 4064 +Data.Map balance 61 0 0 122 0 2860 +Data.Map [line:420];31;528 61 0 0 183 183 4106 +Data.Map [line:60];16;526 61 0 0 61 183 5582 +Data.Set member 71 0 78 227 966 30430 +Gast.Gen [line:84];14;395 0 0 71 142 355 7014 +Gast.Gen _f21._f455;455.map 0 15 0 45 0 2856 +Gast.Testable rev;69 1999 0 0 2025 3000000 30802108 +Gast.Gen [line:213];41;427 1003005 0 0 2009131 3009015 42694222 +Gast.Gen _f13.skew;51._if;213;41;427.<;17 0 1003005 0 2006010 0 42274724 +Gast.Testable admin;81 1000000 0 0 1000000 0 21256582 +StdList reverse_;89 2000000 0 0 2000036 6000000 41953228 +StdList reverse 0 2000000 0 4000000 0 82543140 +Gast.Testable [line:42];96;623 0 1000000 0 1000000 0 20777232 +Gast.Testable _upd1 0 1000000 0 4000028 6000000 83057818 +Gast.Testable _match0 0 1000000 0 1000000 0 20890602 +Gast.Testable res 0 1000000 0 2000000 0 41727234 +Gast.Testable [line:363];50;621 0 1000000 0 5000019 3000000 106542034 +test _f0.Start.-;7.one;11 0 1 0 1 0 22 +Gast.Testable _f17._c;353;9;622.+;6.-;7 0 1000000 0 1000000 0 21054756 +Gast.Testable countEvery 0 0 1000000 3000017 2000006 74143570 +Gast.Testable [line:353];9;622 1000001 0 0 1000271 46000015 24823572 +Gast.Testable analyse`;80 1000001 0 0 1000001 9 21216700 +Gast.Testable analyse;79 1000001 0 0 3000037 6000006 62317886 +Data.Maybe gEq_UNIT;58 733940 0 0 733940 0 15204358 +Data.Maybe gEq_CONS;103 733940 0 0 1467880 0 30620354 +Data.Maybe gEq_EITHER;107 1441860 0 0 2883720 0 60161216 +Data.Maybe gEq_OBJECT;106 1441860 0 0 2883720 0 60016360 +Data.Maybe toGenericMaybe;53 2883720 0 0 2883791 11534880 64874614 +Data.Maybe gEq_Maybe;37 1441860 0 0 5767511 8651160 119837438 +test fromGenericMaybe;107 0 0 13 13 91 2578 +test isoMaybe;109 0 4 0 4 0 82 +test gEq_FIELD;589 1000001 0 0 2000020 0 41836966 +test gEq_PAIR;593 1000001 0 0 3000003 0 65906500 +test gEq_PAIR;594 1000001 0 0 3000003 0 71121322 +Data.GenEq gEq_UNIT;5 0 0 4296625 8593287 8593250 177381446 +Data.GenEq gEq_CONS;1 0 0 8917019 26751180 17834038 553570280 +Data.GenEq gEq_EITHER;4 0 0 8917019 26751158 17834038 588362256 +Data.GenEq gEq_OBJECT;0 8917019 0 0 17834038 0 372012268 +Data.GenEq toGeneric_List;31 17834038 0 0 17834639 99058516 402776964 +Data.GenEq gEq__List;14 4296625 0 4620394 40289497 169747130 840905454 +test gEq_FIELD;587 3000003 0 0 6000234 0 124515460 +Data.GenEq gEq__String;11 3659258 0 1818899 7297090 3637798 221179246 +test gEq_FIELD;586 1000001 0 0 2000052 0 41529666 +test gEq_PAIR;597 1000001 0 0 3000003 0 62194156 +test gEq_PAIR;599 1000001 0 0 3000003 0 72202894 +test gEq_RECORD;598 1000001 0 0 2000002 0 41929962 +test toGenericConstructor;43 2000002 0 0 2000277 44000044 44783912 +test gEq_Constructor;600 1000001 0 0 4000043 6000006 82813442 +Gast.Gen _f12.g_c1;210;58;425 0 1003028 0 1003042 3009084 21440292 +test fromGenericConstructor;42 0 0 1000001 2002924 9000009 46815030 +test isoConstructor;44 0 1 0 1 0 20 +test prop 0 0 1000001 4999601 2000002 103754448 +Gast.Testable evaluate;24 0 0 1000001 2000119 20000020 47683900 +Gast.Testable apply 0 1000001 0 2000168 28000028 60698564 +Gast.Testable f;68 1 1000000 0 3002087 14012005 84111276 +Gast.Testable diagonal 1 0 0 2 0 42 +Gast.Testable g_c1;72;63;607 1000001 0 0 1000093 14000014 21408052 +Gast.Testable c;72;59;67 1 1000000 0 4000050 8000008 84897604 +Gast.Testable forAll 1 0 0 3 12 146 +Gast.Gen ggen__String;10 0 0 21 41 336 1386 +Gast.Gen g_c1;210;58;425 1003028 0 0 1003081 8024224 21708774 +Gast.Gen map/PAIR;169 0 0 154 154 1386 6526 +Gast.Gen bimap/PAIR;170 0 154 0 154 2772 7674 +Gast.Gen map/CONS;171 0 0 154 154 924 6510 +Gast.Gen bimap/CONS;172 0 154 0 154 1540 10170 +Gast.Gen map/EITHER;175 0 0 154 154 924 10016 +Gast.Gen bimap/EITHER;176 0 154 0 154 2772 4990 +StdGeneric _f1.doit;35.doit;35.-;7./;10.-;7./;10 0 40 0 80 0 2134 +Gast.Gen _upd3 0 48 0 96 336 5020 +Gast.Gen tdi__List;134 0 48 0 48 384 1088 +Gast.Gen recInfo 0 97 0 97 0 2176 +Data.Set singleton 213 0 0 213 639 7468 +Data.Set insert 902 0 0 2494 4134 85288 +Data.Set ins;57 213 0 0 426 0 10150 +Gast.Gen gti__Nil;136 0 20 0 20 120 446 +Gast.Gen cdi__Nil;138 0 20 0 20 260 728 +Gast.Gen gti__Cons;135 0 28 0 28 644 818 +Gast.Gen cdi__Cons;137 0 20 0 20 260 466 +Gast.Gen cli__List;133 0 20 0 20 180 658 +Gast.Gen toGeneric_List;140 0 0 154 308 1540 15096 +Gast.Gen map/OBJECT;177 0 0 154 462 924 16890 +Gast.Gen bimap/OBJECT;178 0 154 0 154 1540 6248 +Gast.Gen fromGeneric_List;139 0 0 308 1674 1540 120582 +Gast.Gen iso_List;141 0 328 0 328 0 10384 +Gast.Gen bimap/fromto;179 0 0 154 462 924 19978 +Gast.Gen bimap/from_Bimap;180 154 0 0 154 4312 4032 +Gast.Gen bimap__List;79 20 134 0 443 4158 19102 +Gast.Gen ggen__List;25 0 0 20 77 1160 6262 +Gast.Gen _upd6 0 23 0 46 161 1416 +Gast.Gen c;210;53;49 0 1003028 0 2007649 0 42339046 +Gast.Gen [line:51];16;428 1567 0 0 1567 0 44200 +Gast.Gen _f14.skew;51.splitAt._c;51;16;428.<;17 0 1567 0 4701 0 130854 +Gast.Gen rev;52 1582 0 0 1626 3005718 27836330 +Gast.Gen g_c1;210;70;426 1567 0 0 1567 12536 96646 +Gast.Gen c;210;65;50 0 1567 0 4700 0 122730 +Gast.Gen skew;51 1003028 0 0 2007703 8044790 43276630 +Gast.Gen diag 23 0 0 46 230 998 +Gast.Gen [line:142];38;451 23 0 0 23 0 616 +Gast.Gen [line:142];62;452 23 0 0 23 0 642 +Gast.Gen get`;396 256 0 0 256 0 22588 +StdList _f1.splitAt.splitAt.-;7 0 1583 0 3166 0 97500 +test gti__Constructor;34 0 1 0 1 57 38 +StdList splitAt 3150 23 0 4764 19092 217398 +Gast.Gen g_c1;183;72;459 177 0 0 177 885 6822 +Gast.Gen c;183;66;68 5 172 0 645 0 42000 +Control.GenBimap map/PAIR;86 0 0 1000051 1000107 9000459 22261608 +Control.GenBimap bimap/PAIR;87 0 1000051 0 1000154 18000918 21438800 +Control.GenBimap map/CONS;78 0 0 1000051 1000080 6000306 20754766 +Control.GenBimap bimap/CONS;79 0 1000051 0 1000107 10000510 21218554 +Control.GenBimap map/EITHER;80 0 0 1000051 1000082 6000306 22038322 +Control.GenBimap bimap/EITHER;81 0 1000051 0 1000139 18000918 21690210 +Gast.Gen g_c1;166;26;457 204 0 0 204 1020 10320 +Gast.Gen c;166;21;64 37 167 0 575 0 22526 +Gast.Gen interleave 66 66 0 207 369 9744 +Gast.Gen _upd2 0 61 0 122 427 4280 +Gast.Gen ggen_UNIT;11 0 0 24 48 72 1240 +StdGeneric _f0.doit;35.doit;35./;10 0 17 0 34 0 1064 +StdList drop 0 65 0 122 0 5564 +Gast.Gen _upd4 0 17 0 34 119 884 +Gast.Gen ggen_CONS;14 0 0 61 286 1159 20024 +Gast.Gen [line:152];15;454 17 0 0 68 204 2278 +Gast.Gen _f455;455 65 0 0 226 576 7306 +Gast.Gen [line:152];15;456 65 0 0 130 0 2744 +StdList isEmpty 66 0 0 66 0 1448 +StdGeneric doit;35 94 0 0 94 171 3344 +test tdi_Maybe;102 0 10 0 10 80 438 +StdGeneric getConsPath 0 37 0 111 0 3612 +Gast.Gen g_c1;169;25;458 37 0 0 37 222 1152 +StdOrdList mergeBy 0 57 0 108 124 5474 +StdOrdList merge_stage;25 47 57 0 134 399 8610 +StdOrdList msort;24 37 0 0 168 423 9158 +Gast.Gen argCount;67 0 0 88 176 176 4134 +Gast.Gen recCount;398 90 226 0 1241 2560 39664 +StdOrdList pair;23 37 57 0 276 513 10556 +StdList or 125 46 0 712 0 18024 +Gast.Gen scanArgs;397 143 226 0 369 1808 10652 +Gast.Gen recArgs 125 18 0 304 0 7062 +Gast.Gen [line:170];30;66 0 0 125 500 1000 12138 +StdOrdList sortBy 0 37 0 185 222 6816 +Gast.Gen c;169;17;65 0 37 0 111 0 5390 +StdList hd 38 37 0 223 0 7774 +Data.Map singleton 37 0 0 37 148 2296 +Data.Set foldl;163 37 0 0 463 639 12210 +Data.Set newSet 37 0 0 37 0 1248 +Data.Set fromList 37 0 0 111 185 3570 +test gti_Just;104 0 4 0 4 44 2574 +test cdi_Just;106 0 4 0 4 52 82 +Gast.Gen allTypes;45 125 357 0 936 1503 33334 +StdList init 125 185 0 495 555 15966 +Gast.Gen types;44 310 185 0 865 1110 28674 +test gti_Nothing;103 0 4 0 4 24 108 +Gast.Gen scan;43 125 0 0 625 750 20832 +test cdi_Nothing;105 0 4 0 4 52 290 +Gast.Gen foldr;392 37 125 0 412 375 21608 +test cli_Maybe;101 0 4 0 4 36 122 +Gast.Gen directNames 0 37 0 148 111 10402 +Data.Maybe maybe 256 37 0 445 0 11788 +Data.Map [line:416];17;525 37 0 0 111 0 6170 +Gast.Gen [line:15];13;394 0 0 37 37 148 2244 +Data.Map alter 98 0 0 294 684 12554 +Data.Map map 169 0 0 372 710 12270 +Data.Map fmap;41 37 0 0 74 0 1848 +Gast.Gen addRecInfo 0 37 0 111 888 5240 +Gast.Gen _upd1 0 37 0 111 259 6812 +Gast.Gen ggen_EITHER;13 0 0 66 260 874 8596 +Gast.Gen ggen_OBJECT;15 0 37 0 111 1924 13186 +test ggen_Maybe;18 0 0 4 15 212 894 +Gast.Gen [line:185];12;460 5 0 0 10 0 820 +Gast.Gen get`;416 5 0 0 5 0 100 +test rdi__Constructor;36 0 5 0 5 60 102 +Gast.Gen ggen_FIELD;16 0 0 5 30 110 1090 +Gast.Gen _f22.genPairTree.genPairTree.-;7 0 23 0 46 0 2384 +Gast.Gen _upd5 0 23 0 46 161 1136 +Gast.Gen [line:141];7;453 23 0 0 161 483 10314 +Gast.Gen genPairTree 23 85 0 108 690 4646 +Gast.Gen _upd0 0 1 0 2 7 268 +Gast.Gen ggen_PAIR;12 0 0 23 69 69 2134 +Gast.Gen ggen_RECORD;17 0 1 0 3 16 402 +Control.GenBimap toGeneric_List;25 0 0 1000051 2000162 10000510 41606736 +StdGeneric map_to 0 1000205 0 2000410 0 41578788 +Control.GenBimap map/OBJECT;82 0 0 1000051 3000185 6000306 63040476 +Control.GenBimap bimap/OBJECT;83 0 1000051 0 1000116 10000510 20877532 +Control.GenBimap fromGeneric_List;24 0 0 1000051 9000472 3000153 223902774 +Control.GenBimap iso_List;26 0 2000102 0 2000102 0 41373384 +StdGeneric map_from 0 7000975 0 13002205 0 269424978 +Control.GenBimap bimap/fromto;84 0 0 1000051 3000188 6000306 63726392 +Control.GenBimap bimap/from_Bimap;85 1000051 0 0 1000221 28001428 21588942 +Control.GenBimap bimap__List;1 18 1000033 0 3000297 27001377 63599286 +test ggen_Constructor;3 0 0 1 3 97 546 +Gast.Testable generateAll 1 0 0 2 10 538 +Gast.Gen maxint 3 1 0 6 0 518 +Gast.Gen genState 0 1 0 5 13 138 +Gast.Testable evaluate;30 0 0 1 4 16 528 +Data.Map newMap 3 0 0 3 0 82 +Gast.Testable newAdmin 0 1 0 3 9 282 +Gast.CommandLine evaluate;3 0 0 1 3 12 488 +Gast.Testable _f16.testConfig.analyse;79 0 1 0 3 0 732 +Gast.CommandLine foldl;529 1000002 0 0 1000006 0 20706916 +Gast.CommandLine foldl;528 1000002 0 0 2000004 0 41258292 +Gast.Testable [line:107];27;609 1000002 0 0 2000002 10 42337524 +Gast.ThunkNames thunk_name_to_string 2 0 0 2 6 518 +Gast.Testable testname;31 0 0 2 6 4 850 +Gast.CommandLine testname;4 0 0 2 6 4 868 +Gast.Testable noBeforeOutput 0 0 1 3 2 142 +Gast.Testable [line:111];9;608 1000002 0 0 2000004 0 42491312 +Gast.Testable printEvents 2000002 2 0 4000008 0 83932984 +Gast.CommandLine [line:90];15;552 1000002 0 0 1000003 0 23898408 +Gast.CommandLine stream;21 1 0 0 4000078 15000030 85790418 +Gast.Testable countPrintConfig 1 0 0 1 13 22 +Gast.Testable handleOption;76 0 1 0 3 3 312 +Gast.CommandLine getPrintOptions;6 0 1 0 1 0 96 +Gast.Testable foldl;594 1 0 0 3 3 142 +Gast.Testable foldl;593 0 0 1 4 6 132 +Gast.Testable toPrintConfig 1 0 0 1 3 20 +Gast.Testable testConfig 1 0 0 1 22 26 +Gast.Testable handleOption;77 1 0 0 1 3 46 +Gast.CommandLine getOptions;5 0 1 0 1 0 92 +Gast.Testable foldl;595 1 0 0 3 0 310 +Gast.Testable defaultTestConfig 1 0 0 1 10 30 +Gast.Testable Test 1 0 0 4 0 80 +StdList ++ 186 227 0 639 672 18956 +Data.Tuple tuple3 0 0 1 2 5 68 +Gast.CommandLine test;534 0 0 1 8 55 1422 +Gast.CommandLine seqSt;33 2 0 0 5 0 544 +StdList isMember 1 0 0 1 0 40 +Gast.CommandLine [line:61];16;531 0 0 1 3 8 232 +StdList filter 1 163 0 291 378 11838 +StdList map 153 1000323 0 2000830 6002742 42341434 +Gast.CommandLine [line:54];8;553 1 0 0 2 3 6154 +Testing.Options gDefault_Bool;9 0 1 0 1 0 20 +Testing.Options fromGenericTestOptions;16 1 0 0 9 0 304 +Testing.Options gDefault_TestOptions;1 0 1 0 4 35 124 +Data.GenDefault gDefault__List;10 0 4 0 4 0 82 +Data.GenDefault gDefault_FIELD;7 0 6 0 6 0 122 +Data.GenDefault gDefault_PAIR;4 0 4 0 4 0 80 +Gast.CommandLine fromGenericOptions;58 1 0 0 9 0 502 +Data.GenDefault gDefault_RECORD;9 2 0 0 2 0 68 +Gast.CommandLine gDefault_Options;36 0 1 0 4 35 502 +Data.Error fromOk 1 0 0 2 0 204 +Data.Error isError 1 0 0 1 0 22 +System.Options parse;13 1 0 0 1 0 20 +System.CommandLine _f2.c;10;66;2.c;10;66;2.+;6.one;11 0 1 0 2 0 42 +System.CommandLine c;10;66;2 2 0 0 2 7 78 +System._Pointer readInt4Z 1 0 0 1 0 42 +System.CommandLine global_argclc;4 1 0 0 1 0 18 +System.CommandLine global_argc;3 1 0 0 2 0 72 +System.CommandLine getCommandLine 0 1 0 5 6 358 +_system _S.1 23 1004477 0 3009587 0 62980786 +Gast.CommandLine _match0 0 1 0 2 0 268 +_system _S.2 0 1000602 0 2001251 0 41713322 +System.Options parseOptions 1 0 0 3 5 338 +Gast.CommandLine exposeProperties 1 0 0 7 52 11708 +test Start 0 1 0 2 42 9084 +System start 0 0 0 1 5 474 diff --git a/gast-itasks/test.icl b/gast-itasks/test.icl new file mode 100644 index 0000000..1e88a43 --- /dev/null +++ b/gast-itasks/test.icl @@ -0,0 +1,22 @@ +module test + + +import StdMisc +import Gast +import Gast.CommandLine +import System._Unsafe +import iTasks => qualified label +import iTasks.Internal.IWorld + +instance Testable (Maybe a) | Testable a +where + evaluate Nothing genState result = evaluate False genState result + evaluate (Just a) genState result = evaluate a genState result + testname m = "Maybe" + +instance Testable (Task a) | iTask, Testable a +where + evaluate task genState result = evaluate (accUnsafe (runTask task)) genState result + testname task = "Task" + +Start = test (\i->treturn (i < 5) == i) diff --git a/hex/hex.icl b/hex/hex.icl new file mode 100644 index 0000000..b8bf73d --- /dev/null +++ b/hex/hex.icl @@ -0,0 +1,10 @@ +module hex + +Start = + [ 42 + , -42 + , +42 + , 0x2a + , -0x2a + , +0x2a + ] diff --git a/letrec/test.icl b/letrec/test.icl new file mode 100644 index 0000000..13267af --- /dev/null +++ b/letrec/test.icl @@ -0,0 +1,6 @@ +module test + +Start = + let a = b + b = f a + in a diff --git a/list_types/test.icl b/list_types/test.icl new file mode 100644 index 0000000..aebcdb7 --- /dev/null +++ b/list_types/test.icl @@ -0,0 +1,7 @@ +module test + +import StdEnv + +a x y = x + y + +Start = a 4 5 diff --git a/newtype-editor/test.icl b/newtype-editor/test.icl index 8208eb5..7f4816d 100644 --- a/newtype-editor/test.icl +++ b/newtype-editor/test.icl @@ -1,15 +1,9 @@ module test import iTasks - -derive class iTask T1 - -:: T1 = - { f1 :: Bool - , f2 :: Bool - } +import qualified Data.Map as DM Start w = startEngine t w -t :: Task (Maybe T1) -t = enterInformation () [] +t :: Task ('DM'.Map Int String) +t = viewInformation () [] ('DM'.fromList [(42, "foo")]) diff --git a/parallel-action/test.icl b/parallel-action/test.icl index 8877787..9e16574 100644 --- a/parallel-action/test.icl +++ b/parallel-action/test.icl @@ -9,11 +9,11 @@ Start w = startEngineWithOptions [(Embedded, tab "tab1") ,(Embedded, tab "tab2") ] - [ OnAction (Action "New") (always (Embedded, \l->appendTask Embedded (tab "New tab") l @! ())) - , OnAction (Action " ") (always (Embedded, \l->appendTask Embedded (tab "New tab") l @! ())) - , OnAction (Action "Close") (never (Embedded, \l->treturn ())) - , OnAction (Action "Dis no icon") (never (Embedded, \l->treturn ())) - , OnAction (Action "+") (always (Embedded, \r->treturn ())) + [ 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)) diff --git a/randdist/test.icl b/randdist/test.icl index 7acdd25..0f38841 100644 --- a/randdist/test.icl +++ b/randdist/test.icl @@ -3,7 +3,7 @@ module test import Data.Func, Math.Random import StdArray, StdList, StdFunc, StdArrayExtensions -num :== 100000000 +num :== 1000000 lim :== 100 Start :: {!Int} diff --git a/randdist/testsk b/randdist/testsk new file mode 100755 index 0000000..1bf890b Binary files /dev/null and b/randdist/testsk differ diff --git a/randdist/testsk.icl b/randdist/testsk.icl new file mode 100644 index 0000000..d5a7f79 --- /dev/null +++ b/randdist/testsk.icl @@ -0,0 +1,14 @@ +module testsk + +import Data.Func, Math.Random +import StdArray, StdList, StdFunc, StdArrayExtensions + +num :== 10000000 +lim :== 100 + +Start :: {!Int} +Start + = foldl (flip (updateArrElt inc)) (createArray (lim*50) 0) + $ take num + $ map (\x->toInt ((ln x) * fromInt lim - 0.5)) + $ genRandReal 42 diff --git a/randstring/test.icl b/randstring/test.icl new file mode 100644 index 0000000..3040ccf --- /dev/null +++ b/randstring/test.icl @@ -0,0 +1,21 @@ +module test + +import StdEnv, StdArrayExtensions +import Data.Func, Math.Random +import Gast +import Gast.CommandLine + +//num :== 10000000 +//lim :== 100 +// +//Start :: {!Int} +//Start +// = foldl (flip (updateArrElt inc)) (createArray lim 0) +// $ take num +// $ map (\x->size $ hd [x,""]) +// $ ggenString lim 8.0 0 127 + +Start w = exposeProperties [Verbose] [Tests 10000] + [ (\a->a == a) For ggenString 5 16.0 32 33 aStream + ] w + diff --git a/real_conv/test.icl b/real_conv/test.icl new file mode 100644 index 0000000..7a1efe3 --- /dev/null +++ b/real_conv/test.icl @@ -0,0 +1,28 @@ +module test + +import StdInt + +Start = convert_float_in_int_to_real + ((convert_real_to_float_in_int 3936146074321813505.0) bitand 0xffffffff ) + +convert_real_to_float_in_int :: !Real -> Int; +convert_real_to_float_in_int r = code { +| cvtsd2ss %xmm0,%xmm0 + instruction 242 + instruction 15 + instruction 90 + instruction 192 +}; + +convert_float_in_int_to_real :: !Int -> Real; +convert_float_in_int_to_real r = code { +.d 0 1 r + jmp _convert_float_in_int_to_real_ +.o 0 1 r + :_convert_float_in_int_to_real_ +| cvtss2ds %xmm0,%xmm0 + instruction 243 + instruction 15 + instruction 90 + instruction 192 +}; diff --git a/filepicker/Makefile b/sequence_slow/Makefile similarity index 100% rename from filepicker/Makefile rename to sequence_slow/Makefile diff --git a/sequence_slow/test.icl b/sequence_slow/test.icl new file mode 100644 index 0000000..58ea034 --- /dev/null +++ b/sequence_slow/test.icl @@ -0,0 +1,11 @@ +module test + +import Data.Func +import iTasks +import iTasks.Extensions.DateTime + +Start w = startEngine ( + sequence (map t [0..3]) >>- traceValue) w + +t i = waitForTimer 1 -|| viewInformation () [] (toString i +++ "th item") + >>- \_->treturn i