This commit is contained in:
2024-09-29 07:17:55 -07:00
parent beb7b1a623
commit 9087ee6490
27 changed files with 87 additions and 73 deletions

14
tests/black/Prelude.newt Normal file
View File

@@ -0,0 +1,14 @@
module Prelude
data Nat : U where
Z : Nat
S : Nat -> Nat
data Maybe : U -> U where
Just : {a : U} -> a -> Maybe a
Nothing : {a : U} -> Maybe a
data Either : U -> U -> U where
Left : {a b : U} -> a -> Either a b
Right : {a b : U} -> b -> Either a b

View File

@@ -1,4 +1,4 @@
module Scratch
module Test1
nat : U
nat = {C : U} -> C -> (nat -> C) -> C

View File

@@ -1,4 +1,4 @@
module Scratch
module TestCase
-- I'm testing cases here, but using examples carefully design to be
-- simple case trees. Patterns are a var or a constructor applied to vars.

View File

@@ -1,4 +1,4 @@
module Scratch
module TestCase2
data Nat : U where
Z : Nat

View File

@@ -1,4 +1,4 @@
module Scratch2
module TestCase3
data Nat : U where
Z : Nat

View File

@@ -0,0 +1,7 @@
module TestImport
import Prelude
one : Nat
one = S Z

View File

@@ -1,4 +1,4 @@
module Zoo2
module Zoo2eg
id : (A : U) -> A -> A
id = \ A x => x

View File

@@ -1,4 +1,4 @@
module Zoo3
module Zoo3eg
id : (A : _) -> A -> A
id = \ A x => x

View File

@@ -1,4 +1,4 @@
module Zoo4
module Zoo4eg
id : {A : U} -> A -> A
id = \x => x -- elaborated to \{A} x. x