package pidgin
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=c6bb3f9332bcefc0488f03fcfa75e86cfa43a96e64cc4c293a9c37006c5f9785
sha512=887ac838a474d148abaeecb08d117bcca44d3c78ede7f1d81bb45930f1a5941085a6a1d9ab9ac4df44105dcff140569d1eb67088e223ca51fe4d5ea81be1b2ce
doc/pidgin/Pidgin/Kind/index.html
Module Pidgin.KindSource
A Kind is a type of light type. It holds less information than a full-fledged type system and is used primarily for generating error messages (and perhaps, in the near future, for defunctionalize validation functions). Naively, they can be viewed as a representation that does not hold the value of a term described by Repr.t.
Even though the API is user-facing, it's best to build validators that allow users to ignore it.
Types
The type describing a Kind. Unlike representations, a user does not want to manipulate them explicitly, which is why they remain private. (Not abstract for inspection)
Inference/Deduction
Building kinds
For validation function, we want to be able to create kinds for error reporting. (Remember that kinds are mapped to Repr.t)
Describe the kind for Repr.float.
Describe the kind for Repr.string.
Describe the kind for Repr.record.
Build a tuple, if there is one value, it return it, otherwise it build a pair (possibly of pairs). Non Tail-recursive.