drasil-lang-0.1.60.0: A framework for code and document generation for scientific software - Language SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Drasil.Data.Citation

Description

Contains all necessary types and constructors for citing sources in Drasil.

Synopsis

Types

data CiteField Source #

Fields used in citations.

Constructors

Address String 
Author People 
BookTitle String

Used for InCollection references only.

Chapter Int 
Edition Int 
Editor People 
HowPublished HP

Can be published via URL or something else.

Institution String 
Journal String 
Month Month 
Note String 
Number Int 
Organization String 
Pages [Int]

Range of pages (ex1. 1-32; ex2. 7,31,52-55).

Publisher String 
School String 
Series String 
Title String 
Type String

BibTeX "type" field.

Volume Int 
Year Int 

Instances

Instances details
Generic CiteField Source # 
Instance details

Defined in Language.Drasil.Data.Citation

Associated Types

type Rep CiteField :: Type -> Type #

HasChunkRefs CiteField Source # 
Instance details

Defined in Language.Drasil.Data.Citation

Methods

chunkRefs :: CiteField -> Set UID #

type Rep CiteField Source # 
Instance details

Defined in Language.Drasil.Data.Citation

type Rep CiteField = D1 ('MetaData "CiteField" "Language.Drasil.Data.Citation" "drasil-lang-0.1.60.0-GSVjWL6zqIJGx21JJ17VJN" 'False) ((((C1 ('MetaCons "Address" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String)) :+: C1 ('MetaCons "Author" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 People))) :+: (C1 ('MetaCons "BookTitle" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String)) :+: (C1 ('MetaCons "Chapter" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "Edition" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))) :+: ((C1 ('MetaCons "Editor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 People)) :+: C1 ('MetaCons "HowPublished" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 HP))) :+: (C1 ('MetaCons "Institution" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String)) :+: (C1 ('MetaCons "Journal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String)) :+: C1 ('MetaCons "Month" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Month)))))) :+: (((C1 ('MetaCons "Note" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String)) :+: C1 ('MetaCons "Number" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) :+: (C1 ('MetaCons "Organization" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String)) :+: (C1 ('MetaCons "Pages" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Int])) :+: C1 ('MetaCons "Publisher" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String))))) :+: ((C1 ('MetaCons "School" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String)) :+: (C1 ('MetaCons "Series" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String)) :+: C1 ('MetaCons "Title" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String)))) :+: (C1 ('MetaCons "Type" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String)) :+: (C1 ('MetaCons "Volume" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "Year" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))))

data HP Source #

How something is published. Necessary for URLs to work properly.

Constructors

URL String 
Verb String 

Instances

Instances details
Generic HP Source # 
Instance details

Defined in Language.Drasil.Data.Citation

Associated Types

type Rep HP :: Type -> Type #

Methods

from :: HP -> Rep HP x #

to :: Rep HP x -> HP #

HasChunkRefs HP Source # 
Instance details

Defined in Language.Drasil.Data.Citation

Methods

chunkRefs :: HP -> Set UID #

type Rep HP Source # 
Instance details

Defined in Language.Drasil.Data.Citation

type Rep HP = D1 ('MetaData "HP" "Language.Drasil.Data.Citation" "drasil-lang-0.1.60.0-GSVjWL6zqIJGx21JJ17VJN" 'False) (C1 ('MetaCons "URL" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String)) :+: C1 ('MetaCons "Verb" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String)))

data CitationKind Source #

External references come in many flavours. Articles, Books, etc. (we are using the types available in Bibtex).

Instances

Instances details
Generic CitationKind Source # 
Instance details

Defined in Language.Drasil.Data.Citation

Associated Types

type Rep CitationKind :: Type -> Type #

HasChunkRefs CitationKind Source # 
Instance details

Defined in Language.Drasil.Data.Citation

type Rep CitationKind Source # 
Instance details

Defined in Language.Drasil.Data.Citation

type Rep CitationKind = D1 ('MetaData "CitationKind" "Language.Drasil.Data.Citation" "drasil-lang-0.1.60.0-GSVjWL6zqIJGx21JJ17VJN" 'False) (((C1 ('MetaCons "Article" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Book" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Booklet" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "InBook" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "InCollection" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InProceedings" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Manual" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MThesis" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Misc" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "PhDThesis" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Proceedings" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TechReport" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Unpublished" 'PrefixI 'False) (U1 :: Type -> Type)))))

Class

class HasFields c where Source #

Citations should have a fields (CiteField).

Methods

getFields :: Lens' c [CiteField] Source #

Provides a Lens to CiteFields.

Instances

Instances details
HasFields Citation Source #

Finds Fields of the Citation.

Instance details

Defined in Language.Drasil.Chunk.Citation

Methods

getFields :: Lens' Citation [CiteField] Source #

CiteField Constructors

People -> CiteField

author :: People -> CiteField Source #

Smart field constructor for a CiteField.

editor :: People -> CiteField Source #

Smart field constructor for a CiteField.

String -> CiteField

address :: String -> CiteField Source #

Smart field constructor for a CiteField.

bookTitle :: String -> CiteField Source #

Smart field constructor for a CiteField.

howPublished :: String -> CiteField Source #

Smart field constructor for a CiteField.

howPublishedU :: String -> CiteField Source #

URL version of howPublished.

Smart field constructor for a CiteField.

institution :: String -> CiteField Source #

Smart field constructor for a CiteField.

journal :: String -> CiteField Source #

Smart field constructor for a CiteField.

note :: String -> CiteField Source #

Smart field constructor for a CiteField.

organization :: String -> CiteField Source #

Smart field constructor for a CiteField.

publisher :: String -> CiteField Source #

Smart field constructor for a CiteField.

school :: String -> CiteField Source #

Smart field constructor for a CiteField.

series :: String -> CiteField Source #

Smart field constructor for a CiteField.

title :: String -> CiteField Source #

Smart field constructor for a CiteField.

typeField :: String -> CiteField Source #

Smart field constructor for a CiteField.

Int -> CiteField

chapter :: Int -> CiteField Source #

Smart field constructor for a CiteField.

edition :: Int -> CiteField Source #

Smart field constructor for a CiteField.

number :: Int -> CiteField Source #

Smart field constructor for a CiteField.

volume :: Int -> CiteField Source #

Smart field constructor for a CiteField.

year :: Int -> CiteField Source #

Smart field constructor for a CiteField.

[Int] -> CiteField

pages :: [Int] -> CiteField Source #

Smart field constructor for a CiteField.

CiteField -> CiteField

month :: Month -> CiteField Source #

Smart field constructor for a CiteField.

Comparators

compareAuthYearTitle :: HasFields c => c -> c -> Ordering Source #

Orders two authors. If given two of the exact same authors, year, and title, returns an error.