blob: 7eea2d8f46027cd062ed2e97f63d4ca3ef28573a (
plain)
1
2
3
4
5
6
7
8
9
|
{-# LANGUAGE TemplateHaskell #-}
module TH_finalizer2M where
import Language.Haskell.TH.Syntax
g :: IO ()
g = $(do addModFinalizer (do d <- [d| f x = (2 :: Int) |]; addTopDecls d)
[| return ()|]
)
|