diff options
Diffstat (limited to 'lib/top.ur')
-rw-r--r-- | lib/top.ur | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/top.ur b/lib/top.ur new file mode 100644 index 00000000..16d2ed42 --- /dev/null +++ b/lib/top.ur @@ -0,0 +1,6 @@ +con mapTT (f :: Type -> Type) = fold (fn nm t acc => [nm] ~ acc => + [nm = f t] ++ acc) [] + +fun compose (t1 ::: Type) (t2 ::: Type) (t3 ::: Type) (f1 : t2 -> t3) (f2 : t1 -> t2) (x : t1) = f1 (f2 x) + +fun txt (t ::: Type) (ctx ::: {Unit}) (use ::: {Type}) (sh : show t) (v : t) = cdata (show sh v) |