Dhall-haskell: Dhall.Core.Project should store an ordered set of field projections

Created on 29 Oct 2018  路  4Comments  路  Source: dhall-lang/dhall-haskell

Continuing from #518, which identifies that the Set currently used will loose field ordering.

good first issue help wanted

All 4 comments

@ocharles what鈥檚 the use case for this?

For dhall format to retain the filed ordering. It was mentioned in #516 that Project probably shouldn't just be using a Set.

For what it鈥檚 worth, the way I鈥檓 modelling this in my dhall-purescript project is by using the same datatype used to represent records and unions, except over () instead of Expr ... (Expr is now parameterized over that functor too, so it can be ordered [(String, a)] or unordered Map String a, whatever.) I just think it conceptually works well to have the projection set represented in the same way as records themselves, and it seems to cost little.

Was this page helpful?
0 / 5 - 0 ratings