File: where-and.sml

package info (click to toggle)
mlton 20130715-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 60,900 kB
  • ctags: 69,386
  • sloc: xml: 34,418; ansic: 17,399; lisp: 2,879; makefile: 1,605; sh: 1,254; pascal: 256; python: 143; asm: 97
file content (38 lines) | stat: -rw-r--r-- 996 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
(* where-and.sml *)

(* Checks parsing of where type ... and derived form. *)

signature S = sig type t and u end

signature T = S where type t = int and type u = bool
and       U = S where type t = int and type u = bool

signature V =
sig
    structure A : S where type t = int and type u = bool
    and       B : S where type t = int and type u = bool
end

structure A : S where type t = int and type u = bool =
struct
    type t = int
    type u = bool
end

structure B = A : S where type t = int and type u = bool
and       C = A : S where type t = int and type u = bool

functor F(X : S where type t = int and type u = bool) :
    S where type t = int and type u = bool =
X : S where type t = int and type u = bool
and     G(Y : S where type t = int and type u = bool) :
    S where type t = int and type u = bool =
Y : S where type t = int and type u = bool

signature W =
sig
    type t and u and v
end

signature W' = W where type t = int and type u = int where type v = int
and W'' = W;