package accessor_core

  1. Overview
  2. Docs

Source file accessor_host_and_port.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
open! Core
open! Import

type t = Host_and_port.t =
  { host : string
  ; port : int
  }
[@@deriving accessors]

let tuple =
  [%accessor
    Accessor.isomorphism
      ~get:(fun { Host_and_port.host; port } -> host, port)
      ~construct:(fun (host, port) -> { Host_and_port.host; port })]
;;