ghcide-1.9.1.0: The core of an IDE
Safe HaskellSafe-Inferred
LanguageHaskell2010

Development.IDE.GHC.Compat.Util

Description

GHC Utils and Datastructures re-exports.

Mainly handles module hierarchy re-organisation of GHC from version to= 9.0.

Some Functions, such as toList shadow other function-names. This way this module can be imported qualified more naturally.

Synopsis

Exception handling

class MonadThrow m => MonadCatch (m :: Type -> Type) #

A class for monads which allow exceptions to be caught, in particular exceptions which were thrown by throwM.

Instances should obey the following law:

catch (throwM e) f = f e

Note that the ability to catch an exception does not guarantee that we can deal with all possible exit points from a computation. Some monads, such as continuation-based stacks, allow for more than just a success/failure strategy, and therefore catch cannot be used by those monads to properly implement a function such as finally. For more information, see MonadMask.

Minimal complete definition

catch

Instances

Instances details
MonadCatch STM 
Instance details

Defined in Control.Monad.Catch

Methods

catch :: Exception e => STM a -> (e -> STM a) -> STM a #

MonadCatch Ghc 
Instance details

Defined in GHC.Driver.Monad

Methods

catch :: Exception e => Ghc a -> (e -> Ghc a) -> Ghc a #

MonadCatch IO 
Instance details

Defined in Control.Monad.Catch

Methods

catch :: Exception e => IO a -> (e -> IO a) -> IO a #

MonadCatch Action 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

catch :: Exception e => Action a -> (e -> Action a) -> Action a #

e ~ SomeException => MonadCatch (Either e)

Since: exceptions-0.8.3

Instance details

Defined in Control.Monad.Catch

Methods

catch :: Exception e0 => Either e a -> (e0 -> Either e a) -> Either e a #

MonadCatch (IOEnv env) 
Instance details

Defined in GHC.Data.IOEnv

Methods

catch :: Exception e => IOEnv env a -> (e -> IOEnv env a) -> IOEnv env a #

MonadCatch m => MonadCatch (GhcT m) 
Instance details

Defined in GHC.Driver.Monad

Methods

catch :: Exception e => GhcT m a -> (e -> GhcT m a) -> GhcT m a #

MonadCatch m => MonadCatch (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

catch :: Exception e => ResourceT m a -> (e -> ResourceT m a) -> ResourceT m a #

MonadCatch m => MonadCatch (ListT m) 
Instance details

Defined in Control.Monad.Catch

Methods

catch :: Exception e => ListT m a -> (e -> ListT m a) -> ListT m a #

MonadCatch m => MonadCatch (MaybeT m)

Catches exceptions from the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

catch :: Exception e => MaybeT m a -> (e -> MaybeT m a) -> MaybeT m a #

(Functor f, MonadCatch m) => MonadCatch (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

catch :: Exception e => FreeT f m a -> (e -> FreeT f m a) -> FreeT f m a #

MonadCatch m => MonadCatch (LspT config m) 
Instance details

Defined in Language.LSP.Server.Core

Methods

catch :: Exception e => LspT config m a -> (e -> LspT config m a) -> LspT config m a #

(Error e, MonadCatch m) => MonadCatch (ErrorT e m)

Catches exceptions from the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

catch :: Exception e0 => ErrorT e m a -> (e0 -> ErrorT e m a) -> ErrorT e m a #

MonadCatch m => MonadCatch (ExceptT e m)

Catches exceptions from the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

catch :: Exception e0 => ExceptT e m a -> (e0 -> ExceptT e m a) -> ExceptT e m a #

MonadCatch m => MonadCatch (IdentityT m) 
Instance details

Defined in Control.Monad.Catch

Methods

catch :: Exception e => IdentityT m a -> (e -> IdentityT m a) -> IdentityT m a #

MonadCatch m => MonadCatch (ReaderT r m) 
Instance details

Defined in Control.Monad.Catch

Methods

catch :: Exception e => ReaderT r m a -> (e -> ReaderT r m a) -> ReaderT r m a #

MonadCatch m => MonadCatch (StateT s m) 
Instance details

Defined in Control.Monad.Catch

Methods

catch :: Exception e => StateT s m a -> (e -> StateT s m a) -> StateT s m a #

MonadCatch m => MonadCatch (StateT s m) 
Instance details

Defined in Control.Monad.Catch

Methods

catch :: Exception e => StateT s m a -> (e -> StateT s m a) -> StateT s m a #

(MonadCatch m, Monoid w) => MonadCatch (WriterT w m) 
Instance details

Defined in Control.Monad.Catch

Methods

catch :: Exception e => WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a #

(MonadCatch m, Monoid w) => MonadCatch (WriterT w m) 
Instance details

Defined in Control.Monad.Catch

Methods

catch :: 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) 
Instance details

Defined in Control.Monad.Catch

Methods

catch :: 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) 
Instance details

Defined in Control.Monad.Catch

Methods

catch :: Exception e => RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a #

data GhcException #

GHC's own exception type error messages all take the form:

     <location>: <error>
 

If the location is on the command line, or in GHC itself, then <location>="ghc". All of the error types below correspond to a <location> of "ghc", except for ProgramError (where the string is assumed to contain a location already, so we don't print one).

handleGhcException :: ExceptionMonad m => (GhcException -> m a) -> m a -> m a #

catch :: (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 :: (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

data Bag a #

Instances

Instances details
Foldable Bag 
Instance details

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 #

toList :: Bag a -> [a] #

null :: Bag a -> Bool #

length :: Bag a -> Int #

elem :: Eq a => a -> Bag a -> Bool #

maximum :: Ord a => Bag a -> a #

minimum :: Ord a => Bag a -> a #

sum :: Num a => Bag a -> a #

product :: Num a => Bag a -> a #

Traversable Bag 
Instance details

Defined in GHC.Data.Bag

Methods

traverse :: Applicative f => (a -> f b) -> Bag a -> f (Bag b) #

sequenceA :: Applicative f => Bag (f a) -> f (Bag a) #

mapM :: Monad m => (a -> m b) -> Bag a -> m (Bag b) #

sequence :: Monad m => Bag (m a) -> m (Bag a) #

Functor Bag 
Instance details

Defined in GHC.Data.Bag

Methods

fmap :: (a -> b) -> Bag a -> Bag b #

(<$) :: a -> Bag b -> Bag a #

Data a => Data (Bag a) 
Instance details

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) #

toConstr :: Bag a -> Constr #

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) #

IsList (Bag a) 
Instance details

Defined in GHC.Data.Bag

Associated Types

type Item (Bag a) #

Methods

fromList :: [Item (Bag a)] -> Bag a #

fromListN :: Int -> [Item (Bag a)] -> Bag a #

toList :: Bag a -> [Item (Bag a)] #

Show a => Show (Bag a) Source # 
Instance details

Defined in Development.IDE.GHC.Orphans

Methods

showsPrec :: Int -> Bag a -> ShowS #

show :: Bag a -> String #

showList :: [Bag a] -> ShowS #

Outputable a => Outputable (Bag a) 
Instance details

Defined in GHC.Data.Bag

Methods

ppr :: Bag a -> SDoc #

ToHie a => ToHie (Bag a) 
Instance details

Defined in Compat.HieAst

Methods

toHie :: Bag a -> HieM [HieAST Type]

type Item (Bag a) 
Instance details

Defined in GHC.Data.Bag

type Item (Bag a) = a

bagToList :: Bag a -> [a] #

listToBag :: [a] -> Bag a #

unionBags :: Bag a -> Bag a -> Bag a #

Boolean Formula

data BooleanFormula a #

Instances

Instances details
Foldable BooleanFormula 
Instance details

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 
Instance details

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 
Instance details

Defined in GHC.Data.BooleanFormula

Methods

fmap :: (a -> b) -> BooleanFormula a -> BooleanFormula b #

(<$) :: a -> BooleanFormula b -> BooleanFormula a #

Data a => Data (BooleanFormula a) 
Instance details

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) #

Binary a => Binary (BooleanFormula a) 
Instance details

Defined in GHC.Data.BooleanFormula

OutputableBndr a => Outputable (BooleanFormula a) 
Instance details

Defined in GHC.Data.BooleanFormula

Methods

ppr :: BooleanFormula a -> SDoc #

Eq a => Eq (BooleanFormula a) 
Instance details

Defined in GHC.Data.BooleanFormula

ToHie (LBooleanFormula (LocatedN Name)) 
Instance details

Defined in Compat.HieAst

OverridingBool

data OverridingBool #

Constructors

Auto 
Always 
Never 

Instances

Instances details
Show OverridingBool 
Instance details

Defined in GHC.Utils.Misc

Maybes

data MaybeErr err val #

Constructors

Succeeded val 
Failed err 

Instances

Instances details
Applicative (MaybeErr err) 
Instance details

Defined in GHC.Data.Maybe

Methods

pure :: a -> MaybeErr err a #

(<*>) :: MaybeErr err (a -> b) -> MaybeErr err a -> MaybeErr err b #

liftA2 :: (a -> b -> c) -> MaybeErr err a -> MaybeErr err b -> MaybeErr err c #

(*>) :: MaybeErr err a -> MaybeErr err b -> MaybeErr err b #

(<*) :: MaybeErr err a -> MaybeErr err b -> MaybeErr err a #

Functor (MaybeErr err) 
Instance details

Defined in GHC.Data.Maybe

Methods

fmap :: (a -> b) -> MaybeErr err a -> MaybeErr err b #

(<$) :: a -> MaybeErr err b -> MaybeErr err a #

Monad (MaybeErr err) 
Instance details

Defined in GHC.Data.Maybe

Methods

(>>=) :: MaybeErr err a -> (a -> MaybeErr err b) -> MaybeErr err b #

(>>) :: MaybeErr err a -> MaybeErr err b -> MaybeErr err b #

return :: a -> MaybeErr err a #

orElse :: Maybe a -> a -> a infixr 4 #

Flipped version of fromMaybe, useful for chaining.

Pair

data Pair a #

Constructors

Pair 

Fields

Instances

Instances details
Foldable Pair 
Instance details

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 #

toList :: Pair a -> [a] #

null :: Pair a -> Bool #

length :: Pair a -> Int #

elem :: Eq a => a -> Pair a -> Bool #

maximum :: Ord a => Pair a -> a #

minimum :: Ord a => Pair a -> a #

sum :: Num a => Pair a -> a #

product :: Num a => Pair a -> a #

Traversable Pair 
Instance details

Defined in GHC.Data.Pair

Methods

traverse :: Applicative f => (a -> f b) -> Pair a -> f (Pair b) #

sequenceA :: Applicative f => Pair (f a) -> f (Pair a) #

mapM :: Monad m => (a -> m b) -> Pair a -> m (Pair b) #

sequence :: Monad m => Pair (m a) -> m (Pair a) #

Applicative Pair 
Instance details

Defined in GHC.Data.Pair

Methods

pure :: a -> Pair a #

(<*>) :: Pair (a -> b) -> Pair a -> Pair b #

liftA2 :: (a -> b -> c) -> Pair a -> Pair b -> Pair c #

(*>) :: Pair a -> Pair b -> Pair b #

(<*) :: Pair a -> Pair b -> Pair a #

Functor Pair 
Instance details

Defined in GHC.Data.Pair

Methods

fmap :: (a -> b) -> Pair a -> Pair b #

(<$) :: a -> Pair b -> Pair a #

(Semigroup a, Monoid a) => Monoid (Pair a) 
Instance details

Defined in GHC.Data.Pair

Methods

mempty :: Pair a #

mappend :: Pair a -> Pair a -> Pair a #

mconcat :: [Pair a] -> Pair a #

Semigroup a => Semigroup (Pair a) 
Instance details

Defined in GHC.Data.Pair

Methods

(<>) :: Pair a -> Pair a -> Pair a #

sconcat :: NonEmpty (Pair a) -> Pair a #

stimes :: Integral b => b -> Pair a -> Pair a #

Outputable a => Outputable (Pair a) 
Instance details

Defined in GHC.Data.Pair

Methods

ppr :: Pair a -> SDoc #

EnumSet

data EnumSet a #

toList :: Enum a => EnumSet a -> [a] #

FastString exports

data FastString #

A FastString is a UTF-8 encoded string together with a unique ID. All FastStrings are stored in a global hashtable to support fast O(1) comparison.

It is also associated with a lazy reference to the Z-encoding of this string which is used by the compiler internally.

Instances

Instances details
Data FastString 
Instance details

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 
Instance details

Defined in GHC.Data.FastString

Monoid FastString 
Instance details

Defined in GHC.Data.FastString

Semigroup FastString 
Instance details

Defined in GHC.Data.FastString

Show FastString 
Instance details

Defined in GHC.Data.FastString

NFData FastString 
Instance details

Defined in GHC.Data.FastString

Methods

rnf :: FastString -> () #

Uniquable FastString 
Instance details

Defined in GHC.Types.Unique

Binary FastString 
Instance details

Defined in GHC.Utils.Binary

Outputable FastString 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: FastString -> SDoc #

Eq FastString 
Instance details

Defined in GHC.Data.FastString

Ord FastString Source # 
Instance details

Defined in Development.IDE.GHC.Orphans

type Anno (SourceText, RuleName) 
Instance details

Defined in GHC.Hs.Decls

type Anno (SourceText, RuleName) 
Instance details

Defined in GHC.Hs.Decls

newtype LexicalFastString #

Lexical FastString

This is a simple FastString wrapper with an Ord instance using lexicalCompareFS (i.e. which compares FastStrings on their String representation). Hence it is deterministic from one run to the other.

Instances

Instances details
Data LexicalFastString 
Instance details

Defined in GHC.Data.FastString

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LexicalFastString -> c LexicalFastString #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LexicalFastString #

toConstr :: LexicalFastString -> Constr #

dataTypeOf :: LexicalFastString -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LexicalFastString) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LexicalFastString) #

gmapT :: (forall b. Data b => b -> b) -> LexicalFastString -> LexicalFastString #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LexicalFastString -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LexicalFastString -> r #

gmapQ :: (forall d. Data d => d -> u) -> LexicalFastString -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LexicalFastString -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LexicalFastString -> m LexicalFastString #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LexicalFastString -> m LexicalFastString #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LexicalFastString -> m LexicalFastString #

Show LexicalFastString 
Instance details

Defined in GHC.Data.FastString

Binary LexicalFastString 
Instance details

Defined in GHC.Utils.Binary

Outputable LexicalFastString 
Instance details

Defined in GHC.Utils.Outputable

Eq LexicalFastString 
Instance details

Defined in GHC.Data.FastString

Ord LexicalFastString 
Instance details

Defined in GHC.Data.FastString

unpackFS :: FastString -> String #

Unpacks and decodes the FastString

mkFastString :: String -> FastString #

Creates a UTF-8 encoded FastString from a String

pprHsString :: FastString -> SDoc #

Special combinator for showing string literals.

Fingerprint

data Fingerprint #

Constructors

Fingerprint !Word64 !Word64 

Instances

Instances details
Storable Fingerprint

Since: base-4.4.0.0

Instance details

Defined in Foreign.Storable

Generic Fingerprint 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Fingerprint :: Type -> Type #

Show Fingerprint

Since: base-4.7.0.0

Instance details

Defined in GHC.Fingerprint.Type

Binary Fingerprint

Since: binary-0.7.6.0

Instance details

Defined in Data.Binary.Class

NFData Fingerprint

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Fingerprint -> () #

Binary Fingerprint 
Instance details

Defined in GHC.Utils.Binary

Outputable Fingerprint 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Fingerprint -> SDoc #

Eq Fingerprint

Since: base-4.4.0.0

Instance details

Defined in GHC.Fingerprint.Type

Ord Fingerprint

Since: base-4.4.0.0

Instance details

Defined in GHC.Fingerprint.Type

Hashable Fingerprint

Since: hashable-1.3.0.0

Instance details

Defined in Data.Hashable.Class

type Rep Fingerprint

Since: base-4.15.0.0

Instance details

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 #

Computes the hash of a given file. This function loops over the handle, running in constant memory.

Since: base-4.7.0.0

Unique

class Uniquable a #

Class of things that we can obtain a Unique from

Minimal complete definition

getUnique

Instances

Instances details
Uniquable Label 
Instance details

Defined in GHC.Cmm.Dataflow.Label

Methods

getUnique :: Label -> Unique #

Uniquable LocalReg 
Instance details

Defined in GHC.Cmm.Expr

Methods

getUnique :: LocalReg -> Unique #

Uniquable Class 
Instance details

Defined in GHC.Core.Class

Methods

getUnique :: Class -> Unique #

Uniquable CoAxiomRule 
Instance details

Defined in GHC.Core.Coercion.Axiom

Uniquable ConLike 
Instance details

Defined in GHC.Core.ConLike

Methods

getUnique :: ConLike -> Unique #

Uniquable DataCon 
Instance details

Defined in GHC.Core.DataCon

Methods

getUnique :: DataCon -> Unique #

Uniquable PatSyn 
Instance details

Defined in GHC.Core.PatSyn

Methods

getUnique :: PatSyn -> Unique #

Uniquable CoercionHole 
Instance details

Defined in GHC.Core.TyCo.Rep

Uniquable TyCon 
Instance details

Defined in GHC.Core.TyCon

Methods

getUnique :: TyCon -> Unique #

Uniquable FastString 
Instance details

Defined in GHC.Types.Unique

Uniquable EvBindsVar 
Instance details

Defined in GHC.Tc.Types.Evidence

Uniquable Name 
Instance details

Defined in GHC.Types.Name

Methods

getUnique :: Name -> Unique #

Uniquable OccName 
Instance details

Defined in GHC.Types.Name.Occurrence

Methods

getUnique :: OccName -> Unique #

Uniquable Unique 
Instance details

Defined in GHC.Types.Unique

Methods

getUnique :: Unique -> Unique #

Uniquable Var 
Instance details

Defined in GHC.Types.Var

Methods

getUnique :: Var -> Unique #

Uniquable PackageId 
Instance details

Defined in GHC.Unit.Info

Uniquable PackageName 
Instance details

Defined in GHC.Unit.Info

Uniquable ModuleName 
Instance details

Defined in GHC.Unit.Module.Name

Uniquable Module 
Instance details

Defined in GHC.Unit.Types

Methods

getUnique :: Module -> Unique #

Uniquable UnitId 
Instance details

Defined in GHC.Unit.Types

Methods

getUnique :: UnitId -> Unique #

Uniquable Int 
Instance details

Defined in GHC.Types.Unique

Methods

getUnique :: Int -> Unique #

Uniquable (CoAxiom br) 
Instance details

Defined in GHC.Core.Coercion.Axiom

Methods

getUnique :: CoAxiom br -> Unique #

Uniquable unit => Uniquable (Definite unit) 
Instance details

Defined in GHC.Unit.Types

Methods

getUnique :: Definite unit -> Unique #

IsUnitId u => Uniquable (GenUnit u) 
Instance details

Defined in GHC.Unit.Types

Methods

getUnique :: GenUnit u -> Unique #

Uniquable unit => Uniquable (Indefinite unit) 
Instance details

Defined in GHC.Unit.Types

Methods

getUnique :: Indefinite unit -> Unique #

data Unique #

Unique identifier.

The type of unique identifiers that are used in many places in GHC for fast ordering and equality tests. You should generate these with the functions from the UniqSupply module

These are sometimes also referred to as "keys" in comments in GHC.

Instances

Instances details
Show Unique 
Instance details

Defined in GHC.Types.Unique

Uniquable Unique 
Instance details

Defined in GHC.Types.Unique

Methods

getUnique :: Unique -> Unique #

Outputable Unique 
Instance details

Defined in GHC.Types.Unique

Methods

ppr :: Unique -> SDoc #

Eq Unique 
Instance details

Defined in GHC.Types.Unique

Methods

(==) :: Unique -> Unique -> Bool #

(/=) :: Unique -> Unique -> Bool #

UniqDFM

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 #

String Buffer

data StringBuffer #

A StringBuffer is an internal pointer to a sized chunk of bytes. The bytes are intended to be *immutable*. There are pure operations to read the contents of a StringBuffer.

A StringBuffer may have a finalizer, depending on how it was obtained.

Constructors

StringBuffer 

Fields

Instances

Instances details
Show StringBuffer 
Instance details

Defined in GHC.Data.StringBuffer

NFData StringBuffer Source # 
Instance details

Defined in Development.IDE.GHC.Orphans

Methods

rnf :: StringBuffer -> () #

hGetStringBuffer :: FilePath -> IO StringBuffer #

Read a file into a StringBuffer. The resulting buffer is automatically managed by the garbage collector.

stringToStringBuffer :: String -> StringBuffer #

Encode a String into a StringBuffer as UTF-8. The resulting buffer is automatically managed by the garbage collector.

nextChar :: StringBuffer -> (Char, StringBuffer) #

Return the first UTF-8 character of a nonempty StringBuffer and as well the remaining portion (analogous to uncons). Warning: The behavior is undefined if the StringBuffer is empty. The result shares the same buffer as the original. Similar to utf8DecodeChar, if the character cannot be decoded as UTF-8, '\0' is returned.

atEnd :: StringBuffer -> Bool #

Check whether a StringBuffer is empty (analogous to null).