ghcide-2.9.0.0: The core of an IDE
Safe HaskellSafe-Inferred
LanguageGHC2021

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 :: (HasCallStack, Exception e) => STM a -> (e -> STM a) -> STM a #

MonadCatch Ghc 
Instance details

Defined in GHC.Driver.Monad

Methods

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

MonadCatch IO 
Instance details

Defined in Control.Monad.Catch

Methods

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

MonadCatch Action 
Instance details

Defined in Development.IDE.Graph.Internal.Types

Methods

catch :: (HasCallStack, 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 :: (HasCallStack, Exception e0) => Either e a -> (e0 -> Either e a) -> Either e a #

MonadCatch (IOEnv env) 
Instance details

Defined in GHC.Data.IOEnv

Methods

catch :: (HasCallStack, 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 :: (HasCallStack, 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 :: (HasCallStack, Exception e) => ResourceT m a -> (e -> ResourceT m a) -> ResourceT m a #

MonadCatch m => MonadCatch (MaybeT m)

Catches exceptions from the base monad.

Instance details

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

Defined in Control.Monad.Trans.Free

Methods

catch :: (HasCallStack, 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 :: (HasCallStack, Exception e) => LspT config m a -> (e -> LspT config m a) -> LspT config m a #

MonadCatch m => MonadCatch (ExceptT e m)

Catches exceptions from the base monad.

Instance details

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

Defined in Control.Monad.Catch

Methods

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

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

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 #

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

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

Monoid (Bag a) 
Instance details

Defined in GHC.Data.Bag

Methods

mempty :: Bag a #

mappend :: Bag a -> Bag a -> Bag a #

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

Semigroup (Bag a) 
Instance details

Defined in GHC.Data.Bag

Methods

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

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

stimes :: Integral b => b -> Bag a -> 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 #

ToHie a => ToHie (Bag a) 
Instance details

Defined in GHC.Iface.Ext.Ast

Methods

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

Outputable a => Outputable (Bag a) 
Instance details

Defined in GHC.Data.Bag

Methods

ppr :: Bag a -> SDoc #

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

ToHie (LBooleanFormula (LocatedN Name)) 
Instance details

Defined in GHC.Iface.Ext.Ast

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

OverridingBool

data OverridingBool #

Constructors

Auto 
Never 
Always 

Instances

Instances details
Bounded OverridingBool

Since: ghc-9.4.1

Instance details

Defined in GHC.Data.Bool

Enum OverridingBool

Since: ghc-9.4.1

Instance details

Defined in GHC.Data.Bool

Read OverridingBool

Since: ghc-9.4.1

Instance details

Defined in GHC.Data.Bool

Show OverridingBool 
Instance details

Defined in GHC.Data.Bool

Eq OverridingBool

Since: ghc-9.4.1

Instance details

Defined in GHC.Data.Bool

Ord OverridingBool

Since: ghc-9.4.1

Instance details

Defined in GHC.Data.Bool

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 #

Instances

Instances details
Monoid (EnumSet a) 
Instance details

Defined in GHC.Data.EnumSet

Methods

mempty :: EnumSet a #

mappend :: EnumSet a -> EnumSet a -> EnumSet a #

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

Semigroup (EnumSet a) 
Instance details

Defined in GHC.Data.EnumSet

Methods

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

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

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

NFData (EnumSet a) 
Instance details

Defined in GHC.Data.EnumSet

Methods

rnf :: EnumSet a -> () #

Binary (EnumSet a)

Represents the EnumSet as a bit set.

Assumes that all elements are non-negative.

This is only efficient for values that are sufficiently small, for example in the lower hundreds.

Instance details

Defined in GHC.Data.EnumSet

Methods

put_ :: BinHandle -> EnumSet a -> IO () #

put :: BinHandle -> EnumSet a -> IO (Bin (EnumSet a)) #

get :: BinHandle -> IO (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 -> () #

ToJExpr FastString 
Instance details

Defined in GHC.JS.Make

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

ToJExpr a => ToJExpr (UniqMap FastString a) 
Instance details

Defined in GHC.JS.Make

type Anno FastString 
Instance details

Defined in GHC.Hs.Expr

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 #

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

Defined in GHC.JS.Syntax

Methods

getUnique :: Ident -> Unique #

Uniquable EvBindsVar 
Instance details

Defined in GHC.Tc.Types.Evidence

Uniquable SkolemInfo 
Instance details

Defined in GHC.Tc.Types.Origin

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

Defined in GHC.Types.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 #

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