This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Fun where | |
| import Data.List(groupBy) | |
| data Lesson c = Lesson | |
| { name :: String, | |
| lposition :: c | |
| } | |
| deriving (Show) | |
| data Section c = Section |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This is literate haskell file, so let start with the boring bits | |
| >{-# LANGUAGE TemplateHaskell #-} | |
| >{-# LANGUAGE DuplicateRecordFields #-} | |
| >{-# LANGUAGE StandaloneDeriving,FlexibleInstances, FlexibleContexts #-} | |
| Metamorphosis is meant to be imported unqualified, and uses lenses to configurate default records. | |
| I'll use micro lens. | |
| >import Metamorphosis |