freckle / bcp47

BCP-47 for Haskell
https://freckle.github.io/bcp47/
2 stars 1 forks source link

Make the Trie type non empty #11

Closed eborden closed 4 years ago

eborden commented 4 years ago

Non empty data structures are easier to work with. They can easily be made "empty" by wrapping them in a Maybe and the benefits of being able to remove empty expectations from the core data structure increase usability downstream.

The underlying data structure for Trie is not NonEmpty, so this invariant must be held by operations over it.