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

Unison.Server.Doc

Synopsis

Documentation

type Doc = DocG RenderedSpecialForm Source #

A doc rendered down to SyntaxText.

type EvaluatedDoc v = DocG (EvaluatedSpecialForm v) Source #

A doc which has been evaluated and includes all information necessary to be rendered.

data DocG specialForm Source #

A doc parameterized by its special forms.

Constructors

Word Text 
Code (DocG specialForm) 
CodeBlock Text (DocG specialForm) 
Bold (DocG specialForm) 
Italic (DocG specialForm) 
Strikethrough (DocG specialForm) 
Style Text (DocG specialForm) 
Anchor Text (DocG specialForm) 
Blockquote (DocG specialForm) 
Blankline 
Linebreak 
SectionBreak 
Tooltip (DocG specialForm) (DocG specialForm) 
Aside (DocG specialForm) 
Callout (Maybe (DocG specialForm)) (DocG specialForm) 
Table [[DocG specialForm]] 
Folded Bool (DocG specialForm) (DocG specialForm) 
Paragraph [DocG specialForm] 
BulletedList [DocG specialForm] 
NumberedList Nat [DocG specialForm] 
Section (DocG specialForm) [DocG specialForm] 
NamedLink (DocG specialForm) (DocG specialForm) 
Image (DocG specialForm) (DocG specialForm) (Maybe (DocG specialForm)) 
Special specialForm 
Join [DocG specialForm] 
UntitledSection [DocG specialForm] 
Column [DocG specialForm] 
Group (DocG specialForm) 

Instances

Instances details
Foldable DocG Source # 
Instance details

Defined in Unison.Server.Doc

Methods

fold :: Monoid m => DocG m -> m #

foldMap :: Monoid m => (a -> m) -> DocG a -> m #

foldMap' :: Monoid m => (a -> m) -> DocG a -> m #

foldr :: (a -> b -> b) -> b -> DocG a -> b #

foldr' :: (a -> b -> b) -> b -> DocG a -> b #

foldl :: (b -> a -> b) -> b -> DocG a -> b #

foldl' :: (b -> a -> b) -> b -> DocG a -> b #

foldr1 :: (a -> a -> a) -> DocG a -> a #

foldl1 :: (a -> a -> a) -> DocG a -> a #

toList :: DocG a -> [a] #

null :: DocG a -> Bool #

length :: DocG a -> Int #

elem :: Eq a => a -> DocG a -> Bool #

maximum :: Ord a => DocG a -> a #

minimum :: Ord a => DocG a -> a #

sum :: Num a => DocG a -> a #

product :: Num a => DocG a -> a #

Traversable DocG Source # 
Instance details

Defined in Unison.Server.Doc

Methods

traverse :: Applicative f => (a -> f b) -> DocG a -> f (DocG b) #

sequenceA :: Applicative f => DocG (f a) -> f (DocG a) #

mapM :: Monad m => (a -> m b) -> DocG a -> m (DocG b) #

sequence :: Monad m => DocG (m a) -> m (DocG a) #

Functor DocG Source # 
Instance details

Defined in Unison.Server.Doc

Methods

fmap :: (a -> b) -> DocG a -> DocG b #

(<$) :: a -> DocG b -> DocG a #

ToJSON specialForm => ToJSON (DocG specialForm) Source # 
Instance details

Defined in Unison.Server.Doc

Methods

toJSON :: DocG specialForm -> Value #

toEncoding :: DocG specialForm -> Encoding #

toJSONList :: [DocG specialForm] -> Value #

toEncodingList :: [DocG specialForm] -> Encoding #

Generic (DocG specialForm) Source # 
Instance details

Defined in Unison.Server.Doc

Associated Types

type Rep (DocG specialForm) :: Type -> Type #

Methods

from :: DocG specialForm -> Rep (DocG specialForm) x #

to :: Rep (DocG specialForm) x -> DocG specialForm #

Show specialForm => Show (DocG specialForm) Source # 
Instance details

Defined in Unison.Server.Doc

Methods

showsPrec :: Int -> DocG specialForm -> ShowS #

show :: DocG specialForm -> String #

showList :: [DocG specialForm] -> ShowS #

Eq specialForm => Eq (DocG specialForm) Source # 
Instance details

Defined in Unison.Server.Doc

