more work on case

This commit is contained in:
2024-08-22 13:33:16 -07:00
parent 1fef9dcfc6
commit f6e47c8d22
8 changed files with 169 additions and 19 deletions

View File

@@ -9,6 +9,7 @@ import Data.List
import Lib.Types -- Name / Tm
import Lib.TopContext
import Lib.TT -- lookupMeta
import Lib.Util
public export
data CExp : Type
@@ -31,13 +32,6 @@ data CExp : Type where
CRef : Name -> CExp
CMeta : Nat -> CExp
funArgs : Tm -> (Tm, List Tm)
funArgs tm = go tm []
where
go : Tm -> List Tm -> (Tm, List Tm)
go (App _ t u) args = go t (u :: args)
go t args = (t, args)
||| I'm counting Lam in the term for arity. This matches what I need in
||| code gen.
export