summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/TH_Depends_External.hs
blob: 6e5e6d53b262da2f43bf703e70ac177c4dfb0058 (plain)
1
2
3
4
5
6
7
8
9
10
11
12

module TH_Depends_External where

import Language.Haskell.TH.Syntax
import Language.Haskell.TH.Lib

loadStringFromFile :: Q Exp
loadStringFromFile = do
  let externalDependency = "TH_Depends_external.txt"
  qAddDependentFile externalDependency
  s <- qRunIO $ readFile externalDependency
  stringE s