Module

Data.HObject.Primitive

Package
purescript-homogeneous-objects
Repository
Risto-Stevcev/purescript-homogeneous-objects

#Primitive Source

class Primitive a b  where

Sum types comprising of primitive types can be annoying to work with in APIs because they require data constructors. This module provides a helper method to construct Tuples with primitive values so that you don't need to include their constructors. This technique works for all nullary types but is really only useful for primitives. To use mkTuple (and /^), you need to write an instance for Primitive.

Members

#mkTuple Source

mkTuple :: forall c b a. Primitive b c => a -> b -> Tuple a c

#(/^\) Source

Operator alias for Data.HObject.Primitive.mkTuple (left-associative / precedence 6)