aboutsummaryrefslogtreecommitdiffstats
path: root/app/TreeGrepper/Match.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/TreeGrepper/Match.hs')
-rw-r--r--app/TreeGrepper/Match.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/TreeGrepper/Match.hs b/app/TreeGrepper/Match.hs
index 7b8cde8..1072fbd 100644
--- a/app/TreeGrepper/Match.hs
+++ b/app/TreeGrepper/Match.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE OverloadedRecordDot #-}
+{-# LANGUAGE DeriveAnyClass #-}
module TreeGrepper.Match
( Match (..),
@@ -16,6 +17,7 @@ import Data.Ord (comparing)
import Data.Text (Text)
import Data.Text qualified as T
import GHC.Generics (Generic)
+import Data.Binary (Binary)
data Match = Match
{ kind :: String,
@@ -32,7 +34,7 @@ data Position = Position
{ row :: Int,
column :: Int
}
- deriving (Eq, Show, Generic)
+ deriving (Eq, Show, Generic, Binary)
instance Ord Position where
compare = compare `on` (\p -> (p.row, p.column))