Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Some utility functions, classes and instances for nicer code generation.
Re-exports simpler versions of the types and constructors from
haskell-src-exts
.
We define orphan instances of IsString for various syntax
datatypes, with some intelligence about Haskell names. For example, "foo"
:: Exp
is treated as a variable and Foo :: Exp
is treated as a
constructor.
- prettyPrint :: Pretty a => a -> String
- type Asst = Asst ()
- classA :: QName -> [Type] -> Asst
- equalP :: Type -> Type -> Asst
- type ConDecl = ConDecl ()
- conDecl :: Name -> [Type] -> ConDecl
- recDecl :: Name -> [(Name, Type)] -> ConDecl
- type Decl = Decl ()
- patSynSig :: Name -> Type -> Decl
- patSyn :: Pat -> Pat -> Decl
- dataDecl :: Name -> [ConDecl] -> [QName] -> Decl
- funBind :: [Match] -> Decl
- instDecl :: [Asst] -> InstHead -> [[Match]] -> Decl
- typeSig :: [Name] -> Type -> Decl
- type Exp = Exp ()
- let' :: [Decl] -> Exp -> Exp
- stringExp :: String -> Exp
- tuple :: [Exp] -> Exp
- lambda :: [Pat] -> Exp -> Exp
- (@::@) :: Exp -> Type -> Exp
- recConstr :: QName -> [FieldUpdate] -> Exp
- recUpdate :: Exp -> [FieldUpdate] -> Exp
- var :: QName -> Exp
- con :: QName -> Exp
- list :: [Exp] -> Exp
- type FieldUpdate = FieldUpdate ()
- fieldUpdate :: QName -> Exp -> FieldUpdate
- type InstHead = InstHead ()
- ihApp :: InstHead -> [Type] -> InstHead
- type Match = Match ()
- match :: Name -> [Pat] -> Exp -> Match ()
- type Module = Module ()
- module' :: ModuleName -> [ModulePragma] -> [ImportDecl ()] -> [Decl] -> Module
- type ModuleName = ModuleName ()
- type ModulePragma = ModulePragma ()
- languagePragma :: [Name] -> ModulePragma
- optionsGhcPragma :: String -> ModulePragma
- type Name = Name ()
- type Pat = Pat ()
- pApp :: QName -> [Pat] -> Pat
- pVar :: Name -> Pat
- pWildCard :: Pat
- stringPat :: String -> Pat
- type QName = QName ()
- qual :: ModuleName -> Name -> QName
- unQual :: Name -> QName
- type TyVarBind = TyVarBind ()
- type Type = Type ()
- tyCon :: QName -> Type
- tyList :: Type -> Type
- tyPromotedString :: String -> Type
- tyForAll :: [TyVarBind] -> [Asst] -> Type -> Type
- tyBang :: Type -> Type
- class App a where
- isIdentChar :: Char -> Bool
- litInt :: Integer -> Exp
- litFrac :: Rational -> Exp
- pLitInt :: Integer -> Pat
- string :: String -> Literal ()
- data ImportDecl l :: * -> * = ImportDecl {
- importAnn :: l
- importModule :: ModuleName l
- importQualified :: Bool
- importSrc :: Bool
- importSafe :: Bool
- importPkg :: Maybe String
- importAs :: Maybe (ModuleName l)
- importSpecs :: Maybe (ImportSpecList l)
Documentation
prettyPrint :: Pretty a => a -> String Source #
type FieldUpdate = FieldUpdate () Source #
fieldUpdate :: QName -> Exp -> FieldUpdate Source #
module' :: ModuleName -> [ModulePragma] -> [ImportDecl ()] -> [Decl] -> Module Source #
type ModuleName = ModuleName () Source #
type ModulePragma = ModulePragma () Source #
languagePragma :: [Name] -> ModulePragma Source #
tyPromotedString :: String -> Type Source #
Application of a Haskell type or expression to an argument.
For example, to represent f x y
, you can write
"f" @@ "x" @@ "y"
isIdentChar :: Char -> Bool Source #
Whether this character belongs to an Ident (e.g., "foo") or a symbol (e.g., "$").
data ImportDecl l :: * -> * #
An import declaration.
ImportDecl | |
|
Functor ImportDecl | |
Foldable ImportDecl | |
Traversable ImportDecl | |
Annotated ImportDecl | |
Eq l => Eq (ImportDecl l) | |
Data l => Data (ImportDecl l) | |
Ord l => Ord (ImportDecl l) | |
Show l => Show (ImportDecl l) | |
Generic (ImportDecl l) | |
Pretty (ImportDecl l) | |
type Rep (ImportDecl l) | |