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 -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -