It should be pretty easy to write an adapter function of type "String -> (Show a => a)". On Aug 11, 2012 12:34 PM, "Patrick Palka" <patrick@parcs.ath.cx> wrote:
On Sat, Aug 11, 2012 at 4:14 AM, <oleg@okmij.org> wrote:
I'd like to point out that the only operation we can do on the first argument of MkFoo is to show to it. This is all we can ever do: we have no idea of its type but we know we can show it and get a String.
That's not all you can do: you can also pass the first argument of MkFoo to a function that expects a Show a => a argument, like the function 'print'. Can you do that with just a String (that represents show x for some x)?
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe