diff options
author | Greg Brown <greg.brown01@ed.ac.uk> | 2024-01-26 15:13:54 +0000 |
---|---|---|
committer | Greg Brown <greg.brown01@ed.ac.uk> | 2024-01-26 15:13:54 +0000 |
commit | f252e7753887e9d7db5bf9c50cb763ef6ed6d71e (patch) | |
tree | c0297b48e987ace5104951bbca3302f3d9b74f1d | |
parent | bc7b577dfb66ee557abe0f3190366711bdcada0f (diff) |
Redefine `Nil` in terms of `(^)`.
This makes some later inference work better.
-rw-r--r-- | src/SOAS.idr | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/SOAS.idr b/src/SOAS.idr index 714ce15..befd53c 100644 --- a/src/SOAS.idr +++ b/src/SOAS.idr @@ -111,10 +111,6 @@ extend x {ctx2, ty} u theta = (src -<> tgt) ty ctx = {0 ctx' : type.Ctx} -> src ty ctx' -> tgt ty (ctx ++ ctx') -0 -Nil : type.SortedFamily -> type.SortedFamily -Nil f ty ctx = {0 ctx' : type.Ctx} -> ctx ~> ctx' -> f ty ctx' - -- TODO: (Setoid) coalgebras 0 @@ -122,6 +118,10 @@ Nil f ty ctx = {0 ctx' : type.Ctx} -> ctx ~> ctx' -> f ty ctx' (tgt ^ src) ty ctx = {0 ctx' : type.Ctx} -> src.subst ctx ctx' -> tgt ty ctx' +0 +Nil : type.SortedFamily -> type.SortedFamily +Nil f = f ^ Var + hideCtx : {0 a : type.Ctx -> Type} -> ((0 ctx : type.Ctx) -> a ctx) -> {ctx : type.Ctx} -> a ctx hideCtx f {ctx} = f ctx |