Fixing type synonyms to Uniq(D)FM newtypes
Ben Gamari
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.
Cheers,
- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20200117/d189482c/attachment.sig>
More information about the ghc-devs
mailing list