A text editor in Haskell