diff options
author | Jasper Van der Jeugt | 2020-08-13 19:19:22 +0200 |
---|---|---|
committer | Jasper Van der Jeugt | 2020-08-13 19:19:22 +0200 |
commit | 8d5c0405565ad4afd976efd1262b3224efd6ee2f (patch) | |
tree | 8d24ecb97212d54943d104ed95f1fda4dea7c1fd /server/lib/Uplcg | |
parent | a39fe7ff759a552c64a060f0d98a0d4e8a577b01 (diff) |
cafp -> uplcg
Diffstat (limited to '')
-rw-r--r-- | server/lib/Uplcg/CookieSocket.hs (renamed from server/lib/Cafp/CookieSocket.hs) | 2 | ||||
-rw-r--r-- | server/lib/Uplcg/Game.hs (renamed from server/lib/Cafp/Game.hs) | 4 | ||||
-rw-r--r-- | server/lib/Uplcg/Main/GenerateElmTypes.hs (renamed from server/lib/Cafp/Main/GenerateElmTypes.hs) | 4 | ||||
-rw-r--r-- | server/lib/Uplcg/Main/Server.hs (renamed from server/lib/Cafp/Main/Server.hs) | 16 | ||||
-rw-r--r-- | server/lib/Uplcg/Messages.hs (renamed from server/lib/Cafp/Messages.hs) | 2 |
5 files changed, 14 insertions, 14 deletions
diff --git a/server/lib/Cafp/CookieSocket.hs b/server/lib/Uplcg/CookieSocket.hs index 5770a3b..7efb8b2 100644 --- a/server/lib/Cafp/CookieSocket.hs +++ b/server/lib/Uplcg/CookieSocket.hs @@ -2,7 +2,7 @@ -- side. {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} -module Cafp.CookieSocket +module Uplcg.CookieSocket ( Handle , withHandle , CookieName diff --git a/server/lib/Cafp/Game.hs b/server/lib/Uplcg/Game.hs index 9ed3cc1..02e40cb 100644 --- a/server/lib/Cafp/Game.hs +++ b/server/lib/Uplcg/Game.hs @@ -3,7 +3,7 @@ {-# LANGUAGE Rank2Types #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} -module Cafp.Game +module Uplcg.Game ( PlayerId , Table (..) , Player (..) @@ -19,7 +19,7 @@ module Cafp.Game , gameViewForPlayer ) where -import Cafp.Messages +import Uplcg.Messages import Control.Lens (Lens', at, iall, ifor_, imap, ix, orOf, to, (%%=), (%=), (%~), (&), (+=), (.=), (.~), (^.), (^..), diff --git a/server/lib/Cafp/Main/GenerateElmTypes.hs b/server/lib/Uplcg/Main/GenerateElmTypes.hs index ccf19e8..bc2481c 100644 --- a/server/lib/Cafp/Main/GenerateElmTypes.hs +++ b/server/lib/Uplcg/Main/GenerateElmTypes.hs @@ -1,10 +1,10 @@ {-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE TemplateHaskell #-} -module Cafp.Main.GenerateElmTypes +module Uplcg.Main.GenerateElmTypes ( main ) where -import Cafp.Messages +import Uplcg.Messages import Data.Proxy import Elm.Module diff --git a/server/lib/Cafp/Main/Server.hs b/server/lib/Uplcg/Main/Server.hs index ba2425d..a2914ab 100644 --- a/server/lib/Cafp/Main/Server.hs +++ b/server/lib/Uplcg/Main/Server.hs @@ -1,17 +1,14 @@ {-# LANGUAGE OverloadedStrings #-} -module Cafp.Main.Server +module Uplcg.Main.Server ( main ) where -import qualified Cafp.CookieSocket as CookieSocket -import Cafp.Game -import Cafp.Messages import Control.Concurrent.MVar (MVar) import qualified Control.Concurrent.MVar as MVar import Control.Concurrent.STM (STM, TVar, atomically) import qualified Control.Concurrent.STM as STM import Control.Exception (bracket) -import Control.Lens ((^.), (&), (.~)) +import Control.Lens ((&), (.~), (^.)) import Control.Monad (forever, when) import qualified Data.Aeson as Aeson import qualified Data.ByteString as B @@ -33,6 +30,9 @@ import qualified Network.WebSockets as WS import System.Environment (getEnv) import qualified System.Log.FastLogger as FL import System.Random (StdGen, newStdGen) +import qualified Uplcg.CookieSocket as CookieSocket +import Uplcg.Game +import Uplcg.Messages import qualified Web.Scotty as Scotty type RoomId = T.Text @@ -200,9 +200,9 @@ baseUrl prefix application = \req -> main :: IO () main = do - host <- fromString <$> getEnv "CAFP_HOSTNAME" - port <- read <$> getEnv "CAFP_PORT" - base <- splitPath . T.pack <$> getEnv "CAFP_BASE" + host <- fromString <$> getEnv "UPLCG_HOSTNAME" + port <- read <$> getEnv "UPLCG_PORT" + base <- splitPath . T.pack <$> getEnv "UPLCG_BASE" let settings = Warp.setPort port . Warp.setHost host $ Warp.defaultSettings timeCache <- FL.newTimeCache FL.simpleTimeFormat FL.withTimedFastLogger timeCache diff --git a/server/lib/Cafp/Messages.hs b/server/lib/Uplcg/Messages.hs index 5066447..b1627e9 100644 --- a/server/lib/Cafp/Messages.hs +++ b/server/lib/Uplcg/Messages.hs @@ -1,6 +1,6 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} -module Cafp.Messages +module Uplcg.Messages ( BlackCard (..) , WhiteCard (..) , Cards (..) |