-
Notifications
You must be signed in to change notification settings - Fork 0
API Typeclass
type : Type
implementation : Object
Add an instance of a type class. implementation is an object with whose values are functions.
Note: this function has side effects.
getInstance : a -> Maybe b
type : Type
return : Maybe
Returns [Just](API Maybe) the implementation associated with type if there is one. Otherwise returns [Nothing](API Maybe).
Note: this function is not referentially transparent. Its output can be changed when tlc.addInstance is called.
getInstanceFunc : a -> String -> Maybe b
type : Type
functionName : String
return : Maybe
Returns [Just](API Maybe) the function with name functionName from the implementation associated with type. If there is no implementation then it returns [Nothing](API Maybe).
Note: this function is not referentially transparent. Its output can be changed when tlc.addInstance is called.