comparison tests/type_classMod2.ur @ 244:71bafe66dbe1

Laconic -> Ur
author Adam Chlipala <adamc@hcoop.net>
date Sun, 31 Aug 2008 08:32:18 -0400
parents tests/type_classMod2.lac@a3413288cce1
children
comparison
equal deleted inserted replaced
243:2b9dfaffb008 244:71bafe66dbe1
1 signature S = sig
2 class c
3 val default : t :: Type -> c t -> t
4
5 val string_c : c string
6 val int_c : c int
7 end
8
9 structure M : S = struct
10 class c t = t
11 val default = fn t :: Type => fn v : c t => v
12
13 val int_c : c int = 0
14 val string_c : c string = "Hi"
15 end
16
17 val hi = M.default [string] _
18 val zero = M.default [int] _