-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I'm struggling to write the following function in Template Haskell. I have a phantom type,
data HTMLPage a = HTMLPage FilePath
This type points to an HTML file, where 'a' refers to the return type of the posted form. So, mostly, I would expect types like HTMLPage (String, String, Date, Int) Where this represented a form the returned someone's first name, last name, dob and age. So, I want a function that will take the returned name/value pairs and cast them into the matching type. eg.
readForm :: Read a => [(String,String)] -> HTMLPage a -> a
Can anyone give me any pointers or am I better off just abandoning this approach? Tom -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE/AsiKYha8TWXIQwoRAvzuAKDPHD4oztAPLFShEWsLuclT7BaImwCfSB8e 9c2aTbTCSpVwabXVsht62DM= =orX3 -----END PGP SIGNATURE-----