A module that allows you to "tag" a value.
An alias for the Tagged value constructor.
Explicitly changes the tag of a value.
Forces you to recognize that the value is being interpreted differently from before.
We can remove the tag when we're done making additional compile-time assertions.
Useful for composing functions together infix:
foo =
Array.set `map` index `ap` value `ap` arrUseful for composing functions together infix:
foo =
Array.set `map` index `ap` value `ap` arrAn alternative to ap:
foo =
map2 Array.get index arrUseful for restricting the tag created in a polymorphic function.
Useful when you have a function that throws away a tag prematurely, but you still need the tag later.
A Type that pairs a
valuewith atag.The
tagis ignored at runtime as evidenced by the only value constructor: