purescript-0.10.4: PureScript Programming Language Compiler

Safe HaskellNone
LanguageHaskell98

Language.PureScript.Docs.Types

Synopsis

Documentation

data Package a Source #

Constructors

Package 

Fields

Instances

Eq a => Eq (Package a) Source # 

Methods

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

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

Ord a => Ord (Package a) Source # 

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 # 

Methods

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

show :: Package a -> String #

showList :: [Package a] -> ShowS #

ToJSON a => ToJSON (Package a) Source # 
FromJSON a => FromJSON (Package a) Source # 

Methods

parseJSON :: Value -> Parser (Package a) #

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

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

Discard any children which do not satisfy the given predicate.

data InPackage a Source #

Constructors

Local a 
FromDep PackageName a 

Instances

Functor InPackage Source # 

Methods

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

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

Eq a => Eq (InPackage a) Source # 

Methods

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

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

Ord a => Ord (InPackage a) Source # 
Show a => Show (InPackage a) Source # 
ToJSON a => ToJSON (InPackage a) Source # 

asPackage :: Version -> (forall e. Parse e a) -> Parse PackageError (Package a) 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"}.