Newt in Newt compiles (but does not run)
This commit is contained in:
@@ -11,16 +11,16 @@ funArgs tm = go tm Nil
|
||||
go t args = (t, args)
|
||||
|
||||
data Binder : U where
|
||||
MkBind : FC -> String -> Icit -> Quant -> Tm -> Binder
|
||||
MkBinder : FC -> String -> Icit -> Quant -> Tm -> Binder
|
||||
|
||||
-- I don't have a show for terms without a name list
|
||||
|
||||
instance Show Binder where
|
||||
show (MkBind _ nm icit quant t) = "(\{show quant}\{nm} \{show icit} : ... :: Nil)"
|
||||
show (MkBinder _ nm icit quant t) = "(\{show quant}\{nm} \{show icit} : ... :: Nil)"
|
||||
|
||||
splitTele : Tm -> (Tm × List Binder)
|
||||
splitTele = go Nil
|
||||
where
|
||||
go : List Binder -> Tm -> (Tm × List Binder)
|
||||
go ts (Pi fc nm icit quant t u) = go (MkBind fc nm icit quant t :: ts) u
|
||||
go ts (Pi fc nm icit quant t u) = go (MkBinder fc nm icit quant t :: ts) u
|
||||
go ts tm = (tm, reverse ts)
|
||||
|
||||
Reference in New Issue
Block a user