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

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -