Fixing type synonyms to Uniq(D)FM newtypes
ben at smart-cactus.org
Fri Jan 17 22:38:14 UTC 2020
Richard Eisenberg <rae at richarde.dev> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 487 bytes
Desc: not available
More information about the ghc-devs