purescript-0.13.0: PureScript Programming Language Compiler

Safe HaskellNone
LanguageHaskell2010

Language.PureScript.Docs.Types

Synopsis

Documentation

data LinkLocation Source #

Constructors

LocalModule ModuleName

A link to a declaration in the current package.

DepsModule PackageName Version ModuleName

A link to a declaration in a different package. The arguments represent the name of the other package, the version of the other package, and the name of the module in the other package that the declaration is in.

BuiltinModule ModuleName

A link to a declaration that is built in to the compiler, e.g. the Prim module. In this case we only need to store the module that the builtin comes from. Note that all builtin modules begin with Prim, and that the compiler rejects attempts to define modules whose names start with Prim.

Instances
Eq LinkLocation Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Ord LinkLocation Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Show LinkLocation Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Generic LinkLocation Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Associated Types

type Rep LinkLocation :: Type -> Type #

NFData LinkLocation Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Methods

rnf :: LinkLocation -> () #

type Rep LinkLocation Source # 
Instance details

Defined in Language.PureScript.Docs.Types

data DocLink Source #

data LinksContext Source #

Instances
Eq LinksContext Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Ord LinksContext Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Show LinksContext Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Generic LinksContext Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Associated Types

type Rep LinksContext :: Type -> Type #

NFData LinksContext Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Methods

rnf :: LinksContext -> () #

type Rep LinksContext Source # 
Instance details

Defined in Language.PureScript.Docs.Types

data InPackage a Source #

Constructors

Local a 
FromDep PackageName a 
Instances
Functor InPackage Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Methods

fmap :: (a -> b) -> InPackage a -> InPackage b #

(<$) :: a -> InPackage b -> InPackage a #

Eq a => Eq (InPackage a) Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Methods

(==) :: InPackage a -> InPackage a -> Bool #

(/=) :: InPackage a -> InPackage a -> Bool #

Ord a => Ord (InPackage a) Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Show a => Show (InPackage a) Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Generic (InPackage a) Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Associated Types

type Rep (InPackage a) :: Type -> Type #

Methods

from :: InPackage a -> Rep (InPackage a) x #

to :: Rep (InPackage a) x -> InPackage a #

NFData a => NFData (InPackage a) Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Methods

rnf :: InPackage a -> () #

ToJSON a => ToJSON (InPackage a) Source # 
Instance details

Defined in Language.PureScript.Docs.Types

type Rep (InPackage a) Source # 
Instance details

Defined in Language.PureScript.Docs.Types

data PackageError Source #

Constructors

CompilerTooOld Version Version

Minimum allowable version for generating data with the current parser, and actual version used.

ErrorInPackageMeta ManifestError 
InvalidVersion 
InvalidDeclarationType Text 
InvalidChildDeclarationType Text 
InvalidFixity 
InvalidKind Text 
InvalidDataDeclType Text 
InvalidTime 
Instances
Eq PackageError Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Ord PackageError Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Show PackageError Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Generic PackageError Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Associated Types

type Rep PackageError :: Type -> Type #

NFData PackageError Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Methods

rnf :: PackageError -> () #

type Rep PackageError Source # 
Instance details

Defined in Language.PureScript.Docs.Types

newtype GithubRepo Source #

Constructors

GithubRepo 

Fields

Instances
Eq GithubRepo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Ord GithubRepo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Show GithubRepo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Generic GithubRepo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Associated Types

type Rep GithubRepo :: Type -> Type #

NFData GithubRepo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Methods

rnf :: GithubRepo -> () #

ToJSON GithubRepo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

type Rep GithubRepo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

type Rep GithubRepo = D1 (MetaData "GithubRepo" "Language.PureScript.Docs.Types" "purescript-0.13.0-1whdl2565Nb1wvlLK7uK18" True) (C1 (MetaCons "GithubRepo" PrefixI True) (S1 (MetaSel (Just "runGithubRepo") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))

newtype GithubUser Source #

Constructors

GithubUser 

Fields

Instances
Eq GithubUser Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Ord GithubUser Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Show GithubUser Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Generic GithubUser Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Associated Types

type Rep GithubUser :: Type -> Type #

NFData GithubUser Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Methods

rnf :: GithubUser -> () #

ToJSON GithubUser Source # 
Instance details

Defined in Language.PureScript.Docs.Types

FromJSON GithubUser Source # 
Instance details

Defined in Language.PureScript.Docs.Types

type Rep GithubUser Source # 
Instance details

Defined in Language.PureScript.Docs.Types

type Rep GithubUser = D1 (MetaData "GithubUser" "Language.PureScript.Docs.Types" "purescript-0.13.0-1whdl2565Nb1wvlLK7uK18" True) (C1 (MetaCons "GithubUser" PrefixI True) (S1 (MetaSel (Just "runGithubUser") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))

data ChildDeclarationInfo Source #

Constructors

ChildInstance [Constraint'] Type'

A type instance declaration, with its dependencies and its type.

ChildDataConstructor [Type']

A data constructor, with its type arguments.

ChildTypeClassMember Type'

A type class member, with its type. Note that the type does not include the type class constraint; this may be added manually if desired. For example, pure from Applicative would be `forall a. a -> f a`.

Instances
Eq ChildDeclarationInfo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Ord ChildDeclarationInfo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Show ChildDeclarationInfo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Generic ChildDeclarationInfo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Associated Types

type Rep ChildDeclarationInfo :: Type -> Type #

NFData ChildDeclarationInfo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Methods

rnf :: ChildDeclarationInfo -> () #

ToJSON ChildDeclarationInfo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

type Rep ChildDeclarationInfo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

data ChildDeclaration Source #

Instances
Eq ChildDeclaration Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Ord ChildDeclaration Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Show ChildDeclaration Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Generic ChildDeclaration Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Associated Types

type Rep ChildDeclaration :: Type -> Type #

NFData ChildDeclaration Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Methods

rnf :: ChildDeclaration -> () #

ToJSON ChildDeclaration Source # 
Instance details

Defined in Language.PureScript.Docs.Types

type Rep ChildDeclaration Source # 
Instance details

Defined in Language.PureScript.Docs.Types

type Rep ChildDeclaration = D1 (MetaData "ChildDeclaration" "Language.PureScript.Docs.Types" "purescript-0.13.0-1whdl2565Nb1wvlLK7uK18" False) (C1 (MetaCons "ChildDeclaration" PrefixI True) ((S1 (MetaSel (Just "cdeclTitle") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text) :*: S1 (MetaSel (Just "cdeclComments") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "cdeclSourceSpan") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe SourceSpan)) :*: S1 (MetaSel (Just "cdeclInfo") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ChildDeclarationInfo))))

data DeclarationInfo Source #

A value of this type contains information that is specific to a particular kind of declaration (as opposed to information which exists in all kinds of declarations, which goes into the Declaration type directly).

Many of the constructors are very similar to their equivalents in the real PureScript AST, except that they have their name elided, since this is already available via the rdTitle field of Declaration.

Constructors

ValueDeclaration Type'

A value declaration, with its type.

DataDeclaration DataDeclType [(Text, Maybe Kind')]

A data/newtype declaration, with the kind of declaration (data or newtype) and its type arguments. Constructors are represented as child declarations.

ExternDataDeclaration Kind'

A data type foreign import, with its kind.

TypeSynonymDeclaration [(Text, Maybe Kind')] Type'

A type synonym, with its type arguments and its type.

TypeClassDeclaration [(Text, Maybe Kind')] [Constraint'] [([Text], [Text])]

A type class, with its type arguments, its superclasses and functional dependencies. Instances and members are represented as child declarations.

AliasDeclaration Fixity FixityAlias

An operator alias declaration, with the member the alias is for and the operator's fixity.

ExternKindDeclaration

A kind declaration

Instances
Eq DeclarationInfo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Ord DeclarationInfo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Show DeclarationInfo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Generic DeclarationInfo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Associated Types

type Rep DeclarationInfo :: Type -> Type #

NFData DeclarationInfo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Methods

rnf :: DeclarationInfo -> () #

ToJSON DeclarationInfo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

type Rep DeclarationInfo Source # 
Instance details

Defined in Language.PureScript.Docs.Types

type Rep DeclarationInfo = D1 (MetaData "DeclarationInfo" "Language.PureScript.Docs.Types" "purescript-0.13.0-1whdl2565Nb1wvlLK7uK18" False) ((C1 (MetaCons "ValueDeclaration" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Type')) :+: (C1 (MetaCons "DataDeclaration" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 DataDeclType) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [(Text, Maybe Kind')])) :+: C1 (MetaCons "ExternDataDeclaration" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Kind')))) :+: ((C1 (MetaCons "TypeSynonymDeclaration" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [(Text, Maybe Kind')]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Type')) :+: C1 (MetaCons "TypeClassDeclaration" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [(Text, Maybe Kind')]) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Constraint']) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [([Text], [Text])])))) :+: (C1 (MetaCons "AliasDeclaration" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Fixity) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FixityAlias)) :+: C1 (MetaCons "ExternKindDeclaration" PrefixI False) (U1 :: Type -> Type))))

data Declaration Source #

Instances
Eq Declaration Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Ord Declaration Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Show Declaration Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Generic Declaration Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Associated Types

type Rep Declaration :: Type -> Type #

NFData Declaration Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Methods

rnf :: Declaration -> () #

ToJSON Declaration Source # 
Instance details

Defined in Language.PureScript.Docs.Types

type Rep Declaration Source # 
Instance details

Defined in Language.PureScript.Docs.Types

data Module Source #

Instances
Eq Module Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Methods

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

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

Ord Module Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Show Module Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Generic Module Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Associated Types

type Rep Module :: Type -> Type #

Methods

from :: Module -> Rep Module x #

to :: Rep Module x -> Module #

NFData Module Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Methods

rnf :: Module -> () #

ToJSON Module Source # 
Instance details

Defined in Language.PureScript.Docs.Types

type Rep Module Source # 
Instance details

Defined in Language.PureScript.Docs.Types

data NotYetKnown Source #

Constructors

NotYetKnown 
Instances
Eq NotYetKnown Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Ord NotYetKnown Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Show NotYetKnown Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Generic NotYetKnown Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Associated Types

type Rep NotYetKnown :: Type -> Type #

NFData NotYetKnown Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Methods

rnf :: NotYetKnown -> () #

ToJSON NotYetKnown Source # 
Instance details

Defined in Language.PureScript.Docs.Types

FromJSON NotYetKnown Source # 
Instance details

Defined in Language.PureScript.Docs.Types

type Rep NotYetKnown Source # 
Instance details

Defined in Language.PureScript.Docs.Types

type Rep NotYetKnown = D1 (MetaData "NotYetKnown" "Language.PureScript.Docs.Types" "purescript-0.13.0-1whdl2565Nb1wvlLK7uK18" False) (C1 (MetaCons "NotYetKnown" PrefixI False) (U1 :: Type -> Type))

data Package a Source #

Constructors

Package 

Fields

Instances
Eq a => Eq (Package a) Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Methods

(==) :: Package a -> Package a -> Bool #

(/=) :: Package a -> Package a -> Bool #

Ord a => Ord (Package a) Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Methods

compare :: Package a -> Package a -> Ordering #

(<) :: Package a -> Package a -> Bool #

(<=) :: Package a -> Package a -> Bool #

(>) :: Package a -> Package a -> Bool #

(>=) :: Package a -> Package a -> Bool #

max :: Package a -> Package a -> Package a #

min :: Package a -> Package a -> Package a #

Show a => Show (Package a) Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Methods

showsPrec :: Int -> Package a -> ShowS #

show :: Package a -> String #

showList :: [Package a] -> ShowS #

Generic (Package a) Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Associated Types

type Rep (Package a) :: Type -> Type #

Methods

from :: Package a -> Rep (Package a) x #

to :: Rep (Package a) x -> Package a #

NFData a => NFData (Package a) Source # 
Instance details

Defined in Language.PureScript.Docs.Types

Methods

rnf :: Package a -> () #

ToJSON a => ToJSON (Package a) Source # 
Instance details

Defined in Language.PureScript.Docs.Types

FromJSON a => FromJSON (Package a) Source # 
Instance details

Defined in Language.PureScript.Docs.Types

type Rep (Package a) Source # 
Instance details

Defined in Language.PureScript.Docs.Types

type Kind' = Kind () Source #

type Type' = Type () Source #

jsonTimeFormat :: String Source #

The time format used for serializing package tag times in the JSON format. This is the ISO 8601 date format which includes a time and a timezone.

formatTime :: UTCTime -> String Source #

Convenience function for formatting a time in the format expected by this module.

parseTime :: String -> Maybe UTCTime Source #

Convenience function for parsing a time in the format expected by this module.

filterChildren :: (ChildDeclaration -> Bool) -> Declaration -> Declaration Source #

Discard any children which do not satisfy the given predicate.

getLink :: LinksContext -> ModuleName -> Namespace -> Text -> ContainingModule -> Maybe DocLink Source #

Given a links context, the current module name, the namespace of a thing to link to, its title, and its containing module, attempt to create a DocLink.

asPackage :: Version -> (forall e. Parse e a) -> Parse PackageError (Package a) Source #

pOr :: Parse e a -> Parse e a -> Parse e a Source #

mapLeft :: (a -> a') -> Either a b -> Either a' b Source #

assocListToJSON :: (a -> Text) -> (b -> Text) -> [(a, b)] -> Value Source #

Given a function for turning association list keys into JSON object keys, and a function for turning association list values to JSON string values, turns an association list into a JSON object.

For example: assocListToJSON T.pack T.pack [("a", "b")] will give {"a": "b"}.

data RenderedCode Source #

A type representing a highly simplified version of PureScript code, intended for use in output formats like plain text or HTML.

Instances
Eq RenderedCode Source # 
Instance details

Defined in Language.PureScript.Docs.RenderedCode.Types

Ord RenderedCode Source # 
Instance details

Defined in Language.PureScript.Docs.RenderedCode.Types

Show RenderedCode Source # 
Instance details

Defined in Language.PureScript.Docs.RenderedCode.Types

Semigroup RenderedCode Source # 
Instance details

Defined in Language.PureScript.Docs.RenderedCode.Types

Monoid RenderedCode Source # 
Instance details

Defined in Language.PureScript.Docs.RenderedCode.Types

ToJSON RenderedCode Source # 
Instance details

Defined in Language.PureScript.Docs.RenderedCode.Types

data RenderedCodeElement Source #

A single element in a rendered code fragment. The intention is to support multiple output formats. For example, plain text, or highlighted HTML.

Constructors

Syntax Text 
Keyword Text 
Space 
Symbol Namespace Text Link

Any symbol which you might or might not want to link to, in any namespace (value, type, or kind). Note that this is not related to the kind called Symbol for type-level strings.

data Namespace Source #

Instances
Eq Namespace Source # 
Instance details

Defined in Language.PureScript.Docs.RenderedCode.Types

Ord Namespace Source # 
Instance details

Defined in Language.PureScript.Docs.RenderedCode.Types

Show Namespace Source # 
Instance details

Defined in Language.PureScript.Docs.RenderedCode.Types

Generic Namespace Source # 
Instance details

Defined in Language.PureScript.Docs.RenderedCode.Types

Associated Types

type Rep Namespace :: Type -> Type #

NFData Namespace Source # 
Instance details

Defined in Language.PureScript.Docs.RenderedCode.Types

Methods

rnf :: Namespace -> () #

ToJSON Namespace Source # 
Instance details

Defined in Language.PureScript.Docs.RenderedCode.Types

FromJSON Namespace Source # 
Instance details

Defined in Language.PureScript.Docs.RenderedCode.Types

type Rep Namespace Source # 
Instance details

Defined in Language.PureScript.Docs.RenderedCode.Types

type Rep Namespace = D1 (MetaData "Namespace" "Language.PureScript.Docs.RenderedCode.Types" "purescript-0.13.0-1whdl2565Nb1wvlLK7uK18" False) (C1 (MetaCons "ValueLevel" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "TypeLevel" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "KindLevel" PrefixI False) (U1 :: Type -> Type)))

data ContainingModule Source #

This type is isomorphic to Maybe ModuleName. It makes code a bit easier to read, as the meaning is more explicit.