dhall-haskell
dhall-haskell copied to clipboard
Document the significance of `Nothing :: Maybe CharacterSet`
The Lam, Pi, Combine, CombineTypes, Prefer and Equivalent constructors of Expr all have a Maybe CharacterSet field, without any documentation describing what a Nothing would signify in this context. Based on the source code I believe Nothing means "infer the CharacterSet based on the input". If this it the case, some documentation should be added to the constructors to explain this. Alternatively, a sum-type would be more expressive e.g.
data CharacterSetSource
= Infer
| Specify CharacterSet