Fatvat: Web Sockets and Haskell - 0 views
-
import Network import System.IO import Control.Concurrent import Char serverHandshake = "HTTP/1.1 101 Web Socket Protocol Handshake\r\n\ \Upgrade: WebSocket\r\n\ \Connection: Upgrade\r\n\ \WebSocket-Origin: http://localhost\r\n\ \WebSocket-Location: ws://localhost:9876/\r\n\ \WebSocket-Protocol: sample\r\n\r\n\0" acceptLoop socket = forever $ do (h,_,_) IO () listenLoop h = do sendFrame h "hello from haskell" threadDelay (3 * 1000000) sendFrame h "it works!" return () sendFrame :: Handle -> String -> IO () sendFrame h s = do hPutChar h (chr 0) hPutStr h s hPutChar h (chr 255)
Learning Haskell Notes - 0 views
-
8. Functors
-
A "functor" is a structured collection (or container) type with a method (fmap) that accepts a method and applies that method to the members of the collection yielding an isomorphic collection of values of a (possibly) new type. Is this right?
-
Every monad is a functor, but not the other way around; a monad is a functor PLUS functions >>= and return satisfying some laws
- ...4 more annotations...
Fatvat: Bidirectional Web Sockets - 0 views
Hoogle - 0 views
Real World Haskell - 0 views
Leksah - Haskell IDE in Haskell - 0 views
-
Leksah is a Haskell IDE (Integrated Development Environment) written in Haskell based on Gtk+ and gtk2hs. Leksah is a practical tool to support the Haskell development process. It is platform independent and runs on any platform where GTK+, gtk2hs and GHC can be installed. It is currently been tested on Windows and Linux but it should work on the Mac. It works with the Glasgow Haskell Compiler (GHC). Leksah is completely free and distributed under the Gnu Public License 2.0
Haskell Study Plan - 0 views
‹ Previous
21 - 35 of 35
Showing 20▼ items per page