Created
May 12, 2019 09:57
-
-
Save etorreborre/695a9d755ff88376b5b5d56753e89c3b to your computer and use it in GitHub Desktop.
tagging-constructors
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
| fun genEmployeeStatus | |
| <: genFun (tag @"permanent" Permanent) -- Gen (Tag "permanent" EmployeeStatus) | |
| <: genFun (tag @"temporary" Temporary) -- Gen (Tag "temporary" EmployeeStatus) | |
| genEmployeeStatus :: | |
| GenIO (Tag "permanent" EmployeeStatus) | |
| -> GenIO (Tag "temporary" EmployeeStatus) | |
| -> GenIO EmployeeStatus | |
| genEmployeeStatus g1 g2 = Gen.choice [fmap unTagg1, fmap unTag g2] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment