[Haskell-cafe] Deepest polymorphic functor

Ryan Ingram ryani.spam at gmail.com
Tue Jul 28 22:11:42 EDT 2009


What would this do with

  instance Num a => Num [a]

in scope?

On Tue, Jul 28, 2009 at 3:51 PM, Eduard Sergeev<Eduard.Sergeev at gmail.com> wrote:
>
> I was wondering if it is possible to somehow change "deep" f_map from
> http://okmij.org/ftp/Haskell/deepest-functor.lhs article in a such a way
> that it would work not only for monotypes like in the provided example:
>
> test1 = f_map (+1) [[[1::Int,2,3]]]
>
> But for polymorphic types as well (e.g. behaves like simple map) so the
> following line would compile as well:
>
> test1 = f_map (+1) [[[1,2,3]]]
>
> ?
>
> --
> View this message in context: http://www.nabble.com/Deepest-polymorphic-functor-tp24709303p24709303.html
> Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


More information about the Haskell-Cafe mailing list