unison-share-api-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.Server.Syntax

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

Documentation

data Element Source #

The elements of the Unison grammar, for syntax highlighting purposes

Instances

Instances details
FromJSON Element Source # 
Instance details

Defined in Unison.Server.Syntax

ToJSON Element Source # 
Instance details

Defined in Unison.Server.Syntax

Generic Element Source # 
Instance details

Defined in Unison.Server.Syntax

Associated Types

type Rep Element :: Type -> Type #

Methods

from :: Element -> Rep Element x #

to :: Rep Element x -> Element #

Show Element Source # 
Instance details

Defined in Unison.Server.Syntax

Eq Element Source # 
Instance details

Defined in Unison.Server.Syntax

Methods

(==) :: Element -> Element -> Bool #

(/=) :: Element -> Element -> Bool #

Ord Element Source # 
Instance details

Defined in Unison.Server.Syntax

ToSchema Element Source # 
Instance details

Defined in Unison.Server.Syntax

ToSchema SyntaxText Source # 
Instance details

Defined in Unison.Server.Syntax

FromJSON (AnnotatedText Element) Source # 
Instance details

Defined in Unison.Server.Syntax

ToJSON (AnnotatedText Element) Source # 
Instance details

Defined in Unison.Server.Syntax

type Rep Element Source # 
Instance details

Defined in Unison.Server.Syntax

type Rep Element = D1 ('MetaData "Element" "Unison.Server.Syntax" "unison-share-api-0.0.0-7lCnmLo0h1RCAMi07EAZKZ" 'False) ((((C1 ('MetaCons "NumericLiteral" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TextLiteral" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BytesLiteral" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "CharLiteral" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BooleanLiteral" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Blank" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Var" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "TypeReference" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnisonHash)) :+: C1 ('MetaCons "DataConstructorReference" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnisonHash))) :+: (C1 ('MetaCons "AbilityConstructorReference" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnisonHash)) :+: C1 ('MetaCons "TermReference" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnisonHash)))) :+: ((C1 ('MetaCons "Op" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SeqOp)) :+: C1 ('MetaCons "AbilityBraces" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ControlKeyword" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeOperator" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: ((((C1 ('MetaCons "BindingEquals" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeAscriptionColon" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DataTypeKeyword" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DataTypeParams" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Unit" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DataTypeModifier" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "UseKeyword" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UsePrefix" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "UseSuffix" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "HashQualifier" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HashQualifiedName))) :+: (C1 ('MetaCons "DelayForceChar" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DelimiterChar" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Parenthesis" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LinkKeyword" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DocDelimiter" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DocKeyword" 'PrefixI 'False) (U1 :: Type -> Type))))))

toPlain :: SyntaxText -> String Source #

Convert a SyntaxText to a Value, ignoring syntax markup

Orphan instances