4 ms·
But then my ability to insert elements into a Set depends on the location where those elements were created...that sounds awful.
by merijnv 11y ago
But then my ability to insert elements into a Set depends on the location where those elements were created...that sounds awful.
- marcosdumay 11y agoThat's exactly the same problem you have with every other Haskell name. Have you got much trouble with those on function names?
- merijnv 11y agoThe origin of a name is statically known in the location (i.e. file, expression, whatever). The origin of data is dynamic and can vary at runtime based on arbitrary previous evaluations. Unless you're going to propose making types unique (i.e., not compatible) depending on their origin and enforce never mixing them in the compiler. At which point you have basically reinvented "newtype"