From d63a423abbfa2789024ddec4d3585d154610c958 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 4 Nov 2016 23:42:34 +0100 Subject: initial commit --- Config.hs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Config.hs (limited to 'Config.hs') diff --git a/Config.hs b/Config.hs new file mode 100644 index 0000000..1fb02a6 --- /dev/null +++ b/Config.hs @@ -0,0 +1,20 @@ +module Config + ( Config(..) + , readFile + ) + where + +import Prelude hiding (readFile) +import qualified Prelude (readFile) + +import Network.Socket + +data Config = Config + { bufSize :: Int + , port :: ServiceName + } + deriving (Read,Show) + +readFile :: FilePath -> IO Config +readFile path = + read <$> Prelude.readFile path -- cgit v1.2.3