
2 Nov
2010
2 Nov
'10
5:23 p.m.
On Tuesday 02 November 2010 22:17:48, Michael Litchard wrote:
I have the following TagOpen [TagOpen "a" [("href","/launchWebForward.do?resourceId=4&policy=0&returnTo=%2FshowWeb Forwards.do")]]
I would like to get the attribute resourceId=4 from that. My understanding is that fromAttrib is the right thing to use. But I'm having difficulty understanding the type signature fromAttrib :: (Show str, Eq str, StringLike str) => str -> Tag str -> str
I'm sure if I did, the way to use it would be clear. Could someone help me make sense of this?
In most uses, str will be one of - String - ByteString - Text substitute the one you're using for str. I've no idea why there's a Show constraint (except perhaps it's needed for a failure message).