Newbie question: Why gfoldl has this strange type?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Newbie question: Why gfoldl has this strange type?

Rodrigo Ribeiro
Hi!

I am a novice in Haskell, and particularly I have interested in generic programming. This interest motivated me to read paper Scrap your boilerplate: A practical design pattern for generic programming, but I didn't understand the type of the function gfoldl, that was present in class Term (Data). Somebody could help me to understand the type of this function?

Thanks...

Rodrigo

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question: Why gfoldl has this strange type?

Ryan Ingram
Just so nobody else has to look it up:
Data.Generics.Basics.gfoldl :: Data a => (c (a -> b) -> a -> c b) -> (g -> c g) -> a -> c a
 
  -- ryan

 
On 8/30/07, Rodrigo Geraldo <[hidden email]> wrote:
Hi!

I am a novice in Haskell, and particularly I have interested in generic programming. This interest motivated me to read paper Scrap your boilerplate: A practical design pattern for generic programming, but I didn't understand the type of the function gfoldl, that was present in class Term (Data). Somebody could help me to understand the type of this function?

Thanks...

Rodrigo

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe



_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question: Why gfoldl has this strange type?

Ryan Ingram
Actually, it's a higher rank type and that doesn't show up on hoogle's main page.
 
gfoldl :: (forall a b . Data a => c (a -> b) -> a -> c b)
    -> (forall g . g -> c g)
    -> a
    -> c a
 

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe