cool, i found this:

http://www.nabble.com/template-haskell----include-a-file--td19462913.html

$ cat test.hs
{-# LANGUAGE TemplateHaskell#-}
module Main where

import Language.Haskell.TH
import EmbedStr

me = $(embedStr $ readFile "./test.hs")

main = do
   print $ me

$ cat EmbedStr.hs
{-# LANGUAGE TemplateHaskell#-}
module EmbedStr where

import Language.Haskell.TH
import Language.Haskell.TH.Syntax (lift)

embedStr:: IO String -> ExpQ
embedStr str =  lift =<< runIO str
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to