basic tokenizer in Haskell