blob: d978032534d78b6929121f6faeca052f9d877163 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Language.Haskell.TH
$( [d| g = 0
h = $( return $ LamE [VarP (mkName "g")] (VarE 'g) ) |] )
-- The 'g should bind to the g=0 definition
-- Should print 0, not 1!
main = print (h 1)
|