Logo Orsak

GenEffectsAttribute Type

Generates the boilerplate for an interface that describes a side effect: its provider interface, and a module with a function creating an effect for each of its members, with Effect.Create.

Example

 [<GenEffects>]
 type IButtonPusher =
     abstract member PushButton: unit -> Task<unit>

 // generated
 type IButtonPusherProvider =
     abstract Effect: IButtonPusher

 module ButtonPusher =
     let pushButton () =
         Effect.Create(fun (er: #IButtonPusherProvider) -> er.Effect.PushButton())
type IButtonPusher = abstract PushButton: unit -> 'a
type unit = Unit
type IButtonPusherProvider = abstract Effect: IButtonPusher
val pushButton: unit -> 'a

Constructors

Constructor Description

GenEffectsAttribute()

Full Usage: GenEffectsAttribute()

Returns: GenEffectsAttribute

Instance members

Instance member Description

this.Inline

Full Usage: this.Inline

Returns: bool

Only needed with Myriad 1.0: set when the file uses MyriadInlineGeneration, so the code is generated without namespace or opens, to be appended to the end of the file. Myriad 1.1 and later say whether a file is inline themselves, which then takes precedence.

Returns: bool

Type something to start searching.