diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-06-08 14:10:51 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-06-08 14:10:51 -0400 |
commit | 59cf4e73d9d6998ea4a83aa38c75c95ed462779f (patch) | |
tree | a90487f4ff9eb61fdef87d277763675d16bf03cd | |
parent | cce9fcf97f2def0b176303aa1832fe74a0b73686 (diff) |
Further experiments with implicit arguments
-rw-r--r-- | src/elab_env.sml | 2 | ||||
-rw-r--r-- | src/elaborate.sml | 2 | ||||
-rw-r--r-- | tests/impl.lac | 8 |
3 files changed, 10 insertions, 2 deletions
diff --git a/src/elab_env.sml b/src/elab_env.sml index b7264fc7..78fa3daa 100644 --- a/src/elab_env.sml +++ b/src/elab_env.sml @@ -54,7 +54,7 @@ val liftConInCon = c else CRel (xn + 1) - | CUnif _ => raise SynUnif + (*| CUnif _ => raise SynUnif*) | _ => c, bind = fn (bound, U.Con.Rel _) => bound + 1 | (bound, _) => bound} diff --git a/src/elaborate.sml b/src/elaborate.sml index d64ce749..9e457499 100644 --- a/src/elaborate.sml +++ b/src/elaborate.sml @@ -357,7 +357,7 @@ val subConInCon = #1 rep else c - | L'.CUnif _ => raise SynUnif + (*| L'.CUnif _ => raise SynUnif*) | _ => c, bind = fn ((xn, rep), U.Con.Rel _) => (xn+1, liftConInCon 0 rep) | (ctx, _) => ctx} diff --git a/tests/impl.lac b/tests/impl.lac index 91f5c52b..b647b96e 100644 --- a/tests/impl.lac +++ b/tests/impl.lac @@ -3,3 +3,11 @@ val id_self = id [t :: Type -> t -> t] id val idi = fn t ::: Type => fn x : t => x val idi_self = idi idi + +val picker = fn na :: Name => fn a ::: Type => fn nb :: Name => fn b ::: Type => fn fs ::: {Type} => + fn r : $([na = a, nb = b] ++ fs) => {na = r.na, nb = r.nb} +val getem = picker [#A] [#C] {A = 0, B = 1.0, C = "hi", D = {}} + +val picker_ohmy = fn na ::: Name => fn a ::: Type => fn nb ::: Name => fn b ::: Type => fn fs ::: {Type} => + fn r : $([na = a, nb = b] ++ fs) => {na = r.na, nb = r.nb} +val getem_ohmy = picker_ohmy {A = 0, B = 1.0, C = "hi", D = {}} |