Types as Interfaces

from blog Two-Wrongs, | ↗ original
↗ original
For the past few days, I have been toying with an idea for a board game. To test it out, I wanted to write a simple implementation of it. Here’s an example of a type we might need in a critical phase of the game. For the past few days, I have been toying with an idea for a board game. To test it out, I wanted to write a simple implementation of it. Here’s an example of a type we might need in a critical phase of the game. In[1]:In[1]: -- | A quote for a proposal.-- | A quote for a proposal. datadata QuoteQuote == QuoteQuote { _proposal { _proposal :::: ProposalProposal , _premium , _premium :::: IntInt ,... ,...