mirror of
https://github.com/Smaug123/WoofWare.Myriad
synced 2025-10-08 21:48:40 +00:00
Add catamorphism generator (#97)
This commit is contained in:
@@ -62,3 +62,11 @@ type JsonParseAttribute (isExtensionMethod : bool) =
|
||||
/// i.e. to stamp out HTTP REST clients from interfaces defining the API.
|
||||
type HttpClientAttribute () =
|
||||
inherit Attribute ()
|
||||
|
||||
/// Attribute indicating a DU type to which the "create catamorphism" Myriad
|
||||
/// generator should apply during build.
|
||||
/// Supply the `typeName` for the name of the record type we will generate, which contains
|
||||
/// all the catas required; for example, "MyThing" would generate:
|
||||
/// type MyThing<'a, 'b> = { Du1 : Du1Cata<'a, 'b> ; Du2 : Du2Cata<'a, 'b> }.
|
||||
type CreateCatamorphismAttribute (typeName : string) =
|
||||
inherit Attribute ()
|
||||
|
Reference in New Issue
Block a user