purescript-foreign
purescript-foreign copied to clipboard
Provide an example of using Newtype and Maybe Newtype
This pull request adds an example of using Newtype as well as Maybe Newtype.
Being relatively new to PureScript, it took me a bit of time to understand what was going on with the nested Except and Maybe functors. The journey taught me a lot however and I believe this example could be helpful to others.
I feel there's something not really idiomatic in using <#> map Email
, which initially came up as <#> (<$>) Email
while I was figuring out the types and nesting.
I'd happily rename Email
and foo
, bar
, baz
, duh
to something more meaningful.
error in deps, maybe will work if restarted