From d80c223dc01ba97e76ef6d4b3c05434ed9e9bf55 Mon Sep 17 00:00:00 2001 From: William Yao Date: Fri, 10 Aug 2018 08:22:23 -0700 Subject: [PATCH] fix types in example in readme --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fb37c25..a4177cf 100644 --- a/README.md +++ b/README.md @@ -8,17 +8,18 @@ A Unix domain socket API for the [socket](https://github.com/lpeterse/haskell-so Creating the Unix domain socket: ```haskell import System.Socket +import System.Socket.Protocol.Default import System.Socket.Type.Stream import System.Socket.Family.Unix -s <- socket :: IO (Socket Unix Stream Unix) +s <- socket :: IO (Socket Unix Stream Default) ``` Creating the address for binding/connecting ```haskell address <- case socketAddressUnixPath "example.sock" of Just addr -> pure addr - Nothing -> putStrLn "invalid pathname for socket" + Nothing -> fail "invalid pathname for socket" ``` ### Symlinks Binding to a socket with a filename creates a socket in the filesystem, but does not unlink it after `close` called. You should handle deleting links yourself.