Add basic server
This commit is contained in:
parent
cde21038cb
commit
33f1076b52
4 changed files with 113 additions and 0 deletions
16
src/Forest/TreeModule.hs
Normal file
16
src/Forest/TreeModule.hs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
module Forest.TreeModule
|
||||
( TreeModule(..)
|
||||
, ModuleConstructor
|
||||
) where
|
||||
|
||||
import qualified Data.Text as T
|
||||
|
||||
import Forest.Api
|
||||
|
||||
class TreeModule a where
|
||||
edit :: a -> Path -> T.Text -> IO ()
|
||||
delete :: a -> Path -> IO ()
|
||||
reply :: a -> Path -> T.Text -> IO ()
|
||||
act :: a -> Path -> IO ()
|
||||
|
||||
type ModuleConstructor a = (Node -> IO ()) -> (a -> IO ()) -> IO ()
|
||||
Loading…
Add table
Add a link
Reference in a new issue