File: expr.ml

package info (click to toggle)
ppx-deriving-yojson 3.10.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 292 kB
  • sloc: ml: 1,436; makefile: 24; sh: 15
file content (8 lines) | stat: -rw-r--r-- 186 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
type expr =
  | EConst of int
  | EAdd of expr * expr
  [@@deriving yojson]
;;
  
print_endline (Yojson.Safe.to_string
                 (expr_to_yojson (EAdd (EConst 73, EConst 42))));;