replace a internal representation

original attoparsec switced a new internal representation
use whenM
Merge pull request #12 from pocketberserker/replace-internal-representation

Sorry this took so long. Great contribution, thank you.