Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- doc :: DocItem di => di -> s :-> s
- docGroup :: DocGrouping -> (inp :-> out) -> inp :-> out
- buildLorentzDoc :: (inp :-> out) -> ContractDoc
- renderLorentzDoc :: (inp :-> out) -> LText
- contractName :: Text -> (inp :-> out) -> inp :-> out
- cutLorentzNonDoc :: (inp :-> out) -> s :-> s
- type Markdown = Builder
- class (Typeable d, DOrd d, KnownNat (DocItemPosition d)) => DocItem d where
- type DocItemPosition d = (pos :: Nat) | pos -> d
- type DocItemPlacement d :: DocItemPlacementKind
- docItemSectionName :: Maybe Text
- docItemSectionDescription :: Maybe Markdown
- docItemSectionNameStyle :: DocSectionNameStyle
- docItemRef :: d -> DocItemRef (DocItemPlacement d)
- docItemToMarkdown :: HeaderLevel -> d -> Markdown
- docItemDependencies :: d -> [SomeDocDefinitionItem]
- docItemsOrder :: [d] -> [d]
- docItemPosition :: forall d. DocItem d => DocItemPos
- newtype DocItemId = DocItemId Text
- data DocItemPlacementKind
- data DocItemRef (p :: DocItemPlacementKind) where
- data DocSectionNameStyle
- data SomeDocItem where
- SomeDocItem :: DocItem d => d -> SomeDocItem
- data SomeDocDefinitionItem where
- SomeDocDefinitionItem :: (DocItem d, DocItemPlacement d ~ DocItemInDefinitions) => d -> SomeDocDefinitionItem
- newtype SubDoc = SubDoc DocBlock
- type DocGrouping = SubDoc -> SomeDocItem
- data ContractDoc = ContractDoc {}
- data DDescription = DDescription Markdown
- data DGitRevision
- = DGitRevisionKnown DGitRevisionInfo
- | DGitRevisionUnknown
- newtype GitRepoSettings = GitRepoSettings {
- grsMkGitRevision :: Text -> Text
- mkDGitRevision :: ExpQ
- morleyRepoSettings :: GitRepoSettings
- data DComment = DComment Text
- data DType where
- DType :: TypeHasDoc a => Proxy a -> DType
- docDefinitionRef :: (DocItem d, DocItemPlacement d ~ DocItemInDefinitions) => Markdown -> d -> Markdown
- contractDocToMarkdown :: ContractDoc -> LText
- subDocToMarkdown :: HeaderLevel -> SubDoc -> Markdown
- class Typeable a => TypeHasDoc a where
- typeDocName :: Proxy a -> Text
- typeDocMdDescription :: Markdown
- typeDocMdReference :: Proxy a -> WithinParens -> Markdown
- typeDocDependencies :: Proxy a -> [SomeTypeWithDoc]
- typeDocHaskellRep :: TypeDocHaskellRep a
- typeDocMichelsonRep :: TypeDocMichelsonRep a
- data SomeTypeWithDoc where
- SomeTypeWithDoc :: TypeHasDoc td => Proxy td -> SomeTypeWithDoc
- class HaveCommonTypeCtor a b
- class IsHomomorphic a
- genericTypeDocDependencies :: forall a. (Generic a, GTypeHasDoc (Rep a)) => Proxy a -> [SomeTypeWithDoc]
- customTypeDocMdReference :: (Text, DType) -> [DType] -> WithinParens -> Markdown
- homomorphicTypeDocMdReference :: forall (t :: Type). (Typeable t, TypeHasDoc t, IsHomomorphic t) => Proxy t -> WithinParens -> Markdown
- poly1TypeDocMdReference :: forall t (r :: Type) (a :: Type). (r ~ t a, Typeable t, Each '[TypeHasDoc] [r, a], IsHomomorphic t) => Proxy r -> WithinParens -> Markdown
- poly2TypeDocMdReference :: forall t (r :: Type) (a :: Type) (b :: Type). (r ~ t a b, Typeable t, Each '[TypeHasDoc] [r, a, b], IsHomomorphic t) => Proxy r -> WithinParens -> Markdown
- homomorphicTypeDocHaskellRep :: forall a. (Generic a, GTypeHasDoc (Rep a)) => TypeDocHaskellRep a
- concreteTypeDocHaskellRep :: forall a b. (Typeable a, GenericIsoValue a, GTypeHasDoc (Rep a), HaveCommonTypeCtor b a) => TypeDocHaskellRep b
- concreteTypeDocHaskellRepUnsafe :: forall a b. (Typeable a, GenericIsoValue a, GTypeHasDoc (Rep a)) => TypeDocHaskellRep b
- haskellRepNoFields :: TypeDocHaskellRep a -> TypeDocHaskellRep a
- haskellRepStripFieldPrefix :: HasCallStack => TypeDocHaskellRep a -> TypeDocHaskellRep a
- homomorphicTypeDocMichelsonRep :: forall a. SingI (ToT a) => TypeDocMichelsonRep a
- concreteTypeDocMichelsonRep :: forall a b. (Typeable a, SingI (ToT a), HaveCommonTypeCtor b a) => TypeDocMichelsonRep b
- concreteTypeDocMichelsonRepUnsafe :: forall a b. (Typeable a, SingI (ToT a)) => TypeDocMichelsonRep b
Documentation
docGroup :: DocGrouping -> (inp :-> out) -> inp :-> out Source #
Group documentation built in the given piece of code into block dedicated to one thing, e.g. to one entrypoint.
buildLorentzDoc :: (inp :-> out) -> ContractDoc Source #
renderLorentzDoc :: (inp :-> out) -> LText Source #
contractName :: Text -> (inp :-> out) -> inp :-> out Source #
Give a name to given contract. Apply it to the whole contract code.
cutLorentzNonDoc :: (inp :-> out) -> s :-> s Source #
Leave only instructions related to documentation.
This function is useful when your method executes a lambda coming from outside, but you know its properties and want to propagate its documentation to your contract code.
Re-exports
type Markdown = Builder Source #
A piece of markdown document.
This is opposed to Text
type, which in turn is not supposed to contain
markup elements.
class (Typeable d, DOrd d, KnownNat (DocItemPosition d)) => DocItem d where Source #
A piece of documentation describing one property of a thing, be it a name or description of a contract, or an error throwable by given endpoint.
Items of the same type appear close to each other in a rendered documentation and form a section.
Doc items are later injected into a contract code via a dedicated nop-like instruction. Normally doc items which belong to one section appear in resulting doc in the same order in which they appeared in the contract.
While documentation framework grows, this typeclass acquires more and more methods for fine tuning of existing rendering logic because we don't want to break backward compatibility, hope one day we will make everything concise :( E.g. all rendering and reording stuff could be merged in one method, and we could have several template implementations for it which would allow user to specify only stuff relevant to his case.
type DocItemPosition d = (pos :: Nat) | pos -> d Source #
Position of this item in the resulting documentation; the smaller the value, the higher the section with this element will be placed.
Documentation structure is not necessarily flat. If some doc item consolidates a whole documentation block within it, this block will have its own placement of items independent from outer parts of the doc.
type DocItemPlacement d :: DocItemPlacementKind Source #
Defines where given doc item should be put. There are two options: 1. Inline right here (default behaviour); 2. Put into definitions section.
Note that we require all doc items with "in definitions" placement to
have Eq
and Ord
instances which comply the following law:
if two documentation items describe the same entity or property, they
should be considered equal.
docItemSectionName :: Maybe Text Source #
When multiple items of the same type belong to one section, how this section will be called.
If not provided, section will contain just untitled content.
docItemSectionDescription :: Maybe Markdown Source #
Description of a section.
Can be used to mention some common things about all elements of this section. Markdown syntax is permitted here.
docItemSectionNameStyle :: DocSectionNameStyle Source #
How to render section name.
Takes effect only if section name is set.
docItemRef :: d -> DocItemRef (DocItemPlacement d) Source #
Defines a function which constructs an unique identifier of given doc item, if it has been decided to put the doc item into definitions section.
Identifier should be unique both among doc items of the same type and items of other types. Thus, consider using "typeId-contentId" pattern.
docItemRef :: DocItemPlacement d ~ DocItemInlined => d -> DocItemRef (DocItemPlacement d) Source #
Defines a function which constructs an unique identifier of given doc item, if it has been decided to put the doc item into definitions section.
Identifier should be unique both among doc items of the same type and items of other types. Thus, consider using "typeId-contentId" pattern.
docItemToMarkdown :: HeaderLevel -> d -> Markdown Source #
Render given doc item to Markdown, preferably one line, optionally with header.
Accepts the smallest allowed level of header. (Using smaller value than provided one will interfere with existing headers thus delivering mess).
docItemDependencies :: d -> [SomeDocDefinitionItem] Source #
All doc items which this doc item refers to.
They will automatically be put to definitions as soon as given doc item is detected.
docItemsOrder :: [d] -> [d] Source #
This function accepts doc items put under the same section in the order in which they appeared in the contract and returns their new desired order. It's also fine to use this function for filtering or merging doc items.
Default implementation * leaves inlined items as is; * for items put to definitions, lexicographically sorts them by their id.
Instances
docItemPosition :: forall d. DocItem d => DocItemPos Source #
Get doc item position at term-level.
Some unique identifier of a doc item.
All doc items which should be refer-able need to have this identifier.
data DocItemPlacementKind Source #
Where do we place given doc item.
DocItemInlined | Placed in the document content itself. |
DocItemInDefinitions | Placed in dedicated definitions section; can later be referenced. |
data DocItemRef (p :: DocItemPlacementKind) where Source #
Defines an identifier which given doc item can be referenced with.
data DocSectionNameStyle Source #
How to render section name.
DocSectionNameBig | Suitable for block name. |
DocSectionNameSmall | Suitable for subsection title within block. |
data SomeDocItem where Source #
Hides some documentation item.
SomeDocItem :: DocItem d => d -> SomeDocItem |
Instances
Show SomeDocItem Source # | To automatically derive |
Defined in Michelson.Doc showsPrec :: Int -> SomeDocItem -> ShowS # show :: SomeDocItem -> String # showList :: [SomeDocItem] -> ShowS # | |
Show DocGrouping Source # | |
Defined in Michelson.Doc showsPrec :: Int -> DocGrouping -> ShowS # show :: DocGrouping -> String # showList :: [DocGrouping] -> ShowS # |
data SomeDocDefinitionItem where Source #
Hides some documentation item which is put to "definitions" section.
SomeDocDefinitionItem :: (DocItem d, DocItemPlacement d ~ DocItemInDefinitions) => d -> SomeDocDefinitionItem |
Instances
Eq SomeDocDefinitionItem Source # | |
Defined in Michelson.Doc (==) :: SomeDocDefinitionItem -> SomeDocDefinitionItem -> Bool # (/=) :: SomeDocDefinitionItem -> SomeDocDefinitionItem -> Bool # | |
Ord SomeDocDefinitionItem Source # | |
Defined in Michelson.Doc compare :: SomeDocDefinitionItem -> SomeDocDefinitionItem -> Ordering # (<) :: SomeDocDefinitionItem -> SomeDocDefinitionItem -> Bool # (<=) :: SomeDocDefinitionItem -> SomeDocDefinitionItem -> Bool # (>) :: SomeDocDefinitionItem -> SomeDocDefinitionItem -> Bool # (>=) :: SomeDocDefinitionItem -> SomeDocDefinitionItem -> Bool # max :: SomeDocDefinitionItem -> SomeDocDefinitionItem -> SomeDocDefinitionItem # min :: SomeDocDefinitionItem -> SomeDocDefinitionItem -> SomeDocDefinitionItem # |
A part of documentation to be grouped. Essentially incapsulates DocBlock
.
Instances
Show DocGrouping Source # | |
Defined in Michelson.Doc showsPrec :: Int -> DocGrouping -> ShowS # show :: DocGrouping -> String # showList :: [DocGrouping] -> ShowS # |
type DocGrouping = SubDoc -> SomeDocItem Source #
A function which groups a piece of doc under one doc item.
data ContractDoc Source #
Keeps documentation gathered for some piece of contract code.
Used for building documentation of a contract.
ContractDoc | |
|
Instances
Semigroup ContractDoc Source # | Contract documentation assembly primarily relies on this instance. |
Defined in Michelson.Doc (<>) :: ContractDoc -> ContractDoc -> ContractDoc # sconcat :: NonEmpty ContractDoc -> ContractDoc # stimes :: Integral b => b -> ContractDoc -> ContractDoc # | |
Monoid ContractDoc Source # | |
Defined in Michelson.Doc mempty :: ContractDoc # mappend :: ContractDoc -> ContractDoc -> ContractDoc # mconcat :: [ContractDoc] -> ContractDoc # |
data DDescription Source #
Description of something.
Instances
DocItem DDescription Source # | |
Defined in Michelson.Doc type DocItemPosition DDescription = (pos :: Nat) Source # type DocItemPlacement DDescription :: DocItemPlacementKind Source # docItemSectionName :: Maybe Text Source # docItemSectionDescription :: Maybe Markdown Source # docItemSectionNameStyle :: DocSectionNameStyle Source # docItemRef :: DDescription -> DocItemRef (DocItemPlacement DDescription) Source # docItemToMarkdown :: HeaderLevel -> DDescription -> Markdown Source # docItemDependencies :: DDescription -> [SomeDocDefinitionItem] Source # docItemsOrder :: [DDescription] -> [DDescription] Source # | |
type DocItemPosition DDescription Source # | |
Defined in Michelson.Doc | |
type DocItemPlacement DDescription Source # | |
Defined in Michelson.Doc |
data DGitRevision Source #
DGitRevisionKnown DGitRevisionInfo | |
DGitRevisionUnknown |
Instances
DocItem DGitRevision Source # | |
Defined in Michelson.Doc type DocItemPosition DGitRevision = (pos :: Nat) Source # type DocItemPlacement DGitRevision :: DocItemPlacementKind Source # docItemSectionName :: Maybe Text Source # docItemSectionDescription :: Maybe Markdown Source # docItemSectionNameStyle :: DocSectionNameStyle Source # docItemRef :: DGitRevision -> DocItemRef (DocItemPlacement DGitRevision) Source # docItemToMarkdown :: HeaderLevel -> DGitRevision -> Markdown Source # docItemDependencies :: DGitRevision -> [SomeDocDefinitionItem] Source # docItemsOrder :: [DGitRevision] -> [DGitRevision] Source # | |
type DocItemPosition DGitRevision Source # | |
Defined in Michelson.Doc | |
type DocItemPlacement DGitRevision Source # | |
Defined in Michelson.Doc |
newtype GitRepoSettings Source #
Repository settings for DGitRevision
.
GitRepoSettings | |
|
mkDGitRevision :: ExpQ Source #
Make DGitRevision
.
>>>
:t $mkDGitRevision
GitRepoSettings -> DGitRevision
Instances
DocItem DComment Source # | |
Defined in Michelson.Doc type DocItemPosition DComment = (pos :: Nat) Source # type DocItemPlacement DComment :: DocItemPlacementKind Source # docItemSectionName :: Maybe Text Source # docItemSectionDescription :: Maybe Markdown Source # docItemSectionNameStyle :: DocSectionNameStyle Source # docItemRef :: DComment -> DocItemRef (DocItemPlacement DComment) Source # docItemToMarkdown :: HeaderLevel -> DComment -> Markdown Source # docItemDependencies :: DComment -> [SomeDocDefinitionItem] Source # docItemsOrder :: [DComment] -> [DComment] Source # | |
type DocItemPosition DComment Source # | |
Defined in Michelson.Doc | |
type DocItemPlacement DComment Source # | |
Defined in Michelson.Doc |
Doc element with description of a type.
DType :: TypeHasDoc a => Proxy a -> DType |
Instances
Eq DType Source # | |
Ord DType Source # | |
Show DType Source # | |
DocItem DType Source # | |
Defined in Michelson.Typed.Haskell.Doc type DocItemPosition DType = (pos :: Nat) Source # type DocItemPlacement DType :: DocItemPlacementKind Source # docItemSectionName :: Maybe Text Source # docItemSectionDescription :: Maybe Markdown Source # docItemSectionNameStyle :: DocSectionNameStyle Source # docItemRef :: DType -> DocItemRef (DocItemPlacement DType) Source # docItemToMarkdown :: HeaderLevel -> DType -> Markdown Source # docItemDependencies :: DType -> [SomeDocDefinitionItem] Source # docItemsOrder :: [DType] -> [DType] Source # | |
type DocItemPosition DType Source # | |
Defined in Michelson.Typed.Haskell.Doc | |
type DocItemPlacement DType Source # | |
Defined in Michelson.Typed.Haskell.Doc |
docDefinitionRef :: (DocItem d, DocItemPlacement d ~ DocItemInDefinitions) => Markdown -> d -> Markdown Source #
Make a reference to doc item in definitions.
contractDocToMarkdown :: ContractDoc -> LText Source #
Render given contract documentation to markdown document.
subDocToMarkdown :: HeaderLevel -> SubDoc -> Markdown Source #
Render documentation for SubDoc
.
class Typeable a => TypeHasDoc a where Source #
Description for a Haskell type appearing in documentation.
typeDocName :: Proxy a -> Text Source #
Name of type as it appears in definitions section.
Each type must have its own unique name because it will be used in identifier for references.
Default definition derives name from Generics.
If it does not fit, consider defining this function manually.
(We tried using Data
for this, but it produces names including
module names which is not do we want).
typeDocName :: (Generic a, KnownSymbol (GenericTypeName a)) => Proxy a -> Text Source #
Name of type as it appears in definitions section.
Each type must have its own unique name because it will be used in identifier for references.
Default definition derives name from Generics.
If it does not fit, consider defining this function manually.
(We tried using Data
for this, but it produces names including
module names which is not do we want).
typeDocMdDescription :: Markdown Source #
Explanation of a type. Markdown formatting is allowed.
typeDocMdReference :: Proxy a -> WithinParens -> Markdown Source #
How reference to this type is rendered, in Markdown.
Examples:
* Integer
,
* Maybe ()
.
Consider using one of the following functions as default implementation;
which one to use depends on number of type arguments in your type:
* homomorphicTypeDocMdReference
* poly1TypeDocMdReference
* poly2TypeDocMdReference
If none of them fits your purposes precisely, consider using
customTypeDocMdReference
.
typeDocMdReference :: (Typeable a, IsHomomorphic a) => Proxy a -> WithinParens -> Markdown Source #
How reference to this type is rendered, in Markdown.
Examples:
* Integer
,
* Maybe ()
.
Consider using one of the following functions as default implementation;
which one to use depends on number of type arguments in your type:
* homomorphicTypeDocMdReference
* poly1TypeDocMdReference
* poly2TypeDocMdReference
If none of them fits your purposes precisely, consider using
customTypeDocMdReference
.
typeDocDependencies :: Proxy a -> [SomeTypeWithDoc] Source #
All types which this type directly contains.
Used in automatic types discovery.
typeDocDependencies :: (Generic a, GTypeHasDoc (Rep a)) => Proxy a -> [SomeTypeWithDoc] Source #
All types which this type directly contains.
Used in automatic types discovery.
typeDocHaskellRep :: TypeDocHaskellRep a Source #
For complex types - their immediate Haskell representation.
For primitive types set this to Nothing
.
For homomorphic types use homomorphicTypeDocHaskellRep
implementation.
For polymorhpic types consider using concreteTypeDocHaskellRep
as implementation.
Modifier haskellRepNoFields
can be used to hide names of fields,
beneficial for newtypes.
Another modifier called haskellRepStripFieldPrefix
can be used for datatypes
to leave only meaningful part of name in every field.
typeDocHaskellRep :: (Generic a, GTypeHasDoc (Rep a), IsHomomorphic a) => TypeDocHaskellRep a Source #
For complex types - their immediate Haskell representation.
For primitive types set this to Nothing
.
For homomorphic types use homomorphicTypeDocHaskellRep
implementation.
For polymorhpic types consider using concreteTypeDocHaskellRep
as implementation.
Modifier haskellRepNoFields
can be used to hide names of fields,
beneficial for newtypes.
Another modifier called haskellRepStripFieldPrefix
can be used for datatypes
to leave only meaningful part of name in every field.
typeDocMichelsonRep :: TypeDocMichelsonRep a Source #
Final michelson representation of a type.
For homomorphic types use homomorphicTypeDocMichelsonRep
implementation.
For polymorhpic types consider using concreteTypeDocMichelsonRep
as implementation.
typeDocMichelsonRep :: (SingI (ToT a), IsHomomorphic a) => TypeDocMichelsonRep a Source #
Final michelson representation of a type.
For homomorphic types use homomorphicTypeDocMichelsonRep
implementation.
For polymorhpic types consider using concreteTypeDocMichelsonRep
as implementation.
Instances
data SomeTypeWithDoc where Source #
Data hides some type implementing TypeHasDoc
.
SomeTypeWithDoc :: TypeHasDoc td => Proxy td -> SomeTypeWithDoc |
class HaveCommonTypeCtor a b Source #
Require two types to be built from the same type constructor.
E.g. HaveCommonTypeCtor (Maybe Integer) (Maybe Natural)
is defined,
while HaveCmmonTypeCtor (Maybe Integer) [Integer]
is not.
Instances
HaveCommonTypeCtor (a :: k) (a :: k) Source # | |
Defined in Michelson.Typed.Haskell.Doc | |
HaveCommonTypeCtor ac bc => HaveCommonTypeCtor (ac a :: k4) (bc b :: k2) Source # | |
Defined in Michelson.Typed.Haskell.Doc |
class IsHomomorphic a Source #
Require this type to be homomorphic.
Instances
IsHomomorphic (a :: k) Source # | |
Defined in Michelson.Typed.Haskell.Doc | |
(TypeError (Text "Type is not homomorphic: " :<>: ShowType (a b)) :: Constraint) => IsHomomorphic (a b :: k2) Source # | |
Defined in Michelson.Typed.Haskell.Doc |
genericTypeDocDependencies :: forall a. (Generic a, GTypeHasDoc (Rep a)) => Proxy a -> [SomeTypeWithDoc] Source #
Implement typeDocDependencies
via getting all immediate fields
of a datatype.
Note: this will not include phantom types, I'm not sure yet how this scenario should be handled (@martoon).
customTypeDocMdReference :: (Text, DType) -> [DType] -> WithinParens -> Markdown Source #
Render a reference to a type which consists of type constructor (you have to provide name of this type constructor and documentation for the whole type) and zero or more type arguments.
homomorphicTypeDocMdReference :: forall (t :: Type). (Typeable t, TypeHasDoc t, IsHomomorphic t) => Proxy t -> WithinParens -> Markdown Source #
Derive typeDocMdReference
, for homomorphic types only.
poly1TypeDocMdReference :: forall t (r :: Type) (a :: Type). (r ~ t a, Typeable t, Each '[TypeHasDoc] [r, a], IsHomomorphic t) => Proxy r -> WithinParens -> Markdown Source #
Derive typeDocMdReference
, for polymorphic type with one
type argument, like Maybe Integer
.
poly2TypeDocMdReference :: forall t (r :: Type) (a :: Type) (b :: Type). (r ~ t a b, Typeable t, Each '[TypeHasDoc] [r, a, b], IsHomomorphic t) => Proxy r -> WithinParens -> Markdown Source #
Derive typeDocMdReference
, for polymorphic type with two
type arguments, like Lambda Integer Natural
.
homomorphicTypeDocHaskellRep :: forall a. (Generic a, GTypeHasDoc (Rep a)) => TypeDocHaskellRep a Source #
Implement typeDocHaskellRep
for a homomorphic type.
Note that it does not require your type to be of IsHomomorphic
instance,
which can be useful for some polymorhpic types which, for documentation
purposes, we want to consider homomorphic.
Example: Operation
is in fact polymorhpic, but we don't want this fact to
be reflected in the documentation.
concreteTypeDocHaskellRep :: forall a b. (Typeable a, GenericIsoValue a, GTypeHasDoc (Rep a), HaveCommonTypeCtor b a) => TypeDocHaskellRep b Source #
Implement typeDocHaskellRep
on example of given concrete type.
This is a best effort attempt to implement typeDocHaskellRep
for polymorhpic
types, as soon as there is no simple way to preserve type variables when
automatically deriving Haskell representation of a type.
concreteTypeDocHaskellRepUnsafe :: forall a b. (Typeable a, GenericIsoValue a, GTypeHasDoc (Rep a)) => TypeDocHaskellRep b Source #
Version of concreteTypeDocHaskellRep
which does not ensure
whether the type for which representation is built is any similar to
the original type which you implement a TypeHasDoc
instance for.
haskellRepNoFields :: TypeDocHaskellRep a -> TypeDocHaskellRep a Source #
Erase fields from Haskell datatype representation.
Use this when rendering fields names is undesired.
haskellRepStripFieldPrefix :: HasCallStack => TypeDocHaskellRep a -> TypeDocHaskellRep a Source #
Cut fields prefixes which we use according to the style guide.
E.g. cmMyField
field will be transformed to myField
.
homomorphicTypeDocMichelsonRep :: forall a. SingI (ToT a) => TypeDocMichelsonRep a Source #
Implement typeDocMichelsonRep
for homomorphic type.
concreteTypeDocMichelsonRep :: forall a b. (Typeable a, SingI (ToT a), HaveCommonTypeCtor b a) => TypeDocMichelsonRep b Source #
Implement typeDocMichelsonRep
on example of given concrete type.
This function exists for the same reason as concreteTypeDocHaskellRep
.
concreteTypeDocMichelsonRepUnsafe :: forall a b. (Typeable a, SingI (ToT a)) => TypeDocMichelsonRep b Source #
Version of concreteTypeDocHaskellRepUnsafe
which does not ensure
whether the type for which representation is built is any similar to
the original type which you implement a TypeHasDoc
instance for.
Orphan instances
Each ((Typeable :: [Type] -> Constraint) ': (ReifyList TypeHasDoc ': ([] :: [[Type] -> Constraint]))) (i ': (o ': ([] :: [[Type]]))) => TypeHasDoc (i :-> o) Source # | |
typeDocName :: Proxy (i :-> o) -> Text Source # typeDocMdDescription :: Markdown Source # typeDocMdReference :: Proxy (i :-> o) -> WithinParens -> Markdown Source # typeDocDependencies :: Proxy (i :-> o) -> [SomeTypeWithDoc] Source # typeDocHaskellRep :: TypeDocHaskellRep (i :-> o) Source # typeDocMichelsonRep :: TypeDocMichelsonRep (i :-> o) Source # |