[Haskell-beginners] do-notation question

Arlen Cuss celtic at sairyx.org
Sat May 14 05:11:05 CEST 2011


>  defaultLayout contents = do
>          PageContent title headTags bodyTags <- widgetToPageContent $ do
>              addCassius ...
> 
>  How does this work?  Is bodyTags drawn from widgetToPageContent and 
>  then used as the third argument to PageContent?

I believe it's a pattern match; widgetToPageContent returns a
PageContent (in some monad), which is bound to "PageContent title
headTags bodyTags" -- so the three variables are bound to.

>  tia,
>  Lee
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110514/2f933541/attachment.pgp>


More information about the Beginners mailing list