An Elm Primer for React Developers
/
Part III: Building Real Applications
/
Chapter 10: Modules Around Data Structures
Chapter 10: Modules Around Data Structures
https://leanpub.com/elm-for-react-devs
Opaque Types: Hiding What Shouldn’t Be Seen
https://leanpub.com/elm-for-react-devs
Smart Constructors: The Only Way In
https://leanpub.com/elm-for-react-devs
Working with Opaque Types
https://leanpub.com/elm-for-react-devs
Going Further: Phantom Types
https://leanpub.com/elm-for-react-devs
Type Parameters That Don’t Exist at Runtime
https://leanpub.com/elm-for-react-devs
The Marker Type
https://leanpub.com/elm-for-react-devs
Parse, Don’t Validate
https://leanpub.com/elm-for-react-devs
The Complete Calendar Module
https://leanpub.com/elm-for-react-devs
Using the Calendar Module
https://leanpub.com/elm-for-react-devs
One Source of Truth
https://leanpub.com/elm-for-react-devs
What We Gained
https://leanpub.com/elm-for-react-devs
The Broader Pattern: State Machines in Types
https://leanpub.com/elm-for-react-devs
When to Use Each Pattern
https://leanpub.com/elm-for-react-devs
The Freedom to Reorganize
https://leanpub.com/elm-for-react-devs
What We’ve Learned
https://leanpub.com/elm-for-react-devs
Up next
Chapter 11: Forms and Validation
In this chapter
Chapter 10: Modules Around Data Structures
Opaque Types: Hiding What Shouldn’t Be Seen
Going Further: Phantom Types
The Complete Calendar Module
Using the Calendar Module
What We Gained
The Broader Pattern: State Machines in Types
When to Use Each Pattern
The Freedom to Reorganize
What We’ve Learned