Leonardo Taglialegne
Leonardo Taglialegne
I hereby release the contents of the commit https://github.com/miniBill/elm-playground/commit/aa894224d69bd12c0335dd7cdfa619ff1e908b68 under the license CC0, or at your choice, MIT
This PR would not be backwards compatible, so I definitely can't merge it. Would it make sense to have a distinct `nullable` function instead? I do agree that the documentation...
Sounds good wrt `nullable` and `maybe`, ok on updating the comment, and wrt `nullableField/maybeField` I'm not sure? The current naming is unfortunate but I'm not sure about duplicating? :thinking:
This is also relevant for #14 I think I should stop and think for a while about how to improve the whole discourse around `Nothing` and optional and failure
Yeah, the `value` and `andThen` are probably the way to go. I'm still wary of breking backwards compat. Will need to think about it
You could use [`Codec.value`](https://package.elm-lang.org/packages/miniBill/elm-codec/latest/Codec#value) and then validate with a nested call to `Codec.decodeValue`. ... not ideal, no. Let me know if you need more details on how to actually do...
Another option is to just go for `build` and write your encoders and decoders for that specific type, but that's also not ideal
Did you look into this?
+1 for mtr
How about an API like `Col Lg One` or `Xs One`?