Ticket #8483: updateQuote.diff

File updateQuote.diff, 1.1 KB (added by aavogt, 6 months ago)
  • Language/Haskell/TH/Quote.hs

    diff --git a/Language/Haskell/TH/Quote.hs b/Language/Haskell/TH/Quote.hs
    index 3a13fe1..b9c0d25 100644
    a b dataToPatQ = dataToQa id litP conP 
    7575-- the data out of a file.  For example, suppose 'asmq' is an  
    7676-- assembly-language quoter, so that you can write [asmq| ld r1, r2 |] 
    7777-- as an expression. Then if you define @asmq_f = quoteFile asmq@, then 
    78 -- the quote [asmq_f| foo.s |] will take input from file "foo.s" instead 
     78-- the quote [asmq_f|foo.s|] will take input from file @"foo.s"@ instead 
    7979-- of the inline text 
    8080quoteFile :: QuasiQuoter -> QuasiQuoter 
    8181quoteFile (QuasiQuoter { quoteExp = qe, quotePat = qp, quoteType = qt, quoteDec = qd })  
    quoteFile (QuasiQuoter { quoteExp = qe, quotePat = qp, quoteType = qt, quoteDec 
    8383  where 
    8484   get :: (String -> Q a) -> String -> Q a 
    8585   get old_quoter file_name = do { file_cts <- runIO (readFile file_name)  
     86                                 ; addDependentFile file_name 
    8687                                 ; old_quoter file_cts }