How do I construct values of HKD MyRecord Maybe? I've tried constructing MyRecord with Nothing for the fields but I can't get GHC to match the types. :thinking:
It _constructs_ a constructor function for you and is polymorphic over the f in your type. So to construct a default value of our MyRecord type where all of the fields are Nothing:
How do I construct values of
HKD MyRecord Maybe
? I've tried constructingMyRecord
withNothing
for the fields but I can't get GHC to match the types. :thinking:The answer:
build
!It _constructs_ a constructor function for you and is polymorphic over the
f
in your type. So to construct a default value of ourMyRecord
type where all of the fields areNothing
:Or to create a constructor: