liquidhaskell-0.8.0.2: Liquid Types for Haskell

Safe HaskellNone
LanguageHaskell98

Language.Haskell.Liquid.GHC.Misc

Contents

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

data MGIModGuts Source #

Datatype For Holding GHC ModGuts ------------------------------------------

srcSpanTick :: Module -> SrcSpan -> Tickish a Source #

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

stringTyVar :: String -> TyVar Source #

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

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

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

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

toFixSDoc :: Fixpoint a => a -> Doc Source #

newtype Loc Source #

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

Constructors

L (Int, Int) 

Instances

Eq Loc Source # 

Methods

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

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

Ord Loc Source # 

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 # 

Methods

showsPrec :: Int -> Loc -> ShowS #

show :: Loc -> String #

showList :: [Loc] -> ShowS #

Hashable Loc Source # 

Methods

hashWithSalt :: Int -> Loc -> Int #

hash :: Loc -> Int #

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

namedLocSymbol :: (Symbolic a, NamedThing a) => a -> Located Symbol Source #

varLocInfo :: (Type -> a) -> Var -> Located a 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 --------------------------------------------------------

symbolTyCon :: Char -> Int -> Symbol -> TyCon Source #

symbolTyVar :: Symbol -> TyVar Source #

localVarSymbol :: Var -> Symbol Source #

splitModuleName :: Symbol -> (Symbol, Symbol) Source #

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

dropModuleNamesAndUnique :: Symbol -> Symbol Source #

dropModuleNames :: Symbol -> Symbol Source #

takeModuleNames :: Symbol -> Symbol Source #

dropModuleUnique :: Symbol -> Symbol Source #

cmpSymbol :: Symbol -> Symbol -> Bool Source #

mungeNames :: (String -> [Text] -> Symbol) -> Text -> String -> Symbol -> Symbol Source #

qualifySymbol :: Symbol -> Symbol -> Symbol Source #

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

isDictionary :: Symbolic a => a -> Bool Source #

isInternal :: Symbolic a => a -> Bool Source #

stripParensSym :: Symbol -> Symbol Source #

gHC_VERSION :: String Source #

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

simplesymbol :: NamedThing t => t -> Symbol Source #

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

Orphan instances

Show Class Source # 

Methods

showsPrec :: Int -> Class -> ShowS #

show :: Class -> String #

showList :: [Class] -> ShowS #

Show Var Source # 

Methods

showsPrec :: Int -> Var -> ShowS #

show :: Var -> String #

showList :: [Var] -> ShowS #

Show TyCon Source # 

Methods

showsPrec :: Int -> TyCon -> ShowS #

show :: TyCon -> String #

showList :: [TyCon] -> ShowS #

Show Name Source # 

Methods

showsPrec :: Int -> Name -> ShowS #

show :: Name -> String #

showList :: [Name] -> ShowS #

NFData Class Source # 

Methods

rnf :: Class -> () #

NFData Var Source # 

Methods

rnf :: Var -> () #

NFData TyCon Source # 

Methods

rnf :: TyCon -> () #

NFData Type Source # 

Methods

rnf :: Type -> () #

Hashable Var Source # 

Methods

hashWithSalt :: Int -> Var -> Int #

hash :: Var -> Int #

Hashable TyCon Source # 

Methods

hashWithSalt :: Int -> TyCon -> Int #

hash :: TyCon -> Int #

Hashable SrcSpan Source # 

Methods

hashWithSalt :: Int -> SrcSpan -> Int #

hash :: SrcSpan -> Int #

Fixpoint Var Source # 

Methods

toFix :: Var -> Doc

simplify :: Var -> Var

Fixpoint Type Source # 

Methods

toFix :: Type -> Doc

simplify :: Type -> Type

Fixpoint Name Source # 

Methods

toFix :: Name -> Doc

simplify :: Name -> Name

Symbolic Class Source # 

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.

Methods

symbol :: Var -> Symbol

Symbolic TyCon Source #

Symbol Instances

Methods

symbol :: TyCon -> Symbol

Symbolic FastString Source # 

Methods

symbol :: FastString -> Symbol

Symbolic Name Source # 

Methods

symbol :: Name -> Symbol

Outputable a => Outputable (HashSet a) Source # 

Methods

ppr :: HashSet a -> SDoc #

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