# HG changeset patch # User Adam Chlipala # Date 1212948651 14400 # Node ID 9bd8669d53c2dc7f1d3451603c841b38dc336033 # Parent bc7b76ca57e0c5cf0373bd38a235a2613d47fe18 Further experiments with implicit arguments diff -r bc7b76ca57e0 -r 9bd8669d53c2 src/elab_env.sml --- a/src/elab_env.sml Sun Jun 08 13:59:29 2008 -0400 +++ b/src/elab_env.sml Sun Jun 08 14:10:51 2008 -0400 @@ -54,7 +54,7 @@ c else CRel (xn + 1) - | CUnif _ => raise SynUnif + (*| CUnif _ => raise SynUnif*) | _ => c, bind = fn (bound, U.Con.Rel _) => bound + 1 | (bound, _) => bound} diff -r bc7b76ca57e0 -r 9bd8669d53c2 src/elaborate.sml --- a/src/elaborate.sml Sun Jun 08 13:59:29 2008 -0400 +++ b/src/elaborate.sml Sun Jun 08 14:10:51 2008 -0400 @@ -357,7 +357,7 @@ #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 -r bc7b76ca57e0 -r 9bd8669d53c2 tests/impl.lac --- a/tests/impl.lac Sun Jun 08 13:59:29 2008 -0400 +++ b/tests/impl.lac Sun Jun 08 14:10:51 2008 -0400 @@ -3,3 +3,11 @@ 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 = {}}