fpco / th-utilities

Collection of useful functions for use with Template Haskell
MIT License
10 stars 6 forks source link

Any examples for functions from TH.RelativePaths ? #3

Open qrilka opened 8 years ago

qrilka commented 8 years ago

I was trying to use qReadFileText for example but just foo = $(qReadFileText "my/file") results in

       Expected type: Language.Haskell.TH.Lib.ExpQ
       Actual type: Language.Haskell.TH.Syntax.Q Text

And I couldn't find any better variants yet...

mgsloan commented 8 years ago

Hi! You want qReadFileText "my/file" >>= lift, perhaps with a use of Data.Text.unpack. Seems like a good thing to document, indeed.