Closed XertroV closed 6 years ago
Just adding newtype instance derivations to the relevant places.
This lets us use functions like wrap, unwrap, over, etc to easily access the internal data.
wrap
unwrap
over
See: https://pursuit.purescript.org/packages/purescript-newtype/2.0.0/docs/Data.Newtype#t:Newtype
Note: I didn't add it to types like HexString or Address because manipulating the internal data could corrupt them. (e.g. lifting a function to replace all instances of 0 with z in a HexString is not something that we really want to allow)
0
z
awesome, thanks!
Just adding newtype instance derivations to the relevant places.
This lets us use functions like
wrap
,unwrap
,over
, etc to easily access the internal data.See: https://pursuit.purescript.org/packages/purescript-newtype/2.0.0/docs/Data.Newtype#t:Newtype
Note: I didn't add it to types like HexString or Address because manipulating the internal data could corrupt them. (e.g. lifting a function to replace all instances of
0
withz
in a HexString is not something that we really want to allow)