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 - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -