blob: ce003174f7fca2ff3b0fd1fc909737273e43fcca (
plain)
1
2
3
4
5
6
7
|
:set -XTemplateHaskell
let f n = n * 2::Int
import Language.Haskell.TH
fName <- runQ [| f |]
$(return $ AppE fName (LitE (IntegerL 7)))
let f n = n * 3::Int
$(return $ AppE fName (LitE (IntegerL 7)))
|