fortran-src-0.15.1: Parsers and analyses for Fortran standards 66, 77, 90, 95 and 2003 (partial).
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Fortran.Util.SecondParameter

Description

A convenience class for retrieving the first field of any constructor in a datatype.

The primary usage for this class is generic derivation:

data D a = D a () String deriving Generic instance SecondParameter (D a) ()

Note that _the deriver does not check you are requesting a valid/safe instance._ Invalid instances propagate the error to runtime. Fixing this requires a lot more type-level work. (The generic-lens library has a general solution, but it's slow and memory-consuming.)

Documentation

class SecondParameter a e | a -> e where Source #

Minimal complete definition

Nothing

Methods

getSecondParameter :: a -> e Source #

default getSecondParameter :: (Generic a, GSecondParameter (Rep a) e) => a -> e Source #

setSecondParameter :: e -> a -> a Source #

default setSecondParameter :: (Generic a, GSecondParameter (Rep a) e) => e -> a -> a Source #

Instances

Instances details
SecondParameter (AllocOpt a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Argument a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Attribute a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Block a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (CommonGroup a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (ControlPair a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (DataGroup a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Declarator a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (DimensionDeclarator a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (DoSpecification a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Expression a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (FlushSpec a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (ForallHeader a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (ForallHeaderPart a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (FormatItem a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (ImpElement a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (ImpList a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Index a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Namelist a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Prefix a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (ProcDecl a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (ProcInterface a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (ProgramUnit a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Selector a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Statement a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (StructureItem a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Suffix a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (TypeSpec a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (UnionMap a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Use a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (KindParam a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST.Literal

SecondParameter (ComplexLit a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST.Literal.Complex

SecondParameter (ComplexPart a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST.Literal.Complex

SecondParameter (LValue a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.LValue

SecondParameter (AList t a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST.AList

SecondParameter (ATuple t1 t2 a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST.AList

Methods

getSecondParameter :: ATuple t1 t2 a -> SrcSpan Source #

setSecondParameter :: SrcSpan -> ATuple t1 t2 a -> ATuple t1 t2 a Source #