[Haskell-beginners] Newtype to avoid orphans

Adrien Haxaire adrien at haxaire.org
Mon Feb 6 16:25:05 CET 2012


 Thank you.

 It will save me some time, and I will be happy using the nice API of 
 Data.Vector without having to wrap everything.

 I will still read more on orphan instances to be sure I understand the 
 concept and the consequences, even if now I know they are minor for me.

 Adrien


 On Mon, 6 Feb 2012 08:53:14 -0500, Brent Yorgey wrote:
> Yes: don't bother.  Having an orphan instance is really not that big
> of a deal.  And it's certainly not worth making a newtype just to
> avoid the warning.  If you want to turn off the warning you can add
>
> {-# OPTIONS_GHC -fno-warn-orphans #-}
>
> to the top of your file.
>
> -Brent
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners




More information about the Beginners mailing list