liquidhaskell-0.8.10.2: Liquid Types for Haskell
Safe HaskellNone
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

srcSpanTick :: Module -> SrcSpan -> Tickish a 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
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 #

Show Loc Source # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

showsPrec :: Int -> Loc -> ShowS #

show :: Loc -> String #

showList :: [Loc] -> ShowS #

Hashable Loc Source # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

hashWithSalt :: Int -> Loc -> Int #

hash :: Loc -> Int #

ToJSON Loc Source # 
Instance details

Defined in Language.Haskell.Liquid.UX.Annotate

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

isTupleId :: Id -> Bool Source #

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

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

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

splitModuleName :: Symbol -> (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 #

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.

Orphan instances

Show Class Source # 
Instance details

Methods

showsPrec :: Int -> Class -> ShowS #

show :: Class -> String #

showList :: [Class] -> ShowS #

Show Var Source # 
Instance details

Methods

showsPrec :: Int -> Var -> ShowS #

show :: Var -> String #

showList :: [Var] -> 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 #

NFData Class Source # 
Instance details

Methods

rnf :: Class -> () #

NFData Type Source # 
Instance details

Methods

rnf :: Type -> () #

NFData Var Source # 
Instance details

Methods

rnf :: Var -> () #

NFData TyCon Source # 
Instance details

Methods

rnf :: TyCon -> () #

Hashable DataCon Source # 
Instance details

Methods

hashWithSalt :: Int -> DataCon -> Int #

hash :: DataCon -> Int #

Hashable Var Source # 
Instance details

Methods

hashWithSalt :: Int -> Var -> Int #

hash :: Var -> Int #

Hashable SrcSpan Source # 
Instance details

Methods

hashWithSalt :: Int -> SrcSpan -> Int #

hash :: SrcSpan -> Int #

Hashable TyCon Source # 
Instance details

Methods

hashWithSalt :: Int -> TyCon -> Int #

hash :: TyCon -> Int #

Symbolic Class Source # 
Instance details

Methods

symbol :: Class -> 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 #

Symbolic FastString Source # 
Instance details

Methods

symbol :: FastString -> Symbol #

Symbolic TyCon Source #

Symbol Instances

Instance details

Methods

symbol :: TyCon -> Symbol #

Symbolic Name Source # 
Instance details

Methods

symbol :: Name -> Symbol #

Loc Var Source # 
Instance details

Methods

srcSpan :: Var -> SrcSpan #

Fixpoint Type Source # 
Instance details

Methods

toFix :: Type -> Doc #

simplify :: Type -> Type #

Fixpoint Var Source # 
Instance details

Methods

toFix :: Var -> Doc #

simplify :: Var -> Var #

Fixpoint Name Source # 
Instance details

Methods

toFix :: Name -> Doc #

simplify :: Name -> Name #

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

Methods

ppr :: HashSet a -> SDoc #

pprPrec :: Rational -> HashSet a -> SDoc #