Idris2Doc : Generics.Meta

Generics.Meta

(source)
Metadata about a data type's constructor and field names.

Since for the time being, record syntax is still under discussion,
records are not yet treated any differently from other
product types. This might well change in the future, once
the issues about record syntax are resolved.

Also, it seems not yet to be possible to get access to an
operator's fixity through elaborator reflection. We try to make
this information available as soon as possible.

Definitions

dataArgName : Type
  Name and integer index of constructor arguments

Totality: total
Visibility: public export
Constructors:
NamedArg : Nat->String->ArgName
  Name and index of a named argument
UnnamedArg : Nat->ArgName
  Index of an unnamed argument
getName : ArgName->MaybeString
  Tries to extract an argument's name.

Totality: total
Visibility: public export
recordConInfo_ : (k : Type) ->Listk->Type
  Namespace, name and arguments of a single data constructor

The arguments are wrapped in an n-ary product
parameterized by the constant functor, to make them
accessible to the SOP combinators.

Totality: total
Visibility: public export
Constructor: 
MkConInfo : ListString->String->NP_k (KArgName) ks->ConInfo_kks

Projections:
.args : ConInfo_kks->NP_k (KArgName) ks
  Constructor arguments
.conNS : ConInfo_kks->ListString
  Namespace of the constructor
.conName : ConInfo_kks->String
  Name of the constructor
.conNS : ConInfo_kks->ListString
  Namespace of the constructor

Totality: total
Visibility: public export
conNS : ConInfo_kks->ListString
  Namespace of the constructor

Totality: total
Visibility: public export
.conName : ConInfo_kks->String
  Name of the constructor

Totality: total
Visibility: public export
conName : ConInfo_kks->String
  Name of the constructor

Totality: total
Visibility: public export
.args : ConInfo_kks->NP_k (KArgName) ks
  Constructor arguments

Totality: total
Visibility: public export
args : ConInfo_kks->NP_k (KArgName) ks
  Constructor arguments

Totality: total
Visibility: public export
ConInfo : Listk->Type
  Alias for `ConInfo_` with the `k` parameter being implicit.

Totality: total
Visibility: public export
argNames : ConInfoks->Maybe (NP (KString) ks)
  Tries to extract the set of argument names from
a constructor.

Totality: total
Visibility: public export
isOperator : String->Bool
  Returns `True` if a constructor's `conName` consists
only of non-alphanumeric characters.

Totality: total
Visibility: public export
wrapOperator : String->String
  Wraps a function name in parentheses if it is an operator

Totality: total
Visibility: public export
recordTypeInfo' : (k : Type) ->List (Listk) ->Type
  Namespace, name and constructors of a data type.

The constructors are wrapped in an n-ary product
parameterized by `ConInfo`, to make them
accessible to the SOP combinators.

Totality: total
Visibility: public export
Constructor: 
MkTypeInfo : ListString->String->NP_ (Listk) (ConInfo_k) kss->TypeInfo'kkss

Projections:
.constructors : TypeInfo'kkss->NP_ (Listk) (ConInfo_k) kss
  n-ary product of the data type's constructors
.typeNS : TypeInfo'kkss->ListString
  Namespace of the data type
.typeName : TypeInfo'kkss->String
  Name of the data type
.typeNS : TypeInfo'kkss->ListString
  Namespace of the data type

Totality: total
Visibility: public export
typeNS : TypeInfo'kkss->ListString
  Namespace of the data type

Totality: total
Visibility: public export
.typeName : TypeInfo'kkss->String
  Name of the data type

Totality: total
Visibility: public export
typeName : TypeInfo'kkss->String
  Name of the data type

Totality: total
Visibility: public export
.constructors : TypeInfo'kkss->NP_ (Listk) (ConInfo_k) kss
  n-ary product of the data type's constructors

Totality: total
Visibility: public export
constructors : TypeInfo'kkss->NP_ (Listk) (ConInfo_k) kss
  n-ary product of the data type's constructors

Totality: total
Visibility: public export
TypeInfo : List (Listk) ->Type
  Alias for `TypeInfo'` with the `k` parameter being implicit.

Totality: total
Visibility: public export
interfaceMeta : Type->List (ListType) ->Type
  Interface to make a data type's metadata available at runtime.

In order to get access to the meta data, it is often more convenient
to use function `metaFor`.

Parameters: t, code
Constraints: Generic t code
Constructor: 
MkMeta

Methods:
meta : TypeInfo'Typecode

Implementations:
MetaNat [[], [Nat]]
Meta (Maybety) [[], [ty]]
Meta (Eitherab) [[a], [b]]
Meta (List{arg:668}) [[], [{arg:668}, List{arg:668}]]
Meta (List1a) [[a, Lista]]
Meta (Dec{arg:3989}) [[{arg:3989}], [Not{arg:3989}]]
MetaOrdering [[], [], []]
MetaBool [[], []]
MetaPrec [[], [], [], [], [Nat], [], []]
MetaMode [[], [], [], [], [], []]
MetaFileError [[Int], [], [], [], [], []]
MetaFile [[FilePtr]]
MetaFileMode [[], [], []]
MetaPermissions [[ListFileMode, ListFileMode, ListFileMode]]
MetaClockType [[], [], [], [], [], [], []]
meta : Metatcode=>TypeInfo'Typecode
Totality: total
Visibility: public export
metaFor : (0t : Type) ->Metatcode=>TypeInfocode
  Return's the `TypeInfo` of a data type. This is
an alias for `meta {t = t}`.

Totality: total
Visibility: public export
genShowPrec : Metatcode=>POPShowcode=>Prec->t->String
  Generic show function.

This is still quite basic. It uses prefix notation for operators
and data types with List constructors (`Nil` and `(::)`)
are not yet displayed using list syntax ("[a,b,c]").

However, constructors with only named arguments are displayed
in record syntax style.

Totality: total
Visibility: public export