Skip to content

Consistent defaultOptions #19

@pete-murphy

Description

@pete-murphy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions