Overview of changes to logic: rather than immediately parsing the dhall type into a union/single constructor, first recursively peel back any lambdas at the front of the dhall type and collect these in a bound variable list. Then when constructing the nested data type, add two paths for a) higher kinded haskell types (besides Maybe and List) and b) any of these bound variables from the front of the type.
The main gotcha is that this won't work with built-in From/ToDhall derivations as produced by GenerateOptions (or if this is possible I don't know how to do it). In any case the docs are updated to reflect this.
addresses other half of https://github.com/dhall-lang/dhall-haskell/issues/2475
Overview of changes to logic: rather than immediately parsing the dhall type into a union/single constructor, first recursively peel back any lambdas at the front of the dhall type and collect these in a bound variable list. Then when constructing the nested data type, add two paths for a) higher kinded haskell types (besides Maybe and List) and b) any of these bound variables from the front of the type.
The main gotcha is that this won't work with built-in From/ToDhall derivations as produced by
GenerateOptions
(or if this is possible I don't know how to do it). In any case the docs are updated to reflect this.