Methods

(==) :: DocG specialForm -> DocG specialForm -> Bool #

(/=) :: DocG specialForm -> DocG specialForm -> Bool #

ToSchema specialForm => ToSchema (DocG specialForm) Source # 
Instance details

Defined in Unison.Server.Doc

type Rep (DocG specialForm) Source # 
Instance details

Defined in Unison.Server.Doc

type Rep (DocG specialForm) = D1 ('MetaData "DocG" "Unison.Server.Doc" "unison-share-api-0.0.0-7lCnmLo0h1RCAMi07EAZKZ" 'False) ((((C1 ('MetaCons "Word" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: (C1 ('MetaCons "Code" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DocG specialForm))) :+: C1 ('MetaCons "CodeBlock" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DocG specialForm))))) :+: ((C1 ('MetaCons "Bold" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DocG specialForm))) :+: C1 ('MetaCons "Italic" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DocG specialForm)))) :+: (C1 ('MetaCons "Strikethrough" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DocG specialForm))) :+: C1 ('MetaCons "Style" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DocG specialForm)))))) :+: ((C1 ('MetaCons "Anchor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DocG specialForm))) :+: (C1 ('MetaCons "Blockquote" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DocG specialForm))) :+: C1 ('MetaCons "Blankline" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Linebreak" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SectionBreak" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Tooltip" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DocG specialForm)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DocG specialForm))) :+: C1 ('MetaCons "Aside" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DocG specialForm))))))) :+: (((C1 ('MetaCons "Callout" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (DocG specialForm))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DocG specialForm))) :+: (C1 ('MetaCons "Table" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [[DocG specialForm]])) :+: C1 ('MetaCons "Folded" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DocG specialForm)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DocG specialForm)))))) :+: ((C1 ('MetaCons "Paragraph" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DocG specialForm])) :+: C1 ('MetaCons "BulletedList" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DocG specialForm]))) :+: (C1 ('MetaCons "NumberedList" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Nat) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DocG specialForm])) :+: C1 ('MetaCons "Section" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DocG specialForm)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DocG specialForm]))))) :+: ((C1 ('MetaCons "NamedLink" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DocG specialForm)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DocG specialForm))) :+: (C1 ('MetaCons "Image" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DocG specialForm)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DocG specialForm)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (DocG specialForm))))) :+: C1 ('MetaCons "Special" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 specialForm)))) :+: ((C1 ('MetaCons "Join" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DocG specialForm])) :+: C1 ('MetaCons "UntitledSection" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DocG specialForm]))) :+: (C1 ('MetaCons "Column" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DocG specialForm])) :+: C1 ('MetaCons "Group" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DocG specialForm))))))))

data Ref a Source #

Constructors

Term a 
Type a 

Instances

Instances details
Foldable Ref Source # 
Instance details

Defined in Unison.Server.Doc

Methods

fold :: Monoid m => Ref m -> m #

foldMap :: Monoid m => (a -> m) -> Ref a -> m #

foldMap' :: Monoid m => (a -> m) -> Ref a -> m #

foldr :: (a -> b -> b) -> b -> Ref a -> b #

foldr' :: (a -> b -> b) -> b -> Ref a -> b #

foldl :: (b -> a -> b) -> b -> Ref a -> b #

foldl' :: (b -> a -> b) -> b -> Ref a -> b #

foldr1 :: (a -> a -> a) -> Ref a -> a #

foldl1 :: (a -> a -> a) -> Ref a -> a #

toList :: Ref a -> [a] #

null :: Ref a -> Bool #

length :: Ref a -> Int #

elem :: Eq a => a -> Ref a -> Bool #

maximum :: Ord a => Ref a -> a #

minimum :: Ord a => Ref a -> a #

sum :: Num a => Ref a -> a #

product :: Num a => Ref a -> a #

Traversable Ref Source # 
Instance details

Defined in Unison.Server.Doc

Methods

traverse :: Applicative f => (a -> f b) -> Ref a -> f (Ref b) #

sequenceA :: Applicative f => Ref (f a) -> f (Ref a) #

mapM :: Monad m => (a -> m b) -> Ref a -> m (Ref b) #

sequence :: Monad m => Ref (m a) -> m (Ref a) #

Functor Ref Source # 
Instance details

Defined in Unison.Server.Doc

Methods

fmap :: (a -> b) -> Ref a -> Ref b #

(<$) :: a -> Ref b -> Ref a #

ToJSON a => ToJSON (Ref a) Source # 
Instance details

Defined in Unison.Server.Doc

Methods

toJSON :: Ref a -> Value #

toEncoding :: Ref a -> Encoding #

toJSONList :: [Ref a] -> Value #

toEncodingList :: [Ref a] -> Encoding #

Generic (Ref a) Source # 
Instance details

Defined in Unison.Server.Doc

Associated Types

type Rep (Ref a) :: Type -> Type #

Methods

from :: Ref a -> Rep (Ref a) x #

to :: Rep (Ref a) x -> Ref a #

Show a => Show (Ref a) Source # 
Instance details

Defined in Unison.Server.Doc

Methods

showsPrec :: Int -> Ref a -> ShowS #

show :: Ref a -> String #

showList :: [Ref a] -> ShowS #

Eq a => Eq (Ref a) Source # 
Instance details

Defined in Unison.Server.Doc

Methods

(==) :: Ref a -> Ref a -> Bool #

(/=) :: Ref a -> Ref a -> Bool #

ToSchema a => ToSchema (Ref a) Source # 
Instance details

Defined in Unison.Server.Doc

type Rep (Ref a) Source # 
Instance details

Defined in Unison.Server.Doc

type Rep (Ref a) = D1 ('MetaData "Ref" "Unison.Server.Doc" "unison-share-api-0.0.0-7lCnmLo0h1RCAMi07EAZKZ" 'False) (C1 ('MetaCons "Term" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "Type" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

data MediaSource Source #

Instances

Instances details
ToJSON MediaSource Source # 
Instance details

Defined in Unison.Server.Doc

Generic MediaSource Source # 
Instance details

Defined in Unison.Server.Doc

Associated Types

type Rep MediaSource :: Type -> Type #

Show MediaSource Source # 
Instance details

Defined in Unison.Server.Doc

Eq MediaSource Source # 
Instance details

Defined in Unison.Server.Doc

ToSchema MediaSource Source # 
Instance details

Defined in Unison.Server.Doc

type Rep MediaSource Source # 
Instance details

Defined in Unison.Server.Doc

type Rep MediaSource = D1 ('MetaData "MediaSource" "Unison.Server.Doc" "unison-share-api-0.0.0-7lCnmLo0h1RCAMi07EAZKZ" 'False) (C1 ('MetaCons "MediaSource" 'PrefixI 'True) (S1 ('MetaSel ('Just "mediaSourceUrl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "mediaSourceMimeType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))))

data RenderedSpecialForm Source #

Instances

Instances details
ToJSON RenderedSpecialForm Source # 
Instance details

Defined in Unison.Server.Doc

Generic RenderedSpecialForm Source # 
Instance details

Defined in Unison.Server.Doc

Associated Types

type Rep RenderedSpecialForm :: Type -> Type #

Show RenderedSpecialForm Source # 
Instance details

Defined in Unison.Server.Doc

Eq RenderedSpecialForm Source # 
Instance details

Defined in Unison.Server.Doc

ToSchema RenderedSpecialForm Source # 
Instance details

Defined in Unison.Server.Doc

type Rep RenderedSpecialForm Source # 
Instance details

Defined in Unison.Server.Doc

type Rep RenderedSpecialForm = D1 ('MetaData "RenderedSpecialForm" "Unison.Server.Doc" "unison-share-api-0.0.0-7lCnmLo0h1RCAMi07EAZKZ" 'False) ((((C1 ('MetaCons "Source" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SrcRefs])) :+: C1 ('MetaCons "FoldedSource" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SrcRefs]))) :+: (C1 ('MetaCons "Example" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SyntaxText)) :+: C1 ('MetaCons "ExampleBlock" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SyntaxText)))) :+: ((C1 ('MetaCons "Link" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SyntaxText)) :+: C1 ('MetaCons "Signature" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SyntaxText]))) :+: (C1 ('MetaCons "SignatureInline" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SyntaxText)) :+: C1 ('MetaCons "Eval" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SyntaxText) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SyntaxText))))) :+: (((C1 ('MetaCons "EvalInline" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SyntaxText) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SyntaxText)) :+: C1 ('MetaCons "Embed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SyntaxText))) :+: (C1 ('MetaCons "EmbedInline" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SyntaxText)) :+: C1 ('MetaCons "Video" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [MediaSource]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Text))))) :+: ((C1 ('MetaCons "FrontMatter" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text [Text]))) :+: C1 ('MetaCons "LaTeXInline" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :+: (C1 ('MetaCons "Svg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "RenderError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RenderError SyntaxText)))))))

data EvaluatedSpecialForm v Source #

Instances

Instances details
Generic (EvaluatedSpecialForm v) Source # 
Instance details

Defined in Unison.Server.Doc

Associated Types

type Rep (EvaluatedSpecialForm v) :: Type -> Type #

Show v => Show (EvaluatedSpecialForm v) Source # 
Instance details

Defined in Unison.Server.Doc

Var v => Eq (EvaluatedSpecialForm v) Source # 
Instance details

Defined in Unison.Server.Doc

type Rep (EvaluatedSpecialForm v) Source # 
Instance details

Defined in Unison.Server.Doc

type Rep (EvaluatedSpecialForm v) = D1 ('MetaData "EvaluatedSpecialForm" "Unison.Server.Doc" "unison-share-api-0.0.0-7lCnmLo0h1RCAMi07EAZKZ" 'False) ((((C1 ('MetaCons "ESource" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [EvaluatedSrc v])) :+: C1 ('MetaCons "EFoldedSource" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [EvaluatedSrc v]))) :+: (C1 ('MetaCons "EExample" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term v ()))) :+: C1 ('MetaCons "EExampleBlock" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term v ()))))) :+: ((C1 ('MetaCons "ELink" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either (Term v ()) LabeledDependency))) :+: C1 ('MetaCons "ESignature" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Referent, Type v ())]))) :+: (C1 ('MetaCons "ESignatureInline" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Referent, Type v ()))) :+: C1 ('MetaCons "EEval" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term v ())) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Term v ()))))))) :+: (((C1 ('MetaCons "EEvalInline" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term v ())) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Term v ())))) :+: C1 ('MetaCons "EEmbed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term v ())))) :+: (C1 ('MetaCons "EEmbedInline" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term v ()))) :+: C1 ('MetaCons "EVideo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [MediaSource]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Text))))) :+: ((C1 ('MetaCons "EFrontMatter" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text [Text]))) :+: C1 ('MetaCons "ELaTeXInline" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :+: (C1 ('MetaCons "ESvg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "ERenderError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RenderError (Term v ()))))))))

data Src Source #

Constructors

Src SyntaxText SyntaxText 

Instances

Instances details
ToJSON Src Source # 
Instance details

Defined in Unison.Server.Doc

Generic Src Source # 
Instance details

Defined in Unison.Server.Doc

Associated Types

type Rep Src :: Type -> Type #

Methods

from :: Src -> Rep Src x #

to :: Rep Src x -> Src #

Show Src Source # 
Instance details

Defined in Unison.Server.Doc

Methods

showsPrec :: Int -> Src -> ShowS #

show :: Src -> String #

showList :: [Src] -> ShowS #

Eq Src Source # 
Instance details

Defined in Unison.Server.Doc

Methods

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

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

ToSchema Src Source # 
Instance details

Defined in Unison.Server.Doc

type Rep Src Source # 
Instance details

Defined in Unison.Server.Doc

type Rep Src = D1 ('MetaData "Src" "Unison.Server.Doc" "unison-share-api-0.0.0-7lCnmLo0h1RCAMi07EAZKZ" 'False) (C1 ('MetaCons "Src" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SyntaxText) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SyntaxText)))

evalAndRenderDoc :: forall v m. (Var v, Monad m) => PrettyPrintEnvDecl -> (Reference -> m (Maybe (Term v ()))) -> (Referent -> m (Maybe (Type v ()))) -> (Term v () -> m (Maybe (Term v ()))) -> (Reference -> m (Maybe (Decl v ()))) -> Term v () -> m Doc Source #

Evaluate the doc, then render it.

renderDoc :: forall v. Var v => PrettyPrintEnvDecl -> EvaluatedDoc v -> Doc Source #

Renders the given doc, which must have been evaluated using evalDoc

evalDoc :: forall v m. (Var v, Monad m) => (Reference -> m (Maybe (Term v ()))) -> (Referent -> m (Maybe (Type v ()))) -> (Term v () -> m (Maybe (Term v ()))) -> (Reference -> m (Maybe (Decl v ()))) -> Term v () -> m (EvaluatedDoc v) Source #

Evaluates the given doc, expanding transclusions, expressions, etc.

data RenderError trm Source #

Constructors

InvalidTerm trm 

Instances

Instances details
ToJSON trm => ToJSON (RenderError trm) Source # 
Instance details

Defined in Unison.Server.Doc

Generic (RenderError trm) Source # 
Instance details

Defined in Unison.Server.Doc

Associated Types

type Rep (RenderError trm) :: Type -> Type #

Methods

from :: RenderError trm -> Rep (RenderError trm) x #

to :: Rep (RenderError trm) x -> RenderError trm #

Show trm => Show (RenderError trm) Source # 
Instance details

Defined in Unison.Server.Doc

Methods

showsPrec :: Int -> RenderError trm -> ShowS #

show :: RenderError trm -> String #

showList :: [RenderError trm] -> ShowS #

Eq trm => Eq (RenderError trm) Source # 
Instance details

Defined in Unison.Server.Doc

Methods

(==) :: RenderError trm -> RenderError trm -> Bool #

(/=) :: RenderError trm -> RenderError trm -> Bool #

ToSchema trm => ToSchema (RenderError trm) Source # 
Instance details

Defined in Unison.Server.Doc

type Rep (RenderError trm) Source # 
Instance details

Defined in Unison.Server.Doc

type Rep (RenderError trm) = D1 ('MetaData "RenderError" "Unison.Server.Doc" "unison-share-api-0.0.0-7lCnmLo0h1RCAMi07EAZKZ" 'False) (C1 ('MetaCons "InvalidTerm" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 trm)))

data EvaluatedSrc v Source #

Instances

Instances details
Generic (EvaluatedSrc v) Source # 
Instance details

Defined in Unison.Server.Doc

Associated Types

type Rep (EvaluatedSrc v) :: Type -> Type #

Methods

from :: EvaluatedSrc v -> Rep (EvaluatedSrc v) x #

to :: Rep (EvaluatedSrc v) x -> EvaluatedSrc v #

Show v => Show (EvaluatedSrc v) Source # 
Instance details

Defined in Unison.Server.Doc

Var v => Eq (EvaluatedSrc v) Source # 
Instance details

Defined in Unison.Server.Doc

type Rep (EvaluatedSrc v) Source # 
Instance details

Defined in Unison.Server.Doc

type Rep (EvaluatedSrc v) = D1 ('MetaData "EvaluatedSrc" "Unison.Server.Doc" "unison-share-api-0.0.0-7lCnmLo0h1RCAMi07EAZKZ" 'False) (C1 ('MetaCons "EvaluatedSrcDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (EvaluatedDecl v))) :+: C1 ('MetaCons "EvaluatedSrcTerm" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (EvaluatedTerm v))))

data EvaluatedDecl v Source #

Instances

Instances details
Generic (EvaluatedDecl v) Source # 
Instance details

Defined in Unison.Server.Doc

Associated Types

type Rep (EvaluatedDecl v) :: Type -> Type #

Show v => Show (EvaluatedDecl v) Source # 
Instance details

Defined in Unison.Server.Doc

Var v => Eq (EvaluatedDecl v) Source # 
Instance details

Defined in Unison.Server.Doc

type Rep (EvaluatedDecl v) Source # 
Instance details

Defined in Unison.Server.Doc

data EvaluatedTerm v Source #

Instances

Instances details
Generic (EvaluatedTerm v) Source # 
Instance details

Defined in Unison.Server.Doc

Associated Types

type Rep (EvaluatedTerm v) :: Type -> Type #

Show v => Show (EvaluatedTerm v) Source # 
Instance details

Defined in Unison.Server.Doc

Var v => Eq (EvaluatedTerm v) Source # 
Instance details

Defined in Unison.Server.Doc

type Rep (EvaluatedTerm v) Source # 
Instance details

Defined in Unison.Server.Doc

dependenciesSpecial :: forall v. Ord v => EvaluatedSpecialForm v -> Set LabeledDependency Source #

Determines all dependencies of a special form