Closed mlms13 closed 4 years ago
I've tentatively decided that Decode
is an ok module name to claim, so prefixing with Bs
everywhere maybe isn't needed. But there are still some other code cleanup suggestions here, so I won't close this ticket just yet.
DecodeBase
is now Decode.Base
, and to construct a custom one, you use Decode_Base.Make
, which is aliased as Decode.Make
. The bsconfig.json
has been updated to only expose Decode
in order to avoid polluting the public namespace.
Decode
is a bad name for the top-level module because it could easily conflict with otherDecode
modules (e.g. in a downstream project that depends onbs-decode
)Decode.ParseError
might not be a very useful alias in the top-level module, because parse errors are only useful inside the context ofDecode.AsResult.OfParseError
, which provides its own aliasDecodeBase
isn't aliased anywhere, so if you want to construct your own custom decoders, you have to use a second global moduleProposal:
DecodeBase
toDecode_Base
Decode_Base
inside the top-levelDecode
asBase
Base
should beMake
This will be a breaking change (but one that should be a super easy migration for most projects), so I'd like to get it in before 1.0.