Expand description
Conversion from types in fhir
to types in rty
Conversion assumes well-formedness and will panic if type are not well-formed. Among other things, well-formedness implies:
- Names are bound correctly.
- Refinement parameters appear in allowed positions. This is particularly important for
refinement predicates, aka abstract refinements, since the syntax in
rty
has syntactic restrictions on predicates. - Refinements are well-sorted.
Modules§
- errors π
- struct_
compat - Check whether two refinemnt types/signatures are structurally compatible.
Structs§
- After
Sortck π - Conv
Ctxt - Wrapper over a type implementing
ConvPhase
. We have this to implement most functionality as inherent methods instead of defining them as default implementation in the trait definition. - Env π
- Layer π
- Lookup
Result π - Param
Entry π
Enums§
- Layer
Kind π - Whether the list of parameters in a layer is converted into a list of bound variables or coalesced into a single parameter of adt sort.
- Lookup
Result πKind
Traits§
- Conv
Phase - We do conversion twice: once before sort checking when we donβt have elaborated information and then again after sort checking after all information has been elaborated. This is the interface to configure conversion for both phases.
- Wfck
Results Provider - An interface to the information elaborated during sort checking. We mock these results in the first conversion phase during sort checking.
Functions§
- conv_
adt_ πsort_ def - conv_
constant π - conv_
constant_ πexpr - conv_
default_ πtype_ parameter - conv_
defn π - conv_
func_ decl - conv_
generic_ πparam_ kind - conv_
generics π - conv_
invariants π - conv_
qualifier π - conv_
refinement_ πgenerics - conv_
un_ πop - def_
id_ πto_ param_ const - def_
id_ πto_ param_ ty - prim_
ty_ πto_ bty - ty_
param_ πname - ty_
param_ πowner - variant_
idx π