[Haskell-Cafe] Parsing bytestream

C K Kashyap ckkashyap at gmail.com
Tue Nov 9 05:10:08 EST 2010

I think I can restate my problem like this ---

If I have a list of actions as follows -

import Data.Word
import Data.Binary.Get

data MyAction = A1 (Get Word8) | A2 (Get Word16)

a = A1 getWord8
b = A2 getWord16be

listOfActions = [a,b,a]

How can I execute the "listOfActions" inside of a Get Monad and get
the output as a list?

More information about the Haskell-Cafe mailing list