Experimental IRC log happs-2008-04-12

Available formats: content-negotiated html turtle (see SIOC for the vocabulary)

Back to channel and daily index: content-negotiated html turtle

These logs are provided as an experiment in indexing discussions using IRCHub.py, Irc2RDF.hs, and SIOC.

20:37:27<stepcut>if I have a type like, data SomeChoices = A | B | C, toPairs just generates an empty list. Am I doing something wrong ?
20:54:40<MarcWeber>stepcut: Is this a question ? What is your problem ?
20:56:36<stepcut>I am trying to figure out how to make a drop-down box from which the user can select a choice
20:57:01<stepcut>I was trying to use withData to get the results of the POST data back
20:58:01<stepcut>but, I am not sure how to create a form and use withData in such a way that I can get back one of the choices (A, B, C)
20:59:28<stepcut>withData uses toPairs and fromPairs, and I noticed that if I do, toPairs A, I get back [].
20:59:48<stepcut>so, I am not sure how I am supposed to structure my types so that I can use withData
21:02:07<stepcut>I think maybe I need to do something like, newtype ChoiceString = ChoiceString String, withData $ \(ChoiceString str) -> readM str :: m SomeChoices
21:02:33<stepcut>where I explicitly convert my data type. But that is annoying, and I thought perhaps there is a better way...
21:02:52<Saizan_>stepcut: you can write your own instance of FromData if you want
21:03:21<stepcut>Saizan_: yeah, I knew I was forgetting something like that. :)
21:03:37<stepcut>I had to stop using HAppS for a few weeks while I did my taxes, and now I forgot everything ;)
21:04:15<Saizan_>tyep signatures ftw
21:17:24<stepcut>ah, I think I remember the problem with that. My SomeChoices type is nested inside some other type. So even if I defined my own FromData instance for SomeChoices, it won't be used when fromData is called for the parent type

Back to channel and daily index: content-negotiated html turtle