[Haskell-cafe] SYB: extending a generic reader with a type class
sugarbzzzz at gmail.com
Wed Feb 2 20:31:28 CET 2011
Is it possible to extend a generic reader (extR / ext1R from syb) with a
For example, let
foo :: (Integral a) => SomeMonad a
I could write:
reader = ... `extR` (foo :: SomeMonad Int) `extR` (foo :: SomeMonad Integer)
However, that is tedious. Could I do something like
reader = ... `extR` foo
and have it apply to all instances of Integral?
I hope I am being clear.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe