google-research / dex-lang

Research language for array processing in the Haskell/ML family
BSD 3-Clause "New" or "Revised" License
1.56k stars 106 forks source link

Redefine NameMapE as the primitive type #1334

Closed axch closed 11 months ago

axch commented 11 months ago

And define NameMap as a type alias for a NameMapE of a LiftE type. This follows a rationale (included) for why NameMapE (with the type it has) is the data structure you want for bottom-up traversals.

The reason to make NameMap an alias is to avoid duplicating the API surface between the two maps, so that it's not such a pain to eventually cover the entire API of Data.Map in the NameMapE API.