2020-05-19 20:25:18 +03:00
|
|
|
module Main
|
|
|
|
|
|
|
|
import Data.Maybe
|
|
|
|
import Data.List
|
2020-08-04 22:03:18 +03:00
|
|
|
import Data.List1
|
2020-05-19 20:25:18 +03:00
|
|
|
import Data.Strings
|
|
|
|
|
|
|
|
import System
|
|
|
|
import System.Directory
|
|
|
|
import System.File
|
2020-05-22 15:27:12 +03:00
|
|
|
import System.Info
|
2020-05-20 19:14:38 +03:00
|
|
|
import System.Path
|
2020-05-19 20:25:18 +03:00
|
|
|
|
2020-10-19 11:26:23 +03:00
|
|
|
import Lib
|
|
|
|
|
2020-05-19 20:25:18 +03:00
|
|
|
%default covering
|
|
|
|
|
|
|
|
------------------------------------------------------------------------
|
|
|
|
-- Test cases
|
|
|
|
|
2020-10-19 11:26:23 +03:00
|
|
|
ttimpTests : TestPool
|
|
|
|
ttimpTests = MkTestPool []
|
|
|
|
["basic001", "basic002", "basic003", "basic004", "basic005",
|
2020-05-19 20:25:18 +03:00
|
|
|
"basic006",
|
|
|
|
"coverage001", "coverage002",
|
|
|
|
"dot001",
|
|
|
|
"eta001", "eta002",
|
|
|
|
"lazy001",
|
|
|
|
"nest001", "nest002",
|
|
|
|
"perf001", "perf002", "perf003",
|
|
|
|
"record001", "record002", "record003",
|
2020-05-25 15:14:51 +03:00
|
|
|
"qtt001", "qtt003",
|
2020-05-19 20:31:52 +03:00
|
|
|
"total001", "total002", "total003"]
|
2020-05-19 20:25:18 +03:00
|
|
|
|
2020-10-19 11:26:23 +03:00
|
|
|
idrisTests : TestPool
|
|
|
|
idrisTests = MkTestPool []
|
|
|
|
-- Fundamental language features
|
2020-05-19 20:25:18 +03:00
|
|
|
["basic001", "basic002", "basic003", "basic004", "basic005",
|
|
|
|
"basic006", "basic007", "basic008", "basic009", "basic010",
|
|
|
|
"basic011", "basic012", "basic013", "basic014", "basic015",
|
|
|
|
"basic016", "basic017", "basic018", "basic019", "basic020",
|
|
|
|
"basic021", "basic022", "basic023", "basic024", "basic025",
|
|
|
|
"basic026", "basic027", "basic028", "basic029", "basic030",
|
|
|
|
"basic031", "basic032", "basic033", "basic034", "basic035",
|
|
|
|
"basic036", "basic037", "basic038", "basic039", "basic040",
|
2020-08-27 20:09:39 +03:00
|
|
|
"basic041", "basic042", "basic043", "basic044", "basic045",
|
2020-12-07 14:34:48 +03:00
|
|
|
"basic046", "basic047", "basic048", "basic049", "basic050",
|
2020-12-10 20:09:16 +03:00
|
|
|
"basic051",
|
2020-05-19 20:25:18 +03:00
|
|
|
-- Coverage checking
|
|
|
|
"coverage001", "coverage002", "coverage003", "coverage004",
|
2020-05-24 14:52:07 +03:00
|
|
|
"coverage005", "coverage006", "coverage007", "coverage008",
|
2020-11-11 18:55:30 +03:00
|
|
|
"coverage009", "coverage010", "coverage011",
|
2020-07-08 17:52:57 +03:00
|
|
|
-- Documentation strings
|
2020-07-08 19:56:54 +03:00
|
|
|
"docs001", "docs002",
|
2020-09-09 19:17:07 +03:00
|
|
|
-- Evaluator
|
2020-10-16 00:44:30 +03:00
|
|
|
"evaluator001", "evaluator002", "evaluator003", "evaluator004",
|
2020-05-19 20:25:18 +03:00
|
|
|
-- Error messages
|
|
|
|
"error001", "error002", "error003", "error004", "error005",
|
|
|
|
"error006", "error007", "error008", "error009", "error010",
|
2020-10-16 00:44:30 +03:00
|
|
|
"error011", "error012", "error013", "error014",
|
2020-05-19 20:25:18 +03:00
|
|
|
-- Modules and imports
|
2020-07-04 22:26:49 +03:00
|
|
|
"import001", "import002", "import003", "import004", "import005",
|
2020-05-19 20:25:18 +03:00
|
|
|
-- Interactive editing support
|
|
|
|
"interactive001", "interactive002", "interactive003", "interactive004",
|
|
|
|
"interactive005", "interactive006", "interactive007", "interactive008",
|
|
|
|
"interactive009", "interactive010", "interactive011", "interactive012",
|
2020-08-04 14:51:57 +03:00
|
|
|
"interactive013", "interactive014", "interactive015", "interactive016",
|
2020-08-04 22:55:48 +03:00
|
|
|
"interactive017", "interactive018",
|
2020-05-19 20:25:18 +03:00
|
|
|
-- Interfaces
|
|
|
|
"interface001", "interface002", "interface003", "interface004",
|
|
|
|
"interface005", "interface006", "interface007", "interface008",
|
|
|
|
"interface009", "interface010", "interface011", "interface012",
|
2020-06-11 16:28:34 +03:00
|
|
|
"interface013", "interface014", "interface015", "interface016",
|
2020-12-14 16:38:40 +03:00
|
|
|
"interface017", "interface018", "interface019", "interface020",
|
2020-12-27 16:41:48 +03:00
|
|
|
"interface021",
|
2020-05-19 20:25:18 +03:00
|
|
|
-- Miscellaneous REPL
|
2020-09-23 20:52:38 +03:00
|
|
|
"interpreter001", "interpreter002", "interpreter003", "interpreter004",
|
2020-12-30 02:52:03 +03:00
|
|
|
"interpreter005", "interpreter006",
|
2020-05-19 20:25:18 +03:00
|
|
|
-- Implicit laziness, lazy evaluation
|
|
|
|
"lazy001",
|
|
|
|
-- QTT and linearity related
|
Remove linearity subtyping
It's disappointing to have to do this, but I think necessary because
various issue reports have shown it to be unsound (at least as far as
inference goes) and, at the very least, confusing. This patch brings us
back to the basic rules of QTT.
On the one hand, this makes the 1 multiplicity less useful, because it
means we can't flag arguments as being used exactly once which would be
useful for optimisation purposes as well as precision in the type. On
the other hand, it removes some complexity (and a hack) from
unification, and has the advantage of being correct! Also, I still
consider the 1 multiplicity an experiment.
We can still do interesting things like protocol state tracking, which
is my primary motivation at least.
Ideally, if the 1 multiplicity is going to be more generall useful,
we'll need some kind of way of doing multiplicity polymorphism in the
future. I don't think subtyping is the way (I've pretty much always come
to regret adding some form of subtyping).
Fixes #73 (and maybe some others).
2020-12-27 22:58:35 +03:00
|
|
|
"linear001", "linear002", "linear003",
|
|
|
|
-- "linear004" -- disabled due to requiring linearity subtyping
|
|
|
|
"linear005",
|
2020-06-24 01:10:22 +03:00
|
|
|
"linear006", "linear007", "linear008", "linear009", "linear010",
|
2020-06-29 00:16:15 +03:00
|
|
|
"linear011", "linear012",
|
2020-06-27 20:14:14 +03:00
|
|
|
-- Literate
|
|
|
|
"literate001", "literate002", "literate003", "literate004",
|
|
|
|
"literate005", "literate006", "literate007", "literate008",
|
|
|
|
"literate009", "literate010", "literate011", "literate012",
|
2020-11-26 14:35:55 +03:00
|
|
|
"literate013", "literate014", "literate015", "literate016",
|
2020-06-21 06:33:39 +03:00
|
|
|
-- Namespace blocks
|
|
|
|
"namespace001",
|
2020-05-19 20:25:18 +03:00
|
|
|
-- Parameters blocks
|
|
|
|
"params001",
|
|
|
|
-- Performance: things which have been slow in the past, or which
|
|
|
|
-- pose interesting challenges for the elaborator
|
2020-11-27 21:48:19 +03:00
|
|
|
"perf001", "perf002", "perf003", "perf004", "perf005", "perf006",
|
2020-05-19 20:25:18 +03:00
|
|
|
-- Parse errors
|
|
|
|
"perror001", "perror002", "perror003", "perror004", "perror005",
|
|
|
|
"perror006",
|
|
|
|
-- Packages and ipkg files
|
2020-07-07 22:24:37 +03:00
|
|
|
"pkg001", "pkg002", "pkg003", "pkg004", "pkg005",
|
2020-09-14 18:07:25 +03:00
|
|
|
-- Positivity checking
|
2020-09-16 16:28:18 +03:00
|
|
|
"positivity001", "positivity002", "positivity003",
|
2020-05-19 20:25:18 +03:00
|
|
|
-- Larger programs arising from real usage. Typically things with
|
|
|
|
-- interesting interactions between features
|
|
|
|
"real001", "real002",
|
|
|
|
-- Records, access and dependent update
|
2020-07-06 19:39:55 +03:00
|
|
|
"record001", "record002", "record003", "record004", "record005",
|
2020-10-01 12:41:30 +03:00
|
|
|
"record006",
|
2020-05-30 00:40:29 +03:00
|
|
|
-- Quotation and reflection
|
2020-06-01 17:01:52 +03:00
|
|
|
"reflection001", "reflection002", "reflection003", "reflection004",
|
2020-06-03 11:17:37 +03:00
|
|
|
"reflection005", "reflection006", "reflection007", "reflection008",
|
2020-07-17 17:18:23 +03:00
|
|
|
"reflection009",
|
2020-05-19 20:25:18 +03:00
|
|
|
-- Miscellaneous regressions
|
|
|
|
"reg001", "reg002", "reg003", "reg004", "reg005", "reg006", "reg007",
|
|
|
|
"reg008", "reg009", "reg010", "reg011", "reg012", "reg013", "reg014",
|
2020-06-04 20:21:44 +03:00
|
|
|
"reg015", "reg016", "reg017", "reg018", "reg019", "reg020", "reg021",
|
2020-06-29 17:04:32 +03:00
|
|
|
"reg022", "reg023", "reg024", "reg025", "reg026", "reg027", "reg028",
|
2020-12-07 14:41:47 +03:00
|
|
|
"reg029", "reg030", "reg031", "reg032", "reg033", "reg034", "reg035",
|
2020-05-19 20:25:18 +03:00
|
|
|
-- Totality checking
|
|
|
|
"total001", "total002", "total003", "total004", "total005",
|
2020-09-09 19:09:48 +03:00
|
|
|
"total006", "total007", "total008", "total009", "total010",
|
2020-05-19 20:25:18 +03:00
|
|
|
-- The 'with' rule
|
2020-05-22 21:26:10 +03:00
|
|
|
"with001", "with002",
|
|
|
|
-- with-disambiguation
|
|
|
|
"with003"]
|
2020-05-19 20:25:18 +03:00
|
|
|
|
2020-10-19 11:26:23 +03:00
|
|
|
typeddTests : TestPool
|
|
|
|
typeddTests = MkTestPool []
|
|
|
|
["chapter01", "chapter02", "chapter03", "chapter04", "chapter05",
|
2020-05-19 20:25:18 +03:00
|
|
|
"chapter06", "chapter07", "chapter08", "chapter09", "chapter10",
|
|
|
|
"chapter11", "chapter12", "chapter13", "chapter14"]
|
|
|
|
|
2020-10-19 11:26:23 +03:00
|
|
|
chezTests : TestPool
|
|
|
|
chezTests = MkTestPool [Chez]
|
|
|
|
["chez001", "chez002", "chez003", "chez004", "chez005", "chez006",
|
2020-05-19 20:25:18 +03:00
|
|
|
"chez007", "chez008", "chez009", "chez010", "chez011", "chez012",
|
2020-05-19 23:02:15 +03:00
|
|
|
"chez013", "chez014", "chez015", "chez016", "chez017", "chez018",
|
2020-06-16 13:22:21 +03:00
|
|
|
"chez019", "chez020", "chez021", "chez022", "chez023", "chez024",
|
2020-08-21 11:34:57 +03:00
|
|
|
"chez025", "chez026", "chez027", "chez028", "chez029", "chez030",
|
2020-09-11 09:51:48 +03:00
|
|
|
"chez031",
|
2020-12-04 13:58:26 +03:00
|
|
|
"concurrency001",
|
2020-10-03 16:39:13 +03:00
|
|
|
"perf001",
|
2020-05-19 23:02:15 +03:00
|
|
|
"reg001"]
|
2020-05-19 20:25:18 +03:00
|
|
|
|
2021-01-13 23:54:43 +03:00
|
|
|
racketTests : TestPool
|
|
|
|
racketTests = MkTestPool [Racket]
|
|
|
|
["concurrency001"]
|
|
|
|
|
2020-10-19 11:26:23 +03:00
|
|
|
nodeTests : TestPool
|
|
|
|
nodeTests = MkTestPool [Node]
|
|
|
|
[ "node001", "node002", "node003", "node004", "node005", "node006", "node007", "node008", "node009"
|
2020-06-21 19:54:50 +03:00
|
|
|
, "node011", "node012", "node015", "node017", "node018", "node019" -- node014
|
2020-08-20 17:01:09 +03:00
|
|
|
, "node021", "node022" --, "node020"
|
2020-06-12 23:35:08 +03:00
|
|
|
, "reg001"
|
2020-07-14 19:38:47 +03:00
|
|
|
, "syntax001"
|
2020-07-05 13:53:45 +03:00
|
|
|
, "tailrec001"
|
2020-09-19 22:09:36 +03:00
|
|
|
, "idiom001"
|
2020-06-12 23:35:08 +03:00
|
|
|
]
|
2020-06-11 12:52:54 +03:00
|
|
|
|
2020-10-19 11:26:23 +03:00
|
|
|
ideModeTests : TestPool
|
|
|
|
ideModeTests = MkTestPool []
|
|
|
|
[ "ideMode001", "ideMode002", "ideMode003", "ideMode004" ]
|
2020-06-11 12:52:54 +03:00
|
|
|
|
2020-10-19 11:26:23 +03:00
|
|
|
preludeTests : TestPool
|
|
|
|
preludeTests = MkTestPool []
|
|
|
|
[ "reg001" ]
|
2020-05-19 20:25:18 +03:00
|
|
|
|
2020-11-27 18:40:02 +03:00
|
|
|
templateTests : TestPool
|
|
|
|
templateTests = MkTestPool []
|
|
|
|
[ "simple-test", "ttimp", "with-ipkg" ]
|
|
|
|
|
2020-05-19 20:25:18 +03:00
|
|
|
main : IO ()
|
2020-10-19 11:26:23 +03:00
|
|
|
main = runner
|
|
|
|
[ testPaths "ttimp" ttimpTests
|
|
|
|
, testPaths "idris2" idrisTests
|
|
|
|
, testPaths "typedd-book" typeddTests
|
|
|
|
, testPaths "ideMode" ideModeTests
|
|
|
|
, testPaths "prelude" preludeTests
|
|
|
|
, testPaths "chez" chezTests
|
2021-01-13 23:54:43 +03:00
|
|
|
, testPaths "racket" racketTests
|
2020-10-19 11:26:23 +03:00
|
|
|
, testPaths "node" nodeTests
|
2020-11-27 18:40:02 +03:00
|
|
|
, testPaths "templates" templateTests
|
2020-10-19 11:26:23 +03:00
|
|
|
] where
|
|
|
|
|
|
|
|
testPaths : String -> TestPool -> TestPool
|
|
|
|
testPaths dir = record { testCases $= map ((dir ++ "/") ++) }
|