summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Config.hs1
-rw-r--r--src/ZNC.hs3
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Config.hs b/src/Config.hs
index f50c8b6..ffd4875 100644
--- a/src/Config.hs
+++ b/src/Config.hs
@@ -1,5 +1,4 @@
{-# LANGUAGE FlexibleInstances #-}
-{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeData #-}
{-# LANGUAGE TypeFamilies #-}
diff --git a/src/ZNC.hs b/src/ZNC.hs
index df57541..36d3d4f 100644
--- a/src/ZNC.hs
+++ b/src/ZNC.hs
@@ -13,6 +13,7 @@ import Data.ByteString qualified as BS
import Data.ByteString.Char8 qualified as BS8
import Data.Char (ord)
import Data.Either (fromRight)
+import Data.Maybe (fromMaybe)
import Data.Text (Text)
import Data.Text.Encoding qualified as TE
import Data.Vector.Storable qualified as VS
@@ -61,7 +62,7 @@ parseLog = map parseLogLine . BS8.lines
{-# INLINE parseLogRange #-}
parseLogRange :: (Int, Maybe Int) -> VS.Vector Word32 -> ByteString -> [(HMS, Event)]
parseLogRange (startln, mnumln) linestarts topbs =
- let numln = maybe (VS.length linestarts - startln) id mnumln
+ let numln = fromMaybe (VS.length linestarts - startln) mnumln
splitted = splitWithLineStarts 0 (VS.slice startln numln linestarts) topbs
in -- traceShow ("pLR"::String, splitted) $
map parseLogLine splitted