My plan_b.html.pm
----
#lang pollen
◊as-cdata{567}
----
My pollen.rkt
----
#lang racket/base
(require pollen/tag)
(require pollen/decode)
(require txexpr)
(require xml)
(require racket/list)
(provide (all-defined-out))
(define (as-cdata string)
(cdata #f #f string))
----
My template.html
----
<html><body>
◊(->html ◊doc)
</body></html>
----
Result
------------------------------------------------------------------------
...>raco pollen render plan_b.html.pm
rendering plan_b.html.pm
rendering: /plan_b.html.pm as /plan_b.html
->html: contract violation
expected: (or/c txexpr-element? txexpr-elements?)
given: '(root #(struct:cdata #f #f "567") "\n" "\n")
in: the 1st argument of
(->*
((or/c txexpr-element? txexpr-elements?))
(#:attrs
(or/c #f txexpr-attrs?)
#:splice
boolean?
#:splice?
boolean?
#:tag
(or/c #f txexpr-tag?))
string?)
contract from:
<pkgs>/pollen/pollen/template/html.rkt
blaming: top-level
(assuming the contract is correct)
at: <pkgs>/pollen/pollen/template/html.rkt:14.26
--
You received this message because you are subscribed to the Google Groups
"Pollen" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.