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
mkPrim :: a -> b