
3 Jul
2010
3 Jul
'10
7:22 a.m.
Hi all, I have some incorrect "Read instance" make i got error "Prelude.read: no parse", and i don't know how to fix it. ------------------------------> code start <------------------------------ newtype SerializedWindow = SerializedWindow (Maybe DrawWindow) instance Show SerializedWindow where show _ = "SerializedWindow Nothing" instance Read SerializedWindow where readsPrec _ str = [(SerializedWindow Nothing, idStr) | (val :: String, idStr) <- reads str] ------------------------------> code end <------------------------------ Any help? Thanks! -- Andy