File: Test075.ML

package info (click to toggle)
polyml 5.7.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 40,584 kB
  • sloc: cpp: 44,143; ansic: 26,963; sh: 22,002; asm: 13,486; makefile: 602; exp: 525; python: 253; awk: 91
file content (17 lines) | stat: -rw-r--r-- 640 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(* Some parsing problems.  All of these were rejected by 4.1.1. *)

(* This is valid but caused problems.  I think it's a relic of SML90. *)
type t = int
signature S = sig end;

(* This is valid.  Empty specifications are legal. *)
signature S = sig ; ; ; end;

(* The syntax here is odd.  It requires the word "type" to be repeated.
   That's to distinguish between
   signature T = sig ... end where type s = int and type t = bool
   and
   signature T = sig ... end where type s = int and S = S'
   In the latter case we're defining a new signature. *)
signature T = sig type s type t end where type s = int and type t = bool
and U = S;