Module EtherUnit can be used with other token if we change name of module from Network.Ethereum.Web3.Types.EtherUnit to Network.Ethereum.Web3.Types.TokenUnit and:
foreign import kind Token
class TokenUnit a where
fromMinorUnit :: BigNumber -> a
toMinorUnit :: a -> BigNumber
class TokenUnitSpec a where
divider :: Proxy a -> BigNumber
-- note `name` was removed (it's not used at all)
Module
EtherUnit
can be used with other token if we change name of module from Network.Ethereum.Web3.Types.EtherUnit to Network.Ethereum.Web3.Types.TokenUnit and:Found the term "minor unit" here
This way the module and it's content would be applicable to other tokens too, we can then have: