File: Test040.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 (9 lines) | stat: -rw-r--r-- 310 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
(* This failed because the "level" was not being correctly calculated
   when using an overloaded function as a value rather than calling it. *)
local
    datatype a = A | B
    fun s (l:(a*a) list) = List.map (op =) l
in
    val x = s [(A, A), (B,B)]
end;
if x = [true, true] then () else raise Fail "wrong";