aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sorbot.cabal1
-rw-r--r--src/Lib.hs10
2 files changed, 10 insertions, 1 deletions
diff --git a/sorbot.cabal b/sorbot.cabal
index ee8959b..758fdc5 100644
--- a/sorbot.cabal
+++ b/sorbot.cabal
@@ -17,6 +17,7 @@ library
hs-source-dirs: src
exposed-modules: Lib
build-depends: base >= 4.7 && < 5
+ , regex-tdfa
default-language: Haskell2010
executable sorbot-exe
diff --git a/src/Lib.hs b/src/Lib.hs
index d36ff27..3bc9579 100644
--- a/src/Lib.hs
+++ b/src/Lib.hs
@@ -2,5 +2,13 @@ module Lib
( someFunc
) where
+import Text.Regex.TDFA
+
someFunc :: IO ()
-someFunc = putStrLn "someFunc"
+someFunc
+ | rex == True = putStrLn "Match!!"
+ | otherwise = putStrLn "No match"
+
+
+rex :: Bool
+rex = "75ac7b18a009ffe7a77a17a61d95c01395f36b44" =~ "^[0-9a-f]{5,40}$"