Skip to content

Commit

Permalink
websockets-simple -> typed-websockets
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Jan 10, 2024
1 parent 3bd7a69 commit 4fba7f4
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# websockets-simple
# typed-websockets

High-level interface for websockets.

Expand All @@ -19,8 +19,8 @@ High-level interface for websockets.
```haskell
{-# LANGUAGE DeriveAnyClass, DeriveGeneric, OverloadedStrings #-}
module Main where
import qualified Network.WebSockets.Simple.Client as WClient
import qualified Network.WebSockets.Simple.Server as WServer
import qualified Network.WebSockets.Typed.Client as WClient
import qualified Network.WebSockets.Typed.Server as WServer
import qualified Network.WebSockets as WS
-- using cbor as an example, aeson would work too
import qualified Codec.Serialise as Serialise
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Network.WebSockets.Simple.Client
module Network.WebSockets.Typed.Client
( Options (..),
defaultOptions,
run,
Expand All @@ -14,8 +14,8 @@ import Data.ByteString.Char8 (unpack)
import Data.Maybe (isJust)
import Network.WebSockets qualified as WS
import Network.WebSockets.Connection.PingPong qualified as PingPong
import Network.WebSockets.Simple.Session qualified as Session
import Network.WebSockets.Simple.Utils qualified as Utils
import Network.WebSockets.Typed.Session qualified as Session
import Network.WebSockets.Typed.Utils qualified as Utils
import Stamina qualified
import Wuss qualified

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Network.WebSockets.Simple.Server
module Network.WebSockets.Typed.Server
( Options (..),
defaultOptions,
run,
Expand All @@ -16,8 +16,8 @@ import Data.ByteString.Char8 (unpack)
import Data.Foldable (for_)
import Network.WebSockets qualified as WS
import Network.WebSockets.Connection.PingPong qualified as PingPong
import Network.WebSockets.Simple.Session qualified as Session
import Network.WebSockets.Simple.Utils qualified as Utils
import Network.WebSockets.Typed.Session qualified as Session
import Network.WebSockets.Typed.Utils qualified as Utils

data Options a = Options
{ handlePendingConnection :: (ClientConnection a) => WS.PendingConnection -> IO (Maybe a),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Network.WebSockets.Simple.Session
module Network.WebSockets.Typed.Session
( Codec (..),
run,
Session (..),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Network.WebSockets.Simple.Utils where
module Network.WebSockets.Typed.Utils where

import Control.Exception (Exception, throwIO)
import Data.ByteString (ByteString)
Expand Down
22 changes: 11 additions & 11 deletions websockets-simple.cabal → typed-websockets.cabal
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
cabal-version: 3.4
name: websockets-simple
name: typed-websockets
version: 1.0
synopsis: Simple websockets server
synopsis: Typed websockets server/client
-- description:
homepage: https://github.com/cachix/websockets-simple
homepage: https://github.com/cachix/typed-websockets
license: Apache-2.0
author: Domen Kožar
maintainer: [email protected]
-- copyright:
build-type: Simple
extra-doc-files: CHANGELOG.md
-- extra-source-files:
extra-doc-files:
README.md
CHANGELOG.md

common common
ghc-options: -Wall -Wcompat -Wincomplete-record-updates
Expand All @@ -34,11 +34,11 @@ common common
library
import: common
exposed-modules:
Network.WebSockets.Simple.Server
Network.WebSockets.Simple.Client
Network.WebSockets.Typed.Server
Network.WebSockets.Typed.Client
other-modules:
Network.WebSockets.Simple.Session
Network.WebSockets.Simple.Utils
Network.WebSockets.Typed.Session
Network.WebSockets.Typed.Utils
hs-source-dirs: src
default-language: GHC2021

Expand All @@ -48,7 +48,7 @@ executable readme
build-depends: base,
markdown-unlit,
websockets,
websockets-simple,
typed-websockets,
string-conv,
serialise,
text,
Expand Down

0 comments on commit 4fba7f4

Please sign in to comment.