= Solution
A word can be a <string>, and the input text a <list> of those <strings>. Use names that avoid clashing with the <Standard Prelude> machine-word type `Word`:
``
type TextWord = String
type Text = [TextWord]
``
Thus $\boxed{\mathrm{TextWord}=\mathrm{String},\quad\mathrm{Text}=[\mathrm{TextWord}]}$. These are <type synonyms>, so ordinary <string> and <list> operations remain available without wrapping or unwrapping constructors. They describe input that has already been tokenized; punctuation and word boundaries do not need a separate treatment here.
Back to article page