package preface

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

Source file invariant.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
module Via_invmap (I : Preface_specs.Invariant.WITH_INVMAP) = I

module From_functor (F : Preface_specs.Functor.CORE) = Via_invmap (struct
  type 'a t = 'a F.t

  let invmap f _ = F.map f
end)

module From_contravariant (F : Preface_specs.Contravariant.CORE) =
Via_invmap (struct
  type 'a t = 'a F.t

  let invmap _ f = F.contramap f
end)
OCaml

Innovation. Community. Security.