Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Development.IDE.GHC.Compat.Util
Description
Synopsis
- class MonadThrow m => MonadCatch (m :: Type -> Type)
- data GhcException
- handleGhcException :: ExceptionMonad m => (GhcException -> m a) -> m a -> m a
- catch :: (HasCallStack, MonadCatch m, Exception e) => m a -> (e -> m a) -> m a
- try :: (HasCallStack, MonadCatch m, Exception e) => m a -> m (Either e a)
- data Bag a
- bagToList :: Bag a -> [a]
- listToBag :: [a] -> Bag a
- unionBags :: Bag a -> Bag a -> Bag a
- isEmptyBag :: Bag a -> Bool
- type LBooleanFormula a = LocatedL (BooleanFormula a)
- data BooleanFormula a
- = Var a
- | And [LBooleanFormula a]
- | Or [LBooleanFormula a]
- | Parens (LBooleanFormula a)
- data OverridingBool
- data MaybeErr err val
- orElse :: Maybe a -> a -> a
- data Pair a = Pair {}
- data EnumSet a
- toList :: Enum a => EnumSet a -> [a]
- data FastString
- newtype LexicalFastString = LexicalFastString FastString
- uniq :: FastString -> Int
- unpackFS :: FastString -> String
- mkFastString :: String -> FastString
- fsLit :: String -> FastString
- pprHsString :: FastString -> SDoc
- data Fingerprint = Fingerprint !Word64 !Word64
- getFileHash :: FilePath -> IO Fingerprint
- fingerprintData :: Ptr Word8 -> Int -> IO Fingerprint
- fingerprintString :: String -> Fingerprint
- fingerprintFingerprints :: [Fingerprint] -> Fingerprint
- class Uniquable a
- nonDetCmpUnique :: Unique -> Unique -> Ordering
- getUnique :: Uniquable a => a -> Unique
- data Unique
- mkUnique :: Char -> Int -> Unique
- newTagUnique :: Unique -> Char -> Unique
- emptyUDFM :: UniqDFM key elt
- plusUDFM :: UniqDFM key elt -> UniqDFM key elt -> UniqDFM key elt
- plusUDFM_C :: (elt -> elt -> elt) -> UniqDFM key elt -> UniqDFM key elt -> UniqDFM key elt
- data StringBuffer = StringBuffer {
- buf :: !(ForeignPtr Word8)
- len :: !Int
- cur :: !Int
- hGetStringBuffer :: FilePath -> IO StringBuffer
- stringToStringBuffer :: String -> StringBuffer
- nextChar :: StringBuffer -> (Char, StringBuffer)
- atEnd :: StringBuffer -> Bool
Exception handling
class MonadThrow m => MonadCatch (m :: Type -> Type) #
Minimal complete definition
catch
Instances
MonadCatch STM | |
Defined in Control.Monad.Catch | |
MonadCatch Ghc | |
Defined in GHC.Driver.Monad | |
MonadCatch IO | |
Defined in Control.Monad.Catch Methods catch :: (HasCallStack, Exception e) => IO a -> (e -> IO a) -> IO a | |
MonadCatch Action | |
Defined in Development.IDE.Graph.Internal.Types | |
e ~ SomeException => MonadCatch (Either e) | |
Defined in Control.Monad.Catch Methods catch :: (HasCallStack, Exception e0) => Either e a -> (e0 -> Either e a) -> Either e a | |
MonadCatch (IOEnv env) | |
Defined in GHC.Data.IOEnv | |
MonadCatch m => MonadCatch (GhcT m) | |
Defined in GHC.Driver.Monad Methods catch :: (HasCallStack, Exception e) => GhcT m a -> (e -> GhcT m a) -> GhcT m a | |
MonadCatch m => MonadCatch (ResourceT m) | |
Defined in Control.Monad.Trans.Resource.Internal | |
MonadCatch m => MonadCatch (MaybeT m) | |
Defined in Control.Monad.Catch Methods catch :: (HasCallStack, Exception e) => MaybeT m a -> (e -> MaybeT m a) -> MaybeT m a | |
(Functor f, MonadCatch m) => MonadCatch (FreeT f m) | |
Defined in Control.Monad.Trans.Free | |
MonadCatch m => MonadCatch (LspT config m) | |
Defined in Language.LSP.Server.Core | |
MonadCatch m => MonadCatch (ExceptT e m) | |
Defined in Control.Monad.Catch Methods catch :: (HasCallStack, Exception e0) => ExceptT e m a -> (e0 -> ExceptT e m a) -> ExceptT e m a | |
MonadCatch m => MonadCatch (IdentityT m) | |
Defined in Control.Monad.Catch | |
MonadCatch m => MonadCatch (ReaderT r m) | |
Defined in Control.Monad.Catch Methods catch :: (HasCallStack, Exception e) => ReaderT r m a -> (e -> ReaderT r m a) -> ReaderT r m a | |
MonadCatch m => MonadCatch (StateT s m) | |
Defined in Control.Monad.Catch Methods catch :: (HasCallStack, Exception e) => StateT s m a -> (e -> StateT s m a) -> StateT s m a | |
MonadCatch m => MonadCatch (StateT s m) | |
Defined in Control.Monad.Catch Methods catch :: (HasCallStack, Exception e) => StateT s m a -> (e -> StateT s m a) -> StateT s m a | |
(MonadCatch m, Monoid w) => MonadCatch (WriterT w m) | |
Defined in Control.Monad.Catch Methods catch :: (HasCallStack, Exception e) => WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a | |
(MonadCatch m, Monoid w) => MonadCatch (WriterT w m) | |
Defined in Control.Monad.Catch Methods catch :: (HasCallStack, Exception e) => WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a | |
(MonadCatch m, Monoid w) => MonadCatch (RWST r w s m) | |
Defined in Control.Monad.Catch Methods catch :: (HasCallStack, Exception e) => RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a | |
(MonadCatch m, Monoid w) => MonadCatch (RWST r w s m) | |
Defined in Control.Monad.Catch Methods catch :: (HasCallStack, Exception e) => RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a |
data GhcException #
Instances
Exception GhcException | |
Defined in GHC.Utils.Panic Methods toException :: GhcException -> SomeException # fromException :: SomeException -> Maybe GhcException # displayException :: GhcException -> String # | |
Show GhcException | |
Defined in GHC.Utils.Panic Methods showsPrec :: Int -> GhcException -> ShowS # show :: GhcException -> String # showList :: [GhcException] -> ShowS # |
handleGhcException :: ExceptionMonad m => (GhcException -> m a) -> m a -> m a #
catch :: (HasCallStack, MonadCatch m, Exception e) => m a -> (e -> m a) -> m a #
Same as upstream catch
, but will not catch asynchronous
exceptions
Since: safe-exceptions-0.1.0.0
try :: (HasCallStack, MonadCatch m, Exception e) => m a -> m (Either e a) #
Same as upstream try
, but will not catch asynchronous
exceptions
Since: safe-exceptions-0.1.0.0
Bags
Instances
Foldable Bag | |
Defined in GHC.Data.Bag Methods fold :: Monoid m => Bag m -> m foldMap :: Monoid m => (a -> m) -> Bag a -> m foldMap' :: Monoid m => (a -> m) -> Bag a -> m foldr :: (a -> b -> b) -> b -> Bag a -> b foldr' :: (a -> b -> b) -> b -> Bag a -> b foldl :: (b -> a -> b) -> b -> Bag a -> b foldl' :: (b -> a -> b) -> b -> Bag a -> b foldr1 :: (a -> a -> a) -> Bag a -> a foldl1 :: (a -> a -> a) -> Bag a -> a elem :: Eq a => a -> Bag a -> Bool maximum :: Ord a => Bag a -> a | |
Traversable Bag | |
Functor Bag | |
Data a => Data (Bag a) | |
Defined in GHC.Data.Bag Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Bag a -> c (Bag a) gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Bag a) dataTypeOf :: Bag a -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Bag a)) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Bag a)) gmapT :: (forall b. Data b => b -> b) -> Bag a -> Bag a gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bag a -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bag a -> r gmapQ :: (forall d. Data d => d -> u) -> Bag a -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Bag a -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bag a -> m (Bag a) gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bag a -> m (Bag a) gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bag a -> m (Bag a) | |
Monoid (Bag a) | |
Semigroup (Bag a) | |
IsList (Bag a) | |
Show a => Show (Bag a) # | |
ToHie a => ToHie (Bag a) | |
Defined in GHC.Iface.Ext.Ast | |
Outputable a => Outputable (Bag a) | |
Defined in GHC.Data.Bag | |
type Item (Bag a) | |
Defined in GHC.Data.Bag type Item (Bag a) = a |
isEmptyBag :: Bag a -> Bool #
Boolean Formula
type LBooleanFormula a = LocatedL (BooleanFormula a) #
data BooleanFormula a #
Constructors
Var a | |
And [LBooleanFormula a] | |
Or [LBooleanFormula a] | |
Parens (LBooleanFormula a) |
Instances
Foldable BooleanFormula | |
Defined in GHC.Data.BooleanFormula Methods fold :: Monoid m => BooleanFormula m -> m foldMap :: Monoid m => (a -> m) -> BooleanFormula a -> m foldMap' :: Monoid m => (a -> m) -> BooleanFormula a -> m foldr :: (a -> b -> b) -> b -> BooleanFormula a -> b foldr' :: (a -> b -> b) -> b -> BooleanFormula a -> b foldl :: (b -> a -> b) -> b -> BooleanFormula a -> b foldl' :: (b -> a -> b) -> b -> BooleanFormula a -> b foldr1 :: (a -> a -> a) -> BooleanFormula a -> a foldl1 :: (a -> a -> a) -> BooleanFormula a -> a toList :: BooleanFormula a -> [a] null :: BooleanFormula a -> Bool length :: BooleanFormula a -> Int elem :: Eq a => a -> BooleanFormula a -> Bool maximum :: Ord a => BooleanFormula a -> a minimum :: Ord a => BooleanFormula a -> a sum :: Num a => BooleanFormula a -> a product :: Num a => BooleanFormula a -> a | |
Traversable BooleanFormula | |
Defined in GHC.Data.BooleanFormula Methods traverse :: Applicative f => (a -> f b) -> BooleanFormula a -> f (BooleanFormula b) # sequenceA :: Applicative f => BooleanFormula (f a) -> f (BooleanFormula a) mapM :: Monad m => (a -> m b) -> BooleanFormula a -> m (BooleanFormula b) # sequence :: Monad m => BooleanFormula (m a) -> m (BooleanFormula a) # | |
Functor BooleanFormula | |
Defined in GHC.Data.BooleanFormula Methods fmap :: (a -> b) -> BooleanFormula a -> BooleanFormula b # (<$) :: a -> BooleanFormula b -> BooleanFormula a # | |
Data a => Data (BooleanFormula a) | |
Defined in GHC.Data.BooleanFormula Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BooleanFormula a -> c (BooleanFormula a) gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (BooleanFormula a) toConstr :: BooleanFormula a -> Constr dataTypeOf :: BooleanFormula a -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (BooleanFormula a)) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (BooleanFormula a)) gmapT :: (forall b. Data b => b -> b) -> BooleanFormula a -> BooleanFormula a gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BooleanFormula a -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BooleanFormula a -> r gmapQ :: (forall d. Data d => d -> u) -> BooleanFormula a -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> BooleanFormula a -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> BooleanFormula a -> m (BooleanFormula a) gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BooleanFormula a -> m (BooleanFormula a) gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BooleanFormula a -> m (BooleanFormula a) | |
ToHie (LBooleanFormula (LocatedN Name)) | |
Defined in GHC.Iface.Ext.Ast Methods toHie :: LBooleanFormula (LocatedN Name) -> HieM [HieAST Type] | |
Binary a => Binary (BooleanFormula a) | |
Defined in GHC.Data.BooleanFormula Methods put_ :: BinHandle -> BooleanFormula a -> IO () put :: BinHandle -> BooleanFormula a -> IO (Bin (BooleanFormula a)) get :: BinHandle -> IO (BooleanFormula a) | |
OutputableBndr a => Outputable (BooleanFormula a) | |
Defined in GHC.Data.BooleanFormula Methods ppr :: BooleanFormula a -> SDoc # | |
Eq a => Eq (BooleanFormula a) | |
Defined in GHC.Data.BooleanFormula Methods (==) :: BooleanFormula a -> BooleanFormula a -> Bool # (/=) :: BooleanFormula a -> BooleanFormula a -> Bool # |
OverridingBool
data OverridingBool #
Instances
Maybes
Instances
Applicative (MaybeErr err) | |
Defined in GHC.Data.Maybe | |
Functor (MaybeErr err) | |
Monad (MaybeErr err) | |
Pair
Instances
Foldable Pair | |
Defined in GHC.Data.Pair Methods fold :: Monoid m => Pair m -> m foldMap :: Monoid m => (a -> m) -> Pair a -> m foldMap' :: Monoid m => (a -> m) -> Pair a -> m foldr :: (a -> b -> b) -> b -> Pair a -> b foldr' :: (a -> b -> b) -> b -> Pair a -> b foldl :: (b -> a -> b) -> b -> Pair a -> b foldl' :: (b -> a -> b) -> b -> Pair a -> b foldr1 :: (a -> a -> a) -> Pair a -> a foldl1 :: (a -> a -> a) -> Pair a -> a elem :: Eq a => a -> Pair a -> Bool maximum :: Ord a => Pair a -> a | |
Traversable Pair | |
Applicative Pair | |
Functor Pair | |
(Semigroup a, Monoid a) => Monoid (Pair a) | |
Semigroup a => Semigroup (Pair a) | |
Outputable a => Outputable (Pair a) | |
Defined in GHC.Data.Pair |
EnumSet
FastString exports
data FastString #
Instances
Data FastString | |
Defined in GHC.Data.FastString Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FastString -> c FastString gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FastString toConstr :: FastString -> Constr dataTypeOf :: FastString -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FastString) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FastString) gmapT :: (forall b. Data b => b -> b) -> FastString -> FastString gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FastString -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FastString -> r gmapQ :: (forall d. Data d => d -> u) -> FastString -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> FastString -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> FastString -> m FastString gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FastString -> m FastString gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FastString -> m FastString | |
IsString FastString | |
Defined in GHC.Data.FastString Methods fromString :: String -> FastString | |
Monoid FastString | |
Defined in GHC.Data.FastString Methods mempty :: FastString # mappend :: FastString -> FastString -> FastString # mconcat :: [FastString] -> FastString # | |
Semigroup FastString | |
Defined in GHC.Data.FastString Methods (<>) :: FastString -> FastString -> FastString # sconcat :: NonEmpty FastString -> FastString # stimes :: Integral b => b -> FastString -> FastString # | |
Show FastString | |
Defined in GHC.Data.FastString Methods showsPrec :: Int -> FastString -> ShowS # show :: FastString -> String # showList :: [FastString] -> ShowS # | |
NFData FastString | |
Defined in GHC.Data.FastString Methods rnf :: FastString -> () # | |
ToJExpr FastString | |
Defined in GHC.JS.Make | |
Uniquable FastString | |
Defined in GHC.Types.Unique Methods getUnique :: FastString -> Unique # | |
Binary FastString | |
Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> FastString -> IO () put :: BinHandle -> FastString -> IO (Bin FastString) get :: BinHandle -> IO FastString | |
Outputable FastString | |
Defined in GHC.Utils.Outputable Methods ppr :: FastString -> SDoc # | |
Eq FastString | |
Defined in GHC.Data.FastString | |
Ord FastString | |
Defined in Development.IDE.GHC.Orphans Methods compare :: FastString -> FastString -> Ordering (<) :: FastString -> FastString -> Bool (<=) :: FastString -> FastString -> Bool (>) :: FastString -> FastString -> Bool (>=) :: FastString -> FastString -> Bool max :: FastString -> FastString -> FastString min :: FastString -> FastString -> FastString | |
ToJExpr a => ToJExpr (UniqMap FastString a) | |
Defined in GHC.JS.Make | |
type Anno FastString | |
Defined in GHC.Hs.Expr | |
type Anno (SourceText, RuleName) | |
Defined in GHC.Hs.Decls |
newtype LexicalFastString #
Constructors
LexicalFastString FastString |
Instances
uniq :: FastString -> Int #
unpackFS :: FastString -> String #
mkFastString :: String -> FastString #
fsLit :: String -> FastString #
pprHsString :: FastString -> SDoc #
Fingerprint
data Fingerprint #
Constructors
Fingerprint !Word64 !Word64 |
Instances
Storable Fingerprint | |
Defined in Foreign.Storable Methods sizeOf :: Fingerprint -> Int # alignment :: Fingerprint -> Int # peekElemOff :: Ptr Fingerprint -> Int -> IO Fingerprint # pokeElemOff :: Ptr Fingerprint -> Int -> Fingerprint -> IO () # peekByteOff :: Ptr b -> Int -> IO Fingerprint # pokeByteOff :: Ptr b -> Int -> Fingerprint -> IO () # peek :: Ptr Fingerprint -> IO Fingerprint # poke :: Ptr Fingerprint -> Fingerprint -> IO () # | |
Generic Fingerprint | |
Defined in GHC.Generics Associated Types type Rep Fingerprint :: Type -> Type | |
Show Fingerprint | |
Defined in GHC.Fingerprint.Type Methods showsPrec :: Int -> Fingerprint -> ShowS # show :: Fingerprint -> String # showList :: [Fingerprint] -> ShowS # | |
Binary Fingerprint | |
Defined in Data.Binary.Class | |
NFData Fingerprint | |
Defined in Control.DeepSeq Methods rnf :: Fingerprint -> () # | |
Binary Fingerprint | |
Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Fingerprint -> IO () put :: BinHandle -> Fingerprint -> IO (Bin Fingerprint) get :: BinHandle -> IO Fingerprint | |
Outputable Fingerprint | |
Defined in GHC.Utils.Outputable Methods ppr :: Fingerprint -> SDoc # | |
Eq Fingerprint | |
Defined in GHC.Fingerprint.Type | |
Ord Fingerprint | |
Defined in GHC.Fingerprint.Type Methods compare :: Fingerprint -> Fingerprint -> Ordering (<) :: Fingerprint -> Fingerprint -> Bool (<=) :: Fingerprint -> Fingerprint -> Bool (>) :: Fingerprint -> Fingerprint -> Bool (>=) :: Fingerprint -> Fingerprint -> Bool max :: Fingerprint -> Fingerprint -> Fingerprint min :: Fingerprint -> Fingerprint -> Fingerprint | |
Hashable Fingerprint | Since: hashable-1.3.0.0 |
Defined in Data.Hashable.Class | |
type Rep Fingerprint | |
Defined in GHC.Generics type Rep Fingerprint = D1 ('MetaData "Fingerprint" "GHC.Fingerprint.Type" "base" 'False) (C1 ('MetaCons "Fingerprint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Word64) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Word64))) |
getFileHash :: FilePath -> IO Fingerprint #
fingerprintData :: Ptr Word8 -> Int -> IO Fingerprint #
fingerprintString :: String -> Fingerprint #
Unique
Minimal complete definition
Instances
nonDetCmpUnique :: Unique -> Unique -> Ordering #
Instances
Show Unique | |
Uniquable Unique | |
Defined in GHC.Types.Unique | |
Outputable Unique | |
Defined in GHC.Types.Unique | |
Eq Unique | |
newTagUnique :: Unique -> Char -> Unique #
UniqDFM
plusUDFM_C :: (elt -> elt -> elt) -> UniqDFM key elt -> UniqDFM key elt -> UniqDFM key elt #
String Buffer
data StringBuffer #
Constructors
StringBuffer | |
Fields
|
Instances
Show StringBuffer | |
Defined in GHC.Data.StringBuffer Methods showsPrec :: Int -> StringBuffer -> ShowS # show :: StringBuffer -> String # showList :: [StringBuffer] -> ShowS # | |
NFData StringBuffer # | |
Defined in Development.IDE.GHC.Orphans Methods rnf :: StringBuffer -> () # |
hGetStringBuffer :: FilePath -> IO StringBuffer #
nextChar :: StringBuffer -> (Char, StringBuffer) #
atEnd :: StringBuffer -> Bool #