Abstract
You’ve already finished two of the main tasks in this book: implementing some data-mining algorithms for analyzing clients and their purchases and looking at several ways to save the information about purchases in a durable container. This chapter is the starting point of the last task: creating a domain-specific language (DSL) for expressing offers to be applied in the Time Machine Store. You will provide a set of combinators to create the offers, which are initially basic offers.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Available at the Idris web site, www.idris-lang.org/documentation/ .
- 2.
Available at the Agda web site, http://wiki.portal.chalmers.se/agda/ .
- 3.
Available at http://adam.chlipala.net/cpdt/ .
- 4.
Available at www.cis.upenn.edu/~bcpierce/sf/ .
- 5.
The following code works on a different module from the Operation type family introduced earlier. If you try to define Operation inside a type class at the same time of the Operation type family, there will be a name collision, and the compiler won’t be able to continue.
- 6.
You can check the definitions that are created by running GHC with the -ddump-splices option.
- 7.
In older versions of GHC kinds always defaulted to * and you had to be more explicit.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Alejandro Serrano Mena
About this chapter
Cite this chapter
Serrano Mena, A. (2019). Strong Types for Describing Offers. In: Practical Haskell. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4480-7_13
Download citation
DOI: https://doi.org/10.1007/978-1-4842-4480-7_13
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-4479-1
Online ISBN: 978-1-4842-4480-7
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books