[server] Move server-related files into their own subdirectory
This commit is contained in:
parent
a2c2c4487b
commit
22974d96a7
8 changed files with 18 additions and 18 deletions
25
src/Forest/Server/TreeModule.hs
Normal file
25
src/Forest/Server/TreeModule.hs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
|
||||
module Forest.Server.TreeModule
|
||||
( TreeModule(..)
|
||||
, ModuleConstructor
|
||||
) where
|
||||
|
||||
import qualified Data.Text as T
|
||||
|
||||
import Forest.Node
|
||||
|
||||
class TreeModule a r where
|
||||
edit :: a r -> Path -> T.Text -> IO (Maybe r)
|
||||
edit _ _ _ = pure Nothing
|
||||
|
||||
delete :: a r -> Path -> IO (Maybe r)
|
||||
delete _ _ = pure Nothing
|
||||
|
||||
reply :: a r -> Path -> T.Text -> IO (Maybe r)
|
||||
reply _ _ _ = pure Nothing
|
||||
|
||||
act :: a r -> Path -> IO (Maybe r)
|
||||
act _ _ = pure Nothing
|
||||
|
||||
type ModuleConstructor a = (Node -> IO ()) -> (a -> IO ()) -> IO ()
|
||||
Loading…
Add table
Add a link
Reference in a new issue