File: show_tests.ml

package info (click to toggle)
ocaml-deriving-ocsigen 0.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 628 kB
  • ctags: 1,159
  • sloc: ml: 6,334; makefile: 63; sh: 18
file content (20 lines) | stat: -rw-r--r-- 325 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module type A = sig
  type t = private [> `A ]
      deriving (Show)
end

module Make(M : A) = struct
  type truc = Plop of M.t
        deriving (Show)

  let chose x = Plop x
end

module MA = struct
  type t = [ `A | `B ]
      deriving (Show)
end

module M = Make(MA)

let _ = print_endline (Show.show<M.truc>(M.chose `B))