It produces structured data (the `MarkupM` datatype from `blaze` to be precise [1]).
To check this, note that Hamlet produces `Html` [2], which (when following the link) is defined to be `Markup` [3], which is in turn `MarkupM` [4].
[1]: https://hackage.haskell.org/package/blaze-markup-0.8.2.3/doc...
[2]: https://hackage.haskell.org/package/shakespeare-2.0.24/docs/...
[3]: https://hackage.haskell.org/package/shakespeare-2.0.24/docs/...
[4]: https://hackage.haskell.org/package/blaze-markup-0.8.2.3/doc...