class Uint8ArrayAble a where
Denotes a class of NaCl types which are convertable to
Instances of this typeclass will
unsafeCoerce their values to
because we know that everything in/out of the underlying library are,
class Utf8Decodable a where
This type class denotes types that can be decoded to a UTF8 String.
toString function returns
Either Error String to handle errors
during the decode. We will generally
unsafeCoerce because we know the
underlying type is already of Uint8Array from the wrapped library.
class Utf8Encodable a where
This type class denotes types that can be encoded to a UTF8 String.
fromString function returns the type of the type class instance.
We will generally
unsafeCoerce from the
Uint8Array type to the
NaCl type we want because all underlying types are