haskell - Call a function inside a hamlet file -


i have writen small language lookup function

getvalue :: string -> string -> string getvalue lang key = (      head $     filter ((== key) . head) langdata)     !! getlangindex lang 

now want call lookup function inside hamlet file.

is possible , how have change function make callable?

you can use haskell expression in scope using #{} interpolation. make sure function produces of tohtml instance.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -