Skip to content

Instantly share code, notes, and snippets.

@nudded
Created October 10, 2011 21:17
Show Gist options
  • Save nudded/1276577 to your computer and use it in GitHub Desktop.
Save nudded/1276577 to your computer and use it in GitHub Desktop.
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) = ..
@itkovian
Copy link

Je wil natuurlijk wel niet dat iemand die error cases uberhaupt kan oproepen ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment