9 Nov
2010
9 Nov
'10
3:07 p.m.
Oops .. I made a mistake .. I had gone with Felipe's solution -
getActions :: [MyAction Get] -> Get [MyAction Id] getActions = mapM getAction
-- Felipe.
Felpe, could you please confirm if
bs = BS.pack [1,0,2,4]
toVal (A1 (Id v)) = fromIntegral v :: Int toVal (A2 (Id v)) = fromIntegral v :: Int
abc = map toVal $ runGet (getActions listOfActions) bs
is the right way of getting the values out? -- Regards, Kashyap