Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent defaultOptions #19

Open
pete-murphy opened this issue Dec 5, 2023 · 0 comments
Open

Consistent defaultOptions #19

pete-murphy opened this issue Dec 5, 2023 · 0 comments

Comments

@pete-murphy
Copy link
Owner

There's a mix of approaches to defining defaultOptions, mostly we're using unsafeCoerce {} and letting the implementation fill it in, but I think we always do know the actual defaults by referencing the specification. Collator at least explicitly defines the default options

defaultOptions :: { | CollatorOptions }
defaultOptions =
{ localeMatcher: LocaleMatcher.toString LocaleMatcher.BestFit
, usage: Usage.toString Usage.Sort
, sensitivity: Sensitivity.toString Sensitivity.Variant
, ignorePunctuation: false
, numeric: false
, caseFirst: CaseFirst.toString CaseFirst.False
, collation: Collation.toString Collation.Default
}

If we did the same for all the service constructors, we should be able to do away with the unsafeCoerce shenanigans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant