Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
darcs hsx patch, add EmbedAsAttr instance for (Attr a (XMLGenT m v))
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jeremy Shaw  
View profile  
 More options May 24 2010, 2:18 pm
From: Jeremy Shaw <jer...@n-heptane.com>
Date: Mon, 24 May 2010 13:18:35 -0500
Local: Mon, May 24 2010 2:18 pm
Subject: darcs hsx patch, add EmbedAsAttr instance for (Attr a (XMLGenT m v))

Hello,

Sometimes it would be nice to write code like this:

page =
    ...
    <a href=fooURL>foo</a>

  fooURL = XMLGenT m String
  fooURL = return "http://example.org/foo"

Where the attribute value is in the XMLGenT monad. (This is very  
useful when using web-routes).

But, we can't because there is no suitable instance. This patch adds  
an instance,

 > instance (EmbedAsAttr m (Attr a v), TypeCastM m1 m) => EmbedAsAttr  
m (Attr a (XMLGenT m1 v))

(Thanks goes to Sergey Mironov for figuring this out).

- jeremy

  hsx-embedasattr-for-XMLGenT-attr-values.dpath
10K Download

--
You received this message because you are subscribed to the Google Groups "Haskell Server Pages" group.
To post to this group, send email to haskell-server-pages@googlegroups.com.
To unsubscribe from this group, send email to haskell-server-pages+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haskell-server-pages?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas Hartman  
View profile  
 More options May 24 2010, 3:21 pm
From: Thomas Hartman <thomashartm...@googlemail.com>
Date: Mon, 24 May 2010 12:21:13 -0700
Local: Mon, May 24 2010 3:21 pm
Subject: Re: darcs hsx patch, add EmbedAsAttr instance for (Attr a (XMLGenT m v))
nice!

>  fooURL = XMLGenT m String

I assume :: was meant instead of =

--
Need somewhere to put your code? http://patch-tag.com
Want to build a webapp? http://happstack.com

--
You received this message because you are subscribed to the Google Groups "Haskell Server Pages" group.
To post to this group, send email to haskell-server-pages@googlegroups.com.
To unsubscribe from this group, send email to haskell-server-pages+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haskell-server-pages?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Niklas Broberg  
View profile   Translate to Translated (View Original)
 More options May 24 2010, 4:07 pm
From: Niklas Broberg <niklas.brob...@gmail.com>
Date: Mon, 24 May 2010 22:07:56 +0200
Local: Mon, May 24 2010 4:07 pm
Subject: Re: darcs hsx patch, add EmbedAsAttr instance for (Attr a (XMLGenT m v))

> But, we can't because there is no suitable instance. This patch adds an
> instance,

>> instance (EmbedAsAttr m (Attr a v), TypeCastM m1 m) => EmbedAsAttr m (Attr
>> a (XMLGenT m1 v))

I thought this instance was already included, it's a clear oversight
that it isn't. Patch applied, thanks!

Cheers,

/Niklas

--
You received this message because you are subscribed to the Google Groups "Haskell Server Pages" group.
To post to this group, send email to haskell-server-pages@googlegroups.com.
To unsubscribe from this group, send email to haskell-server-pages+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haskell-server-pages?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeremy Shaw  
View profile   Translate to Translated (View Original)
 More options May 24 2010, 4:16 pm
From: Jeremy Shaw <jer...@n-heptane.com>
Date: Mon, 24 May 2010 15:16:58 -0500
Local: Mon, May 24 2010 4:16 pm
Subject: Re: darcs hsx patch, add EmbedAsAttr instance for (Attr a (XMLGenT m v))
Sweet!

You have a similar feeling instance,

instance (XMLGen m, EmbedAsAttr m a) => EmbedAsAttr m (XMLGenT m a)  
where
  asAttr ma = ma >>= asAttr

But that is not quite the same. But is close enough to perhaps may you  
think you covered this issue :)

- jeremy

On May 24, 2010, at 3:07 PM, Niklas Broberg wrote:

--
You received this message because you are subscribed to the Google Groups "Haskell Server Pages" group.
To post to this group, send email to haskell-server-pages@googlegroups.com.
To unsubscribe from this group, send email to haskell-server-pages+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haskell-server-pages?hl=en.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Niklas Broberg  
View profile  
 More options May 24 2010, 4:18 pm
From: Niklas Broberg <niklas.brob...@gmail.com>
Date: Mon, 24 May 2010 22:18:53 +0200
Local: Mon, May 24 2010 4:18 pm
Subject: Re: darcs hsx patch, add EmbedAsAttr instance for (Attr a (XMLGenT m v))

> You have a similar feeling instance,

> instance (XMLGen m, EmbedAsAttr m a) => EmbedAsAttr m (XMLGenT m a) where
>  asAttr ma = ma >>= asAttr

> But that is not quite the same. But is close enough to perhaps may you think
> you covered this issue :)

I think you're spot on. :)

/Niklas

--
You received this message because you are subscribed to the Google Groups "Haskell Server Pages" group.
To post to this group, send email to haskell-server-pages@googlegroups.com.
To unsubscribe from this group, send email to haskell-server-pages+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haskell-server-pages?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »