aboutsummaryrefslogtreecommitdiffstats
path: root/app/Exception.hs
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2024-03-14 06:52:32 +0100
committerLibravatar Alexander Foremny <aforemny@posteo.de>2024-03-14 07:07:45 +0100
commit1821aca5ef5451d0b1943c8640c5eb1f6fa7bbee (patch)
treedc3df78464a164b3fb9674d4e03bc56d58a56df1 /app/Exception.hs
parent2c107e71572888327496d327a36737c02f64d894 (diff)
chore: resolve TODOs
Diffstat (limited to 'app/Exception.hs')
-rw-r--r--app/Exception.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/Exception.hs b/app/Exception.hs
index db7612b..6ac243b 100644
--- a/app/Exception.hs
+++ b/app/Exception.hs
@@ -8,6 +8,7 @@ module Exception
InvalidIssue (..),
CannotReadFile (..),
UnsupportedLanguage (..),
+ NoAncestor (..),
)
where
@@ -16,6 +17,7 @@ import Control.Exception
import Data.ByteString.Lazy.Char8 as LB
import Data.Text qualified as T
import Data.Void (Void)
+import Git.CommitHash qualified as Git
import System.Exit (ExitCode)
import Text.Megaparsec qualified as P
@@ -27,6 +29,7 @@ data AnyException
| InvalidDiff' InvalidDiff
| InvalidIssue' InvalidIssue
| UnsupportedLanguage' UnsupportedLanguage
+ | NoAncestor' NoAncestor
deriving (Show)
instance Exception AnyException
@@ -74,3 +77,8 @@ data UnsupportedLanguage = UnsupportedLanguage T.Text
deriving (Show)
instance Exception UnsupportedLanguage
+
+data NoAncestor = NoAncestor Git.CommitHash Git.CommitHash
+ deriving (Show)
+
+instance Exception NoAncestor