漂亮的打印哈姆雷特输出?

时间:2016-03-04 17:29:49

标签: haskell yesod

我使用以下模板构建一些XML:

xml nw config = renderHtml [shamlet|
<nw version="#{version config}" nr="#{nw}">
    <compatibleHardwares>
        $forall hw <- hws
            <compatibleHardware>
                #{hw}
|]
  where
    hws = (compatiblehardware config)

输出结果为:

<nw version="1.0" nr="NW011"><compatibleHardwares><compatibleHardware>X4578</compatibleHardware>
</compatibleHardwares>
</nw>

是否可以打印出由hamlet创建的输出?

0 个答案:

没有答案