3import Data.IntMap as IMap
4import Data.Map.Strict as Map
7data Codegen = C | JS deriving (Show, Eq, Ord)
9data CompatCodegen = ANY | C_CG | NODE_CG | NONE
11-- A TestFamily groups tests that share the same theme
12data TestFamily = TestFamily {
13 -- A shorter lowcase name to use in filenames
15 -- A proper name for the test family that will be displayed
17 -- A map of test metadata:
18 -- - The key is the index (>=1 && <1000)
19 -- - The value is the set of compatible code generators,
20 -- or Nothing if the test doesn't depend on a code generator
21 tests :: IntMap (Maybe (Set Codegen))
24toCodegenSet :: CompatCodegen -> Maybe (Set Codegen)
25toCodegenSet compatCodegen = fmap Set.fromList mList where
26 mList = case compatCodegen of
29 NODE_CG -> Just [ JS ]
32testFamilies :: [TestFamily]
33testFamilies = fmap instantiate testFamiliesData where
34 instantiate (id, name, testsData) = TestFamily id name tests where
35 tests = IMap.fromList (fmap makeSetCodegen testsData)
36 makeSetCodegen (index, codegens) = (index, toCodegenSet codegens)
38testFamiliesForCodegen :: Codegen -> [TestFamily]
39testFamiliesForCodegen codegen =
40 fmap (\testFamily -> testFamily {tests = IMap.filter f (tests testFamily)})
43 f mCodegens = case mCodegens of
44 Just codegens -> Set.member codegen codegens
47-- The data to instanciate testFamilies
48-- The first column is the id
49-- The second column is the proper name (the prefix of the subfolders)
50-- The third column is the data for each test
51testFamiliesData :: [(String, String, [(Index, CompatCodegen)])]
77 ("bounded", "Bounded",
79 ("corecords", "Corecords",
82 ("delab", "De-elaboration",
84 ("directives", "Directives",
87 ("disambig", "Disambiguation",
89 ("docs", "Documentation",
101 ("effects", "Effects",
128 ("folding", "Folding",
130 ("idrisdoc", "Idris documentation",
140 ("interactive", "Interactive editing",
154 ("interfaces", "Interfaces",
167 ("literate", "Literate programming",
169 ("meta", "Meta-programming",
182 ("prelude", "Prelude",
184 ("primitives", "Primitive types",
190 ("proof", "Theorem proving",
202 ("proofsearch", "Proof search",
206 ("pruviloj", "Pruviloj",
208 ("quasiquote", "Quasiquotations",
215 ("records", "Records",
221 ("reg", "Regressions",
245 ("regression", "Regression",
248 ("sourceLocation", "Source location",
250 ("sugar", "Syntactic sugar",
256 ("syntax", "Syntax extensions",
259 ("tactics", "Tactics",
261 ("totality", "Totality checking",
281 ("tutorial", "Tutorial examples",
289 ("unique", "Uniqueness types",
292 ("universes", "Universes",
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list