File: Test075.ML

package info (click to toggle)
polyml 5.6-8
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 31,892 kB
  • ctags: 34,453
  • sloc: cpp: 44,983; ansic: 24,520; asm: 14,850; sh: 11,730; makefile: 551; exp: 484; python: 253; awk: 91; sed: 9
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;