[Haskell-beginners] How do I do inheritance in haskell?

Daniel Trstenjak daniel.trstenjak at gmail.com
Thu May 8 14:24:50 UTC 2014


Hi Dan,

On Thu, May 08, 2014 at 11:58:28AM +0300, Dan Serban wrote:
> newtype AskVolume = AskVolume Double deriving (Show)
> newtype AskPrice  = AskPrice  Double deriving (Show)
> 
> newtype BidVolume = BidVolume Double deriving (Show)
> newtype BidPrice  = BidPrice  Double deriving (Show)

I think that's a bit over the top, because why shouldn't prices 
and volumes be interchangeable between Asks and Bids?


Greetings,
Daniel


More information about the Beginners mailing list