add smoke tests

This commit is contained in:
2024-09-07 14:47:41 -07:00
parent 88d8c73e36
commit 7154f874bf
16 changed files with 31 additions and 37 deletions

View File

@@ -0,0 +1,25 @@
module Scratch2
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
-- failed to unify _:1 with Val
-- Legit on RHS, IMO. On LHS, we should be dotting?
-- I either need to unify and collect constraints or figure out how
-- other systems manage this.
-- Note that an unused
-- variable may stand for either a wildcard or a forced pattern. In the latter case our algorithm
-- treats it as a let-bound variable in the right-hand side of the clause.
-- we need let-bound in environment but we do have define.
fromMaybe : Maybe Nat -> Nat
fromMaybe (Just x) = x
fromMaybe Nothing = Z