File: cloud.cppo.ml

package info (click to toggle)
ocaml-visitors 20200210-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,896 kB
  • sloc: ml: 4,077; makefile: 44; sh: 18
file content (22 lines) | stat: -rw-r--r-- 489 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
class ['self] base = object (_ : 'self)
  method visit_real _env x = x
end

type cloud =
  | Point of (float[@name "real"]) * (float[@name "real"])
  | Clouds of cloud list
  [@@name "nuage"]
  [@@deriving visitors { variety = "map"; ancestors = ["base"] }]

#if OCAML_VERSION >= (4, 03, 0)

module List = struct

  type 'a mylist = 'a list =
    | []                     [@name "nil"]
    | (::) of 'a * 'a mylist [@name "cons"]
    [@@deriving visitors { variety = "map" }]

end

#endif