-- IncludeFile.hs -- -- 12/28/14, MMS -- Experiment to figure out how to include a text file in an executable. -- If move the includeFile executable around will still get a printout -- of the included input file. -- -- http://hackage.haskell.org/package/include-file-0.1.0.1/docs/Development-IncludeFile.html -- http://hackage.haskell.org/package/bytestring-0.10.4.1/docs/Data-ByteString-Char8.html -- -- Also looked at http://kwangyulseo.com/2014/02/06/multi-line-strings-in-haskell/ -- for possible ways to solve this problem. Decided this was nicer. -- -- compilation: -- ghc --make -O2 IncludeFile.hs -o mjc -- {-# LANGUAGE TemplateHaskell #-} import Development.IncludeFile import qualified Data.ByteString.Char8 as C $(includeFileInSource "avrH.rtl.s" "avrH") main = do putStr (C.unpack avrH)