Created
October 10, 2011 21:17
-
-
Save nudded/1276577 to your computer and use it in GitHub Desktop.
This file contains 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
data Protocol | |
= Hybi00 | |
| Hybi01 | |
sendMessage :: Protocol -> Message -> IO () | |
sendMessage HybiOO (Text text) = putStrLn $ "[Hybi00] " ++ text | |
sendMessage HybiOO (Binary _) = error "LOL" | |
sendMessage Hybi01 (Text text) = .. | |
sendMessage Hybi01 (Binary bin) = .. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Je wil natuurlijk wel niet dat iemand die error cases uberhaupt kan oproepen ...