summaryrefslogtreecommitdiff
path: root/lib/Paths.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Paths.hs')
-rw-r--r--lib/Paths.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Paths.hs b/lib/Paths.hs
index b9b0d50..15dc66b 100644
--- a/lib/Paths.hs
+++ b/lib/Paths.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE DeriveAnyClass #-}
+{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
@@ -5,8 +7,10 @@
-- I just hope you are running this on some kind of Unix
module Paths where
+import Control.DeepSeq (NFData)
import Data.Text (Text, isPrefixOf)
import qualified Data.Text as T
+import GHC.Generics (Generic)
import System.FilePath (splitPath)
import System.FilePath.Posix ((</>))
import Text.Regex.TDFA
@@ -16,7 +20,7 @@ import Util (PrettyPrint (prettyprint))
-- a path without any . or .. in it. Also possibly a
-- fragment, mostly for map links.
data RelPath = Path Int Text (Maybe Text)
- deriving (Show, Eq, Ord)
+ deriving (Show, Eq, Ord, NFData, Generic)