From bee8faa9804d37e3912e3704dbf03fc1c02eeb84 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 30 Jul 2017 18:03:11 +0200 Subject: performPlugin: Use the correct match string I had been using the regex instead of the match result. Do another regex match to correctly output our SHA instead of the match regex. I had tried putting the `=~` match in another function and using it from here and in the list comprehension in `matchPlugins`, but then found out that, of course, the return types didn't agree (`matchPlugins` needs a `Bool` and `performPlugin` needs a `String`). Ended up dispensing with the extra function and doing the match both times instead. --- src/Lib.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Lib.hs') diff --git a/src/Lib.hs b/src/Lib.hs index a27ff99..abb8fe7 100644 --- a/src/Lib.hs +++ b/src/Lib.hs @@ -8,5 +8,6 @@ import Plugin someFunc :: IO () someFunc = do - let Just plugin = realMatchPlugin "75ac7b18a009ffe7a77a17a61d95c01395f36b44" - putStrLn $ performPlugin plugin + let message = "75ac7b18a009ffe7a77a17a61d95c01395f36b44" + Just plugin = realMatchPlugin message + putStrLn $ performPlugin plugin message -- cgit v1.2.3