rest-gen-0.19.0.0: Documentation and client generation from rest definition.

Safe HaskellSafe
LanguageHaskell98

Rest.Gen.Types

Synopsis

Documentation

namedImport :: String -> ImportDecl Source

Create a simple named basic import, to be updated with other fields as needed.

qualImport :: String -> ImportDecl Source

Qualified import with given name

newtype ModuleName :: *

The name of a Haskell module.

Constructors

ModuleName String 

data ImportDecl :: *

An import declaration.

Constructors

ImportDecl 

Fields

importLoc :: SrcLoc

position of the import keyword.

importModule :: ModuleName

name of the module imported.

importQualified :: Bool

imported qualified?

importSrc :: Bool

imported with {-# SOURCE #-}?

importSafe :: Bool

Import safe?

importPkg :: Maybe String

imported with explicit package name

importAs :: Maybe ModuleName

optional alias name in an as clause.

importSpecs :: Maybe (Bool, [ImportSpec])

optional list of import specifications. The Bool is True if the names are excluded by hiding.

Instances

Eq ImportDecl 
Data ImportDecl 
Ord ImportDecl 
Show ImportDecl 
Generic ImportDecl 
Pretty ImportDecl 
type Rep ImportDecl = D1 D1ImportDecl (C1 C1_0ImportDecl ((:*:) ((:*:) ((:*:) (S1 S1_0_0ImportDecl (Rec0 SrcLoc)) (S1 S1_0_1ImportDecl (Rec0 ModuleName))) ((:*:) (S1 S1_0_2ImportDecl (Rec0 Bool)) (S1 S1_0_3ImportDecl (Rec0 Bool)))) ((:*:) ((:*:) (S1 S1_0_4ImportDecl (Rec0 Bool)) (S1 S1_0_5ImportDecl (Rec0 (Maybe String)))) ((:*:) (S1 S1_0_6ImportDecl (Rec0 (Maybe ModuleName))) (S1 S1_0_7ImportDecl (Rec0 (Maybe (Bool, [ImportSpec]))))))))