There aren't any good guides for using AttrSplices from Heist. The tutorial from the Snap website fails to show how to bind them, and the only public code I can find that uses them is Digestive Functors Heist.
type AttrSplice m = Text -> RuntimeSplice m [(Text, Text)]
The AttrSplice
type signature says that it takes a Text
and returns a Monad containing a list of tuples of Text
. The first argument would only be used if you're planning on using it as a point of comparison within the template, as shown in the Attribute Splices Tutorial (n.b. the type signature listed here is slightly different, this might reflect an older version of Heist):