mirror of
https://github.com/github/semantic.git
synced 2024-12-30 02:14:20 +03:00
Define an Exception instance for Error.
This commit is contained in:
parent
8801b21c77
commit
3b23701d39
@ -1,6 +1,7 @@
|
||||
{-# LANGUAGE GADTs, ImplicitParams, RankNTypes, StandaloneDeriving #-}
|
||||
module Data.Error where
|
||||
|
||||
import Control.Exception
|
||||
import Data.Blob
|
||||
import Data.ByteString (isSuffixOf)
|
||||
import Data.ByteString.Char8 (pack, unpack)
|
||||
@ -22,6 +23,7 @@ deriving instance Foldable Error
|
||||
deriving instance Functor Error
|
||||
deriving instance Show grammar => Show (Error grammar)
|
||||
deriving instance Traversable Error
|
||||
instance Exception (Error String)
|
||||
|
||||
errorCallStack :: Error grammar -> CallStack
|
||||
errorCallStack Error{} = callStack
|
||||
|
Loading…
Reference in New Issue
Block a user