aboutsummaryrefslogtreecommitdiffstats
path: root/Config.hs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-11-04 23:42:34 +0100
committertv <tv@krebsco.de>2016-11-04 23:42:34 +0100
commitd63a423abbfa2789024ddec4d3585d154610c958 (patch)
tree515f41c96fe5d36065db155a79291c1a3e14a6e1 /Config.hs
Diffstat (limited to 'Config.hs')
-rw-r--r--Config.hs20
1 files changed, 20 insertions, 0 deletions
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