Expand description
This crate defines the types necessary to translate Rust data types to Purescript. Most users
will only need to derive AsPursType with the purescript_waterslide_derive crate and use
the purs_module! macro to generate modules.
Macros§
- purs_
module - Use this macro to generate purescript modules. It takes a module name (a String) and a comma-separated list of types you want to include in the module.
Structs§
- Purs
Constructor - Represents a Purescript type name with its parameters and which module it comes from.
- Purs
Module - Represents a Purescript module with a name, imports and multiple data types declarations. It is
most easily generated with the
purs_module!macro. You can then use theDisplayimplementations.
Enums§
- Purs
Type - The representation for a Purescript data type declaration. The
PursTypefor a Rust struct and enum can be obtained by deriving theAsPursTypetrait.
Traits§
- AsPurs
Constructor - Produce a
PursConstructorfrom a Rust type. - AsPurs
Type - Struct and enums that implement that trait can be part of generated modules.
AsPursTypeis required to produce a data type definition, whereasAsPursConstructorand its corresponding structPursConstructorare necessary to use a type in definitions.