Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data LinkLocation
- data DocLink = DocLink {}
- data LinksContext = LinksContext {}
- data InPackage a
- = Local a
- | FromDep PackageName a
- data PackageError
- newtype GithubRepo = GithubRepo {}
- newtype GithubUser = GithubUser {}
- data ChildDeclarationInfo
- data ChildDeclaration = ChildDeclaration {}
- data KindInfo = KindInfo {}
- data DeclarationInfo
- = ValueDeclaration Type'
- | DataDeclaration DataDeclType [(Text, Maybe Type')] [Role]
- | ExternDataDeclaration Type' [Role]
- | TypeSynonymDeclaration [(Text, Maybe Type')] Type'
- | TypeClassDeclaration [(Text, Maybe Type')] [Constraint'] [([Text], [Text])]
- | AliasDeclaration Fixity FixityAlias
- data Declaration = Declaration {}
- data Module = Module {
- modName :: ModuleName
- modComments :: Maybe Text
- modDeclarations :: [Declaration]
- modReExports :: [(InPackage ModuleName, [Declaration])]
- data ManifestError
- type VerifiedPackage = Package GithubUser
- type UploadedPackage = Package NotYetKnown
- data NotYetKnown = NotYetKnown
- data Package a = Package {}
- type Constraint' = Constraint ()
- type Type' = Type ()
- showManifestError :: ManifestError -> Text
- verifyPackage :: GithubUser -> UploadedPackage -> VerifiedPackage
- packageName :: Package a -> PackageName
- jsonTimeFormat :: String
- formatTime :: UTCTime -> String
- parseTime :: String -> Maybe UTCTime
- convertFundepsToStrings :: [(Text, Maybe Type')] -> [FunctionalDependency] -> [([Text], [Text])]
- declInfoToString :: DeclarationInfo -> Text
- declInfoNamespace :: DeclarationInfo -> Namespace
- isTypeClass :: Declaration -> Bool
- isValue :: Declaration -> Bool
- isType :: Declaration -> Bool
- isValueAlias :: Declaration -> Bool
- isTypeAlias :: Declaration -> Bool
- filterChildren :: (ChildDeclaration -> Bool) -> Declaration -> Declaration
- childDeclInfoToString :: ChildDeclarationInfo -> Text
- childDeclInfoNamespace :: ChildDeclarationInfo -> Namespace
- isTypeClassMember :: ChildDeclaration -> Bool
- isDataConstructor :: ChildDeclaration -> Bool
- ignorePackage :: InPackage a -> a
- getLink :: LinksContext -> ModuleName -> Namespace -> Text -> ContainingModule -> Maybe DocLink
- getLinksContext :: Package a -> LinksContext
- asPackage :: Version -> (forall e. Parse e a) -> Parse PackageError (Package a)
- parseTimeEither :: String -> Either PackageError UTCTime
- asUploadedPackage :: Version -> Parse PackageError UploadedPackage
- asNotYetKnown :: Parse e NotYetKnown
- displayPackageError :: PackageError -> Text
- asGithubUser :: Parse e GithubUser
- asVersion :: Parse PackageError Version
- asModule :: Parse PackageError Module
- asDeclaration :: Parse PackageError Declaration
- asReExport :: Parse PackageError (InPackage ModuleName, [Declaration])
- pOr :: Parse e a -> Parse e a -> Parse e a
- asInPackage :: Parse ManifestError a -> Parse ManifestError (InPackage a)
- asFixity :: Parse PackageError Fixity
- asFixityAlias :: Parse PackageError FixityAlias
- parseAssociativity :: String -> Maybe Associativity
- asAssociativity :: Parse PackageError Associativity
- asDeclarationInfo :: Parse PackageError DeclarationInfo
- asKindInfo :: Parse PackageError KindInfo
- asKindSignatureFor :: Parse PackageError KindSignatureFor
- asTypeArguments :: Parse PackageError [(Text, Maybe Type')]
- asRole :: Parse PackageError Role
- asType :: Parse e Type'
- asFunDeps :: Parse PackageError [([Text], [Text])]
- asDataDeclType :: Parse PackageError DataDeclType
- asChildDeclaration :: Parse PackageError ChildDeclaration
- asChildDeclarationInfo :: Parse PackageError ChildDeclarationInfo
- asSourcePos :: Parse e SourcePos
- asConstraint :: Parse PackageError Constraint'
- asQualifiedProperName :: Parse e (Qualified (ProperName a))
- asModuleMap :: Parse PackageError (Map ModuleName PackageName)
- bookmarksAsModuleMap :: Parse ManifestError (Map ModuleName PackageName)
- asResolvedDependencies :: Parse PackageError [(PackageName, Version)]
- parsePackageName' :: Text -> Either PackageError PackageName
- mapLeft :: (a -> a') -> Either a b -> Either a' b
- asGithub :: Parse e (GithubUser, GithubRepo)
- asSourceSpan :: Parse e SourceSpan
- kindSignatureForKeyword :: KindSignatureFor -> Text
- assocListToJSON :: (a -> Key) -> (b -> Text) -> [(a, b)] -> Value
- type FixityAlias = Qualified (Either (ProperName 'TypeName) (Either Ident (ProperName 'ConstructorName)))
- data RenderedCode
- data RenderedCodeElement
- data Namespace
- data ContainingModule
- asContainingModule :: Parse Text ContainingModule
Documentation
data LinkLocation Source #
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
Instances
Generic DocLink Source # | |
Show DocLink Source # | |
NFData DocLink Source # | |
Defined in Language.PureScript.Docs.Types | |
Eq DocLink Source # | |
Ord DocLink Source # | |
Defined in Language.PureScript.Docs.Types | |
type Rep DocLink Source # | |
Defined in Language.PureScript.Docs.Types type Rep DocLink = D1 ('MetaData "DocLink" "Language.PureScript.Docs.Types" "purescript-0.15.9-73KndBh0GamC7RCYwFLhcE" 'False) (C1 ('MetaCons "DocLink" 'PrefixI 'True) (S1 ('MetaSel ('Just "linkLocation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LinkLocation) :*: (S1 ('MetaSel ('Just "linkTitle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "linkNamespace") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Namespace)))) |
data LinksContext Source #
Instances
Local a | |
FromDep PackageName a |
Instances
data PackageError Source #
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 | |
InvalidKindSignatureFor Text | |
InvalidTime | |
InvalidRole Text |
Instances
newtype GithubRepo Source #
Instances
newtype GithubUser Source #
Instances
data ChildDeclarationInfo Source #
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, |
Instances
data ChildDeclaration Source #
Instances
Wraps enough information to properly render the kind signature of a datanewtypetype/class declaration.
Instances
ToJSON KindInfo Source # | |
Defined in Language.PureScript.Docs.Types | |
Generic KindInfo Source # | |
Show KindInfo Source # | |
NFData KindInfo Source # | |
Defined in Language.PureScript.Docs.Types | |
Eq KindInfo Source # | |
Ord KindInfo Source # | |
Defined in Language.PureScript.Docs.Types | |
type Rep KindInfo Source # | |
Defined in Language.PureScript.Docs.Types type Rep KindInfo = D1 ('MetaData "KindInfo" "Language.PureScript.Docs.Types" "purescript-0.15.9-73KndBh0GamC7RCYwFLhcE" 'False) (C1 ('MetaCons "KindInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "kiKeyword") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 KindSignatureFor) :*: S1 ('MetaSel ('Just "kiKind") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type'))) |
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
.
ValueDeclaration Type' | A value declaration, with its type. |
DataDeclaration DataDeclType [(Text, Maybe Type')] [Role] | A data/newtype declaration, with the kind of declaration (data or newtype) and its type arguments. Constructors are represented as child declarations. |
ExternDataDeclaration Type' [Role] | A data type foreign import, with its kind. |
TypeSynonymDeclaration [(Text, Maybe Type')] Type' | A type synonym, with its type arguments and its type. |
TypeClassDeclaration [(Text, Maybe Type')] [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. |
Instances
data Declaration Source #
Declaration | |
|
Instances
Module | |
|
Instances
ToJSON Module Source # | |
Defined in Language.PureScript.Docs.Types | |
Generic Module Source # | |
Show Module Source # | |
NFData Module Source # | |
Defined in Language.PureScript.Docs.Types | |
Eq Module Source # | |
Ord Module Source # | |
type Rep Module Source # | |
Defined in Language.PureScript.Docs.Types type Rep Module = D1 ('MetaData "Module" "Language.PureScript.Docs.Types" "purescript-0.15.9-73KndBh0GamC7RCYwFLhcE" 'False) (C1 ('MetaCons "Module" 'PrefixI 'True) ((S1 ('MetaSel ('Just "modName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleName) :*: S1 ('MetaSel ('Just "modComments") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "modDeclarations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Declaration]) :*: S1 ('MetaSel ('Just "modReExports") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(InPackage ModuleName, [Declaration])])))) |
data ManifestError Source #
Instances
type VerifiedPackage = Package GithubUser Source #
type UploadedPackage = Package NotYetKnown Source #
data NotYetKnown Source #
Instances
Package | |
|
Instances
type Constraint' = Constraint () Source #
packageName :: Package a -> PackageName 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.
convertFundepsToStrings :: [(Text, Maybe Type')] -> [FunctionalDependency] -> [([Text], [Text])] Source #
isTypeClass :: Declaration -> Bool Source #
isValue :: Declaration -> Bool Source #
isType :: Declaration -> Bool Source #
isValueAlias :: Declaration -> Bool Source #
isTypeAlias :: Declaration -> Bool Source #
filterChildren :: (ChildDeclaration -> Bool) -> Declaration -> Declaration Source #
Discard any children which do not satisfy the given predicate.
ignorePackage :: InPackage a -> a Source #
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.
getLinksContext :: Package a -> LinksContext Source #
asNotYetKnown :: Parse e NotYetKnown Source #
asGithubUser :: Parse e GithubUser Source #
asInPackage :: Parse ManifestError a -> Parse ManifestError (InPackage a) Source #
asTypeArguments :: Parse PackageError [(Text, Maybe Type')] Source #
asSourcePos :: Parse e SourcePos Source #
asQualifiedProperName :: Parse e (Qualified (ProperName a)) Source #
asGithub :: Parse e (GithubUser, GithubRepo) Source #
asSourceSpan :: Parse e SourceSpan Source #
assocListToJSON :: (a -> Key) -> (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"}
.
type FixityAlias = Qualified (Either (ProperName 'TypeName) (Either Ident (ProperName 'ConstructorName))) Source #
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
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.
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. |
Role Text |
Instances
Instances
data ContainingModule Source #
This type is isomorphic to Maybe
ModuleName
. It makes code a bit
easier to read, as the meaning is more explicit.