package pidgin
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4a7bb0fccdebf5b205d2eeaa8a9b8e50acf267445f949a2b1a8304def9a38548
sha512=2612fc5cbdd6173a0676ae8840158b85358744561245d0b55ce0ebcf41acb26eddbd316be42a60d55e187928182f681cf3efb4f556ddf47d698217e8376633d3
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.