It's not clear to me at all from the README or from the generated code, how to create the bottom value (or Nothing in Haskell parlance).
I have this generated code:
// OptionalFlavor is an optional Flavor.
type OptionalFlavor struct {
value *Flavor
}
// NewOptionalFlavor creates an optional.OptionalFlavor from a Flavor.
func NewOptionalFlavor(v Flavor) OptionalFlavor {
return OptionalFlavor{&v}
}
so if I have a Flavor I know how to get an OptionalFlavor. What I expected to find here was a nullary function that returns the Nothing case.
Perhaps I don't understand how this is supposed to work, or the README needs clarification.
It's not clear to me at all from the README or from the generated code, how to create the bottom value (or
Nothingin Haskell parlance).I have this generated code:
so if I have a
FlavorI know how to get anOptionalFlavor. What I expected to find here was a nullary function that returns theNothingcase.Perhaps I don't understand how this is supposed to work, or the README needs clarification.