| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | Haskell2010 | 
Unison.Server.Syntax
Contents
Description
Duplicate of the Unison.Util.SyntaxText module, but we expect these to evolve separately. This is the version which is outward facing to the server frontend.
Synopsis
- type SyntaxText = AnnotatedText Element
- type SyntaxSegment = Segment Element
- convertElement :: Element Reference -> Element
- type UnisonHash = Text
- type HashQualifiedName = Text
- data Element- = NumericLiteral
- | TextLiteral
- | BytesLiteral
- | CharLiteral
- | BooleanLiteral
- | Blank
- | Var
- | TypeReference UnisonHash
- | DataConstructorReference UnisonHash
- | AbilityConstructorReference UnisonHash
- | TermReference UnisonHash
- | Op SeqOp
- | AbilityBraces
- | ControlKeyword
- | TypeOperator
- | BindingEquals
- | TypeAscriptionColon
- | DataTypeKeyword
- | DataTypeParams
- | Unit
- | DataTypeModifier
- | UseKeyword
- | UsePrefix
- | UseSuffix
- | HashQualifier HashQualifiedName
- | DelayForceChar
- | DelimiterChar
- | Parenthesis
- | LinkKeyword
- | DocDelimiter
- | DocKeyword
 
- syntax :: Element -> SyntaxText -> SyntaxText
- firstReference :: SyntaxText -> Maybe UnisonHash
- reference :: SyntaxSegment -> Maybe UnisonHash
- toPlain :: SyntaxText -> Text
- toHtml :: SyntaxText -> Html ()
- nameToHtml :: Name -> Html ()
- segmentToHtml :: SyntaxSegment -> Html ()
- elementToClassName :: Element -> Text
Documentation
type SyntaxText = AnnotatedText Element Source #
type SyntaxSegment = Segment Element Source #
type UnisonHash = Text Source #
type HashQualifiedName = Text Source #
The elements of the Unison grammar, for syntax highlighting purposes
Constructors
Instances
syntax :: Element -> SyntaxText -> SyntaxText Source #
reference :: SyntaxSegment -> Maybe UnisonHash Source #
toPlain :: SyntaxText -> Text Source #
Convert a SyntaxText to a Text, ignoring syntax markup
toHtml :: SyntaxText -> Html () Source #
nameToHtml :: Name -> Html () Source #
segmentToHtml :: SyntaxSegment -> Html () Source #
elementToClassName :: Element -> Text Source #
Orphan instances
| FromJSON SeqOp Source # | |
| ToJSON SeqOp Source # | |
| ToSchema SeqOp Source # | |
| Methods declareNamedSchema :: Proxy SeqOp -> Declare (Definitions Schema) NamedSchema # | |
| FromJSON a => FromJSON (Segment a) Source # | |
| ToJSON a => ToJSON (Segment a) Source # | |
| ToSchema r => ToSchema (Seq r) Source # | |
| Methods declareNamedSchema :: Proxy (Seq r) -> Declare (Definitions Schema) NamedSchema # | |
| ToSchema a => ToSchema (Segment a) Source # | |
| Methods declareNamedSchema :: Proxy (Segment a) -> Declare (Definitions Schema) NamedSchema # | |