Fixing type synonyms to Uniq(D)FM newtypes

Ben Gamari ben at
Fri Jan 17 22:38:14 UTC 2020

Richard Eisenberg <rae at> writes:

> One advantage of the phantom-parameter approach is that it allows for nice polymorphism.
>> lookupEnv :: Uniquable dom => UniqFM dom rng -> dom -> Maybe rng
> Now, we don't need lookupVarEnv separately from lookupNameEnv, but we
> get the type-checking for free.
This is true but some consider the fact that the function name captures
the environment type to be a good thing. I don't have a strong opinion
one way of the other on this.


- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <>

More information about the ghc-devs mailing list