[Haskell-beginners] Replace instances of module

Francesco Ariis fa-ml at ariis.it
Mon Jan 8 14:02:44 UTC 2018


Hello Paul,

On Mon, Jan 08, 2018 at 03:20:20PM +0200, Pv wrote:
> Hello, all.
> 
> Is it possible to import all types except some of instances and to
> re-defined hiding instances, so resulting (new) module will be the same
> types, mostly the same instances, but some of instances will be
> replaced?

Nope, instances are automatically imported! You can create newtypes
and have them instances of what you need or check the newfangled
`backpack` [1]!

[1] https://ghc.haskell.org/trac/ghc/wiki/Backpack


More information about the Beginners mailing list