Created
August 12, 2018 09:36
-
-
Save mvaldesdeleon/2e75713ef24e377b2341a9de9418cd3d to your computer and use it in GitHub Desktop.
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
// -- EXAMPLE THAT WOULD BE WRONG | |
// -- wrongBurgerSpec :: IxBurgerBuilder Ready TopBunOn BurgerSpec | |
// -- wrongBurgerSpec = getEmptyPlate | |
// -- :>>= placeEmptyBun | |
// -- :>>= addKetchup | |
// -- :>>= addCheese -- Can't match PattyOn with BottomBunOn, since we haven't put on the patty, the most important part!!! | |
// -- :>>= addOnions | |
// -- :>>= noLettuce | |
// -- :>>= addTomato | |
// -- :>>= addTopBun | |
getEmptyPlate | |
.ichain(placeEmptyBun) | |
.ichain(addKetchup) | |
.ichain(addCheese) // Type '"PattyOn"' is not assignable to type '"BottomBunOn"'. | |
.ichain(addOnions) | |
.ichain(noLettuce) | |
.ichain(addTomato) | |
.ichain(addTopBun); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment