purescript-0.13.0: PureScript Programming Language Compiler

Safe HaskellNone
LanguageHaskell2010

Language.PureScript.Docs.RenderedCode.Types

Description

Data types and functions for representing a simplified form of PureScript code, intended for use in e.g. HTML documentation.

Synopsis

Documentation

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 ContainingModule Source #

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

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 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

outputWith :: Monoid a => (RenderedCodeElement -> a) -> RenderedCode -> a Source #

This function allows conversion of a RenderedCode value into a value of some other type (for example, plain text, or HTML). The first argument is a function specifying how each individual RenderedCodeElement should be rendered.

sp :: RenderedCode Source #

A RenderedCode fragment representing a space.

parens :: RenderedCode -> RenderedCode Source #

Wrap a RenderedCode value in parens.