Dear gentle Haskellers,

I'd appreciate it very much if you could please take a look the my code here and give me some feedback - 

https://github.com/ckkashyap/haskell-websocket/blob/master/src/lib/Net/WebSocket/Request.hs

I am particularly looking for advice around what would be a good type for a server handler function that does IO and needs to short circuit if it fails at any point also needs to thread a state along. I am considering this - 

ErrorT String (StateT Int IO) Data


Regards,
Kashyap