On 4 September 2010 19:01, Alexander McPhail
<haskell.vivian.mcph...@gmail.com> wrote:
> Hi
>
> Is there a similar ticket for GHC to not export instances in the case that
> other instances are explicitly specified?
>
> module Foo (
>                    Foo(Monad)
>                   )
>
> instance Monad Foo where ...
> instance MonadState (Foo Bar) where ...
>
> i.e. the monad instance gets exported but the MonadState one does not?  This
> helps in maintaining opacity with respect to the package user.  I may not
> want the user to be able to call 'get' and 'put' when using my custom monad.

No: instances are implicitly imported and exported (if the class and
the type are visible, then so are any possible instances).

-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to