diff options
author | Alexander Foremny <aforemny@posteo.de> | 2023-12-05 10:11:54 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2023-12-05 14:55:59 +0100 |
commit | 23bacb83e6ea67ffdd62be630626ab50ff665abf (patch) | |
tree | fcb7691e3f8862400c00f0ca823503e5087f411e /app/Exception.hs | |
parent | 1b1c3faabae530229eb675a2e70e744c2f45cbbe (diff) |
feat: parse issues as markdown
Diffstat (limited to 'app/Exception.hs')
-rw-r--r-- | app/Exception.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/Exception.hs b/app/Exception.hs index 49c9cb6..a809616 100644 --- a/app/Exception.hs +++ b/app/Exception.hs @@ -5,12 +5,16 @@ module Exception ProcessException (..), UnknownFileExtension (..), InvalidDiff (..), + InvalidIssue (..), ) where +import CMark qualified as D import Control.Exception import Data.ByteString.Lazy.Char8 as LB +import Data.Void (Void) import System.Exit (ExitCode) +import Text.Megaparsec qualified as P data AnyException = InvalidTreeGrepperResult' InvalidTreeGrepperResult @@ -18,6 +22,7 @@ data AnyException | ProcessException' ProcessException | UnknownFileExtension' UnknownFileExtension | InvalidDiff' InvalidDiff + | InvalidIssue' InvalidIssue deriving (Show) instance Exception AnyException @@ -50,3 +55,8 @@ data InvalidDiff = InvalidDiff String deriving (Show) instance Exception InvalidDiff + +data InvalidIssue = InvalidIssue (P.ParseErrorBundle [D.Node] Void) + deriving (Show) + +instance Exception InvalidIssue |