package ecaml

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file ocaml_or_elisp_value.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
open! Core
open! Import
include Ocaml_or_elisp_value_intf

let make (type ocaml) (type_ : ocaml Value.Type.t) =
  (module struct
    type nonrec ocaml = ocaml

    let sexp_of_ocaml = Value.Type.to_sexp type_
    let type_ = type_

    type abstract = Value.t [@@deriving sexp_of]

    type t =
      | Elisp of abstract
      | This of ocaml
    [@@deriving sexp_of]

    let create_elisp ocaml = Elisp (Value.Type.to_value type_ ocaml)

    let to_value = function
      | Elisp value -> value
      | This ocaml -> Value.Type.to_value type_ ocaml
    ;;
  end : S
    with type ocaml = ocaml)
;;
OCaml

Innovation. Community. Security.