liquidhaskell-boot-0.9.2.5.0: Liquid Types for Haskell
Safe HaskellSafe-Inferred
LanguageHaskell98

Language.Haskell.Liquid.GHC.Misc

Description

This module contains a wrappers and utility functions for accessing GHC module information. It should NEVER depend on ANY module inside the Language.Haskell.Liquid.* tree.

Synopsis

Documentation

tickSrcSpan :: CoreTickish -> SrcSpan Source #

Encoding and Decoding Location --------------------------------------------

stringTyVar :: String -> TyVar Source #

Generic Helpers for Accessing GHC Innards ---------------------------------

notracePpr :: Outputable a => String -> a -> a Source #

Pretty Printers -----------------------------------------------------------

tracePpr :: Outputable a => String -> a -> a Source #

pprShow :: Show a => a -> SDoc Source #

newtype Loc Source #

Manipulating Source Spans -------------------------------------------------

Constructors

L (Int, Int) 

Instances

Instances details
ToJSON Loc Source # 
Instance details

Defined in Language.Haskell.Liquid.UX.Annotate

Show Loc Source # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

showsPrec :: Int -> Loc -> ShowS #

show :: Loc -> String #

showList :: [Loc] -> ShowS #

Eq Loc Source # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

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

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

Ord Loc Source # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

compare :: Loc -> Loc -> Ordering #

(<) :: Loc -> Loc -> Bool #

(<=) :: Loc -> Loc -> Bool #

(>) :: Loc -> Loc -> Bool #

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

max :: Loc -> Loc -> Loc #

min :: Loc -> Loc -> Loc #

Hashable Loc Source # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

hashWithSalt :: Int -> Loc -> Int #

hash :: Loc -> Int #

fSrcSpan :: Loc a => a -> SrcSpan Source #

varLocInfo :: (Type -> a) -> Var -> Located a Source #

namedPanic :: NamedThing a => a -> String -> b Source #

collectArguments :: Int -> CoreExpr -> [Var] Source #

Manipulating CoreExpr -----------------------------------------------------

isExternalId :: Id -> Bool Source #

Predicates on CoreExpr and DataCons ---------------------------------------

symbolTyConWithKind :: Kind -> Char -> Int -> Symbol -> TyCon Source #

Symbol Conversions --------------------------------------------------------

takeModuleUnique :: Symbol -> Symbol Source #

Manipulating Symbols ------------------------------------------------------

wrapParens :: (IsString a, Monoid a) => a -> a Source #

gHC_VERSION :: String Source #

GHC Compatibility Layer ---------------------------------------------------

binders :: Bind a -> [a] Source #

isEmbeddedDictExpr :: CoreExpr -> Bool Source #

The following functions test if a CoreExpr or CoreVar can be embedded in logic. With type-class support, we can no longer erase such expressions arbitrarily.

isPredExpr :: CoreExpr -> Bool Source #

The following functions test if a CoreExpr or CoreVar are just types in disguise, e.g. have PredType (in the GHC sense of the word), and so shouldn't appear in refinements.

anyF :: [a -> Bool] -> a -> Bool Source #

defaultDataCons :: Type -> [AltCon] -> Maybe [(DataCon, [TyVar], [Type])] Source #

'defaultDataCons t ds' returns the list of '(dc, types)' pairs, corresponding to the _missing_ cases, i.e. _other_ than those in ds, that are being handled by DEFAULT.

canonSelectorChains :: PredType -> Map HashableType [Id] Source #

Superclass coherence

coherenceObligToRef :: Symbolic s => s -> [Id] -> [Id] -> Reft Source #

withWiredIn :: TcM a -> TcM a Source #

Run a computation in GHC's typechecking monad with wired in values locally bound in the typechecking environment.

Orphan instances

Show Class Source # 
Instance details

Methods

showsPrec :: Int -> Class -> ShowS #

show :: Class -> String #

showList :: [Class] -> ShowS #

Show TyCon Source # 
Instance details

Methods

showsPrec :: Int -> TyCon -> ShowS #

show :: TyCon -> String #

showList :: [TyCon] -> ShowS #

Show Name Source # 
Instance details

Methods

showsPrec :: Int -> Name -> ShowS #

show :: Name -> String #

showList :: [Name] -> ShowS #

Show Var Source # 
Instance details

Methods

showsPrec :: Int -> Var -> ShowS #

show :: Var -> String #

showList :: [Var] -> ShowS #

NFData Class Source # 
Instance details

Methods

rnf :: Class -> () #

NFData Type Source # 
Instance details

Methods

rnf :: Type -> () #

NFData TyCon Source # 
Instance details

Methods

rnf :: TyCon -> () #

NFData Var Source # 
Instance details

Methods

rnf :: Var -> () #

Hashable Class Source # 
Instance details

Methods

hashWithSalt :: Int -> Class -> Int #

hash :: Class -> Int #

Hashable DataCon Source # 
Instance details

Methods

hashWithSalt :: Int -> DataCon -> Int #

hash :: DataCon -> Int #

Hashable TyCon Source # 
Instance details

Methods

hashWithSalt :: Int -> TyCon -> Int #

hash :: TyCon -> Int #

Hashable SrcSpan Source # 
Instance details

Methods

hashWithSalt :: Int -> SrcSpan -> Int #

hash :: SrcSpan -> Int #

Hashable Var Source # 
Instance details

Methods

hashWithSalt :: Int -> Var -> Int #

hash :: Var -> Int #

Symbolic Class Source # 
Instance details

Methods

symbol :: Class -> Symbol #

Symbolic TyCon Source #

Symbol Instances

Instance details

Methods

symbol :: TyCon -> Symbol #

Symbolic FastString Source # 
Instance details

Methods

symbol :: FastString -> Symbol #

Symbolic Name Source # 
Instance details

Methods

symbol :: Name -> Symbol #

Symbolic Var Source #
NOTE:REFLECT-IMPORTS
we **eschew** the unique suffix for exported vars, to make it possible to lookup names from symbols _across_ modules; anyways exported names are top-level and you shouldn't have local binders that shadow them. However, we **keep** the unique suffix for local variables, as otherwise there are spurious, but extremely problematic, name collisions in the fixpoint environment.
Instance details

Methods

symbol :: Var -> Symbol #

Fixpoint Type Source # 
Instance details

Methods

toFix :: Type -> Doc #

simplify :: Type -> Type #

Fixpoint Name Source # 
Instance details

Methods

toFix :: Name -> Doc #

simplify :: Name -> Name #

Fixpoint Var Source # 
Instance details

Methods

toFix :: Var -> Doc #

simplify :: Var -> Var #

Loc Var Source # 
Instance details

Methods

srcSpan :: Var -> SrcSpan #

Outputable a => Outputable (HashSet a) Source # 
Instance details

Methods

ppr :: HashSet a -> SDoc #