This PR sets up the new integrated test/bench suite. It then migrates all benchmarks and some related tests to the new suite. There's also some documentation and some linting. For now, a lot of the old tests are left alone so this PR doesn't become even larger than it already is. Eventually, all tests should be migrated to the new suite though so there isn't a confusing mix of two systems.
21 lines
533 B
Text
21 lines
533 B
Text
def tuple (types : List Type) : Type :=
|
||
match types with
|
||
| [] => Unit
|
||
| [t] => t
|
||
| t :: types => t × tuple types
|
||
|
||
def uncurried ins out := tuple ins -> out
|
||
|
||
def curried (ins : List Type) out := match ins with
|
||
| [] => out
|
||
| (x :: xs) => x -> curried xs out
|
||
|
||
def curry (f : uncurried ins out) : curried ins out :=
|
||
match ins with
|
||
| [] => f ()
|
||
| [_] => f
|
||
| (_ :: _ :: _) => λx => curry (λxs => f (x, xs))
|
||
|
||
def main : IO Unit := do
|
||
let val : String := curry (ins := [Int, String]) Prod.snd 1 "a"
|
||
IO.println val
|