Safe Haskell | None |
---|---|
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 DeclarationInfo
- data Declaration = Declaration {}
- data Module = Module {
- modName :: ModuleName
- modComments :: Maybe Text
- modDeclarations :: [Declaration]
- modReExports :: [(InPackage ModuleName, [Declaration])]
- type ManifestError = BowerError
- type VerifiedPackage = Package GithubUser
- type UploadedPackage = Package NotYetKnown
- data NotYetKnown = NotYetKnown
- data Package a = Package {}
- type Constraint' = Constraint ()
- type Kind' = Kind ()
- type Type' = Type ()
- verifyPackage :: GithubUser -> UploadedPackage -> VerifiedPackage
- packageName :: Package a -> PackageName
- jsonTimeFormat :: String
- formatTime :: UTCTime -> String
- parseTime :: String -> Maybe UTCTime
- convertFundepsToStrings :: [(Text, Maybe Kind')] -> [FunctionalDependency] -> [([Text], [Text])]
- declInfoToString :: DeclarationInfo -> Text
- declInfoNamespace :: DeclarationInfo -> Namespace
- isTypeClass :: Declaration -> Bool
- isValue :: Declaration -> Bool
- isType :: Declaration -> Bool
- isValueAlias :: Declaration -> Bool
- isTypeAlias :: Declaration -> Bool
- isKind :: Declaration -> Bool
- filterChildren :: (ChildDeclaration -> Bool) -> Declaration -> Declaration
- childDeclInfoToString :: ChildDeclarationInfo -> Text
- childDeclInfoNamespace :: ChildDeclarationInfo -> Namespace
- isTypeClassMember :: ChildDeclaration -> Bool
- isDataConstructor :: ChildDeclaration -> Bool
- takeLocal :: InPackage a -> Maybe a
- takeLocals :: [InPackage a] -> [a]
- ignorePackage :: InPackage a -> a
- getLink :: LinksContext -> ModuleName -> Namespace -> Text -> ContainingModule -> Maybe DocLink
- getLinksContext :: Package a -> LinksContext
- parseUploadedPackage :: Version -> LByteString -> Either (ParseError PackageError) UploadedPackage
- parseVerifiedPackage :: Version -> LByteString -> Either (ParseError PackageError) VerifiedPackage
- 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
- asVerifiedPackage :: Version -> Parse PackageError VerifiedPackage
- displayPackageError :: PackageError -> Text
- asGithubUser :: Parse e GithubUser
- asVersion :: Parse PackageError Version
- parseVersion' :: String -> Maybe 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
- asTypeArguments :: Parse PackageError [(Text, Maybe Kind')]
- asKind :: Parse PackageError Kind'
- 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))
- asQualifiedIdent :: Parse e (Qualified Ident)
- asSourceAnn :: Parse e SourceAnn
- 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
- assocListToJSON :: (a -> Text) -> (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
- asRenderedCodeElement :: Parse Text RenderedCodeElement
- asRenderedCode :: Parse Text RenderedCode
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
Eq DocLink Source # | |
Ord DocLink Source # | |
Defined in Language.PureScript.Docs.Types | |
Show DocLink Source # | |
Generic DocLink Source # | |
NFData 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.13.0-1whdl2565Nb1wvlLK7uK18" 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
Functor InPackage Source # | |
Eq a => Eq (InPackage a) Source # | |
Ord a => Ord (InPackage a) Source # | |
Defined in Language.PureScript.Docs.Types | |
Show a => Show (InPackage a) Source # | |
Generic (InPackage a) Source # | |
NFData a => NFData (InPackage a) Source # | |
Defined in Language.PureScript.Docs.Types | |
ToJSON a => ToJSON (InPackage a) Source # | |
Defined in Language.PureScript.Docs.Types | |
type Rep (InPackage a) Source # | |
Defined in Language.PureScript.Docs.Types type Rep (InPackage a) = D1 (MetaData "InPackage" "Language.PureScript.Docs.Types" "purescript-0.13.0-1whdl2565Nb1wvlLK7uK18" False) (C1 (MetaCons "Local" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)) :+: C1 (MetaCons "FromDep" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PackageName) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) |
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 | |
InvalidTime |
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
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 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
data Declaration Source #
Instances
Module | |
|
Instances
Eq Module Source # | |
Ord Module Source # | |
Show Module Source # | |
Generic Module Source # | |
NFData Module Source # | |
Defined in Language.PureScript.Docs.Types | |
ToJSON Module Source # | |
Defined in Language.PureScript.Docs.Types | |
type Rep Module Source # | |
Defined in Language.PureScript.Docs.Types type Rep Module = D1 (MetaData "Module" "Language.PureScript.Docs.Types" "purescript-0.13.0-1whdl2565Nb1wvlLK7uK18" 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])])))) |
type ManifestError = BowerError Source #
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 Kind')] -> [FunctionalDependency] -> [([Text], [Text])] Source #
isTypeClass :: Declaration -> Bool Source #
isValue :: Declaration -> Bool Source #
isType :: Declaration -> Bool Source #
isValueAlias :: Declaration -> Bool Source #
isTypeAlias :: Declaration -> Bool Source #
isKind :: Declaration -> Bool Source #
filterChildren :: (ChildDeclaration -> Bool) -> Declaration -> Declaration Source #
Discard any children which do not satisfy the given predicate.
takeLocals :: [InPackage a] -> [a] Source #
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 #
parseUploadedPackage :: Version -> LByteString -> Either (ParseError PackageError) UploadedPackage Source #
parseVerifiedPackage :: Version -> LByteString -> Either (ParseError PackageError) VerifiedPackage 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 Kind')] Source #
asSourcePos :: Parse e SourcePos Source #
asQualifiedProperName :: Parse e (Qualified (ProperName a)) Source #
asSourceAnn :: Parse e SourceAnn Source #
asGithub :: Parse e (GithubUser, GithubRepo) Source #
asSourceSpan :: Parse e SourceSpan 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"}
.
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. |
Instances
Instances
Eq Namespace Source # | |
Ord Namespace Source # | |
Defined in Language.PureScript.Docs.RenderedCode.Types | |
Show Namespace Source # | |
Generic Namespace Source # | |
NFData Namespace Source # | |
Defined in Language.PureScript.Docs.RenderedCode.Types | |
ToJSON Namespace Source # | |
Defined in Language.PureScript.Docs.RenderedCode.Types | |
FromJSON Namespace Source # | |
type Rep Namespace Source # | |
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.