diff --git a/server/Main.hs b/server/Main.hs index 9dc690d..6a5eee8 100644 --- a/server/Main.hs +++ b/server/Main.hs @@ -3,14 +3,14 @@ module Main where import Control.Concurrent.MVar -import qualified Network.WebSockets as WS +import qualified Network.WebSockets as WS -import Forest.Broadcast import Forest.Node import Forest.Server -import Forest.TreeModule.Const -import Forest.TreeModule.Fork -import Forest.TreeModule.SharedEditing +import Forest.Server.Broadcast +import Forest.Server.TreeModule.Const +import Forest.Server.TreeModule.Fork +import Forest.Server.TreeModule.SharedEditing pingDelay :: Int pingDelay = 10 diff --git a/src/Forest/Server.hs b/src/Forest/Server.hs index e8e3716..cda6b93 100644 --- a/src/Forest/Server.hs +++ b/src/Forest/Server.hs @@ -8,11 +8,11 @@ module Forest.Server import Control.Concurrent.Chan import Control.Exception -import qualified Network.WebSockets as WS +import qualified Network.WebSockets as WS import Forest.Api import Forest.Node -import Forest.TreeModule +import Forest.Server.TreeModule import Forest.Util {- Thread that sends updates to the client -} diff --git a/src/Forest/Broadcast.hs b/src/Forest/Server/Broadcast.hs similarity index 98% rename from src/Forest/Broadcast.hs rename to src/Forest/Server/Broadcast.hs index 2c319c6..e7fb4b0 100644 --- a/src/Forest/Broadcast.hs +++ b/src/Forest/Server/Broadcast.hs @@ -6,7 +6,7 @@ -- All functions included in this module should be threadsafe. Be sure to read -- the warning on the 'broadcast' function. -module Forest.Broadcast +module Forest.Server.Broadcast ( Broadcaster , Listener , newBroadcaster diff --git a/src/Forest/TreeModule.hs b/src/Forest/Server/TreeModule.hs similarity index 94% rename from src/Forest/TreeModule.hs rename to src/Forest/Server/TreeModule.hs index bcd7036..b289179 100644 --- a/src/Forest/TreeModule.hs +++ b/src/Forest/Server/TreeModule.hs @@ -1,6 +1,6 @@ {-# LANGUAGE MultiParamTypeClasses #-} -module Forest.TreeModule +module Forest.Server.TreeModule ( TreeModule(..) , ModuleConstructor ) where diff --git a/src/Forest/TreeModule/Animate.hs b/src/Forest/Server/TreeModule/Animate.hs similarity index 89% rename from src/Forest/TreeModule/Animate.hs rename to src/Forest/Server/TreeModule/Animate.hs index 7a5b32c..9aef0f8 100644 --- a/src/Forest/TreeModule/Animate.hs +++ b/src/Forest/Server/TreeModule/Animate.hs @@ -1,7 +1,7 @@ {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} -module Forest.TreeModule.Animate +module Forest.Server.TreeModule.Animate ( AnimateModule , animateModule ) where @@ -9,7 +9,7 @@ module Forest.TreeModule.Animate import Control.Concurrent import Forest.Node -import Forest.TreeModule +import Forest.Server.TreeModule import Forest.Util data AnimateModule r = AnimateModule diff --git a/src/Forest/TreeModule/Const.hs b/src/Forest/Server/TreeModule/Const.hs similarity index 98% rename from src/Forest/TreeModule/Const.hs rename to src/Forest/Server/TreeModule/Const.hs index 25ac72b..3d8124f 100644 --- a/src/Forest/TreeModule/Const.hs +++ b/src/Forest/Server/TreeModule/Const.hs @@ -1,14 +1,14 @@ {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} -module Forest.TreeModule.Const +module Forest.Server.TreeModule.Const ( ConstModule , constModule , projectDescriptionNode ) where import Forest.Node -import Forest.TreeModule +import Forest.Server.TreeModule data ConstModule r = ConstModule diff --git a/src/Forest/TreeModule/Fork.hs b/src/Forest/Server/TreeModule/Fork.hs similarity index 97% rename from src/Forest/TreeModule/Fork.hs rename to src/Forest/Server/TreeModule/Fork.hs index d1b4d67..7be309e 100644 --- a/src/Forest/TreeModule/Fork.hs +++ b/src/Forest/Server/TreeModule/Fork.hs @@ -3,7 +3,7 @@ {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} -module Forest.TreeModule.Fork +module Forest.Server.TreeModule.Fork ( ForkModule , ProngConstructor(..) , forkModule @@ -16,7 +16,7 @@ import qualified Data.Text as T import Forest.Node import qualified Forest.OrderedMap as OMap -import Forest.TreeModule +import Forest.Server.TreeModule data Prong = forall r a . TreeModule a r => Prong (a r) diff --git a/src/Forest/TreeModule/SharedEditing.hs b/src/Forest/Server/TreeModule/SharedEditing.hs similarity index 92% rename from src/Forest/TreeModule/SharedEditing.hs rename to src/Forest/Server/TreeModule/SharedEditing.hs index b67d431..59e4bc2 100644 --- a/src/Forest/TreeModule/SharedEditing.hs +++ b/src/Forest/Server/TreeModule/SharedEditing.hs @@ -1,7 +1,7 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} -module Forest.TreeModule.SharedEditing +module Forest.Server.TreeModule.SharedEditing ( SharedEditingModule , sharedEditingModule ) where @@ -9,9 +9,9 @@ module Forest.TreeModule.SharedEditing import Control.Concurrent.MVar import Control.Monad -import Forest.Broadcast import Forest.Node -import Forest.TreeModule +import Forest.Server.Broadcast +import Forest.Server.TreeModule import Forest.Util data SharedEditingModule r = SharedEditingModule