Crate purescript_waterslide [] [src]

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

PursConstructor

Represents a Purescript type name with its parameters and which module it comes from.

PursModule

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 the Display implementations.

Enums

PursType

The representation for a Purescript data type declaration. The PursType for a Rust struct and enum can be obtained by deriving the AsPursType trait.

Traits

AsPursConstructor

Produce a PursConstructor from a Rust type.

AsPursType

Struct and enums that implement that trait can be part of generated modules. AsPursType is required to produce a data type definition, whereas AsPursConstructor and its corresponding struct PursConstructor are necessary to use a type in definitions.