On Fri, Jul 17, 2009 at 4:38 PM, Conor
McBride<co...@strictlypositive.org> wrote:

> class Private x where
>
> public :: (forall x. Public x => x -> y) -> y
> public f = f Pike
>
> data Pike = Pike
> instance Private Pike
> instance Public Pike
>
> --------------------------------------
>
> But if I don't tell 'em Pike, I've ensured that
> blah can only be used in the argument to public.

Well I appreciated this bit even if no-one else did! :-) Also, that's
a nifty trick if it works!


D
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to