dhall-haskell icon indicating copy to clipboard operation
dhall-haskell copied to clipboard

Document the significance of `Nothing :: Maybe CharacterSet`

Open fpringle opened this issue 2 years ago • 1 comments

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

fpringle avatar Jul 13 '23 09:07 fpringle