[GHC] #4900: DEPENDS pragma

GHC cvs-ghc at haskell.org
Tue Sep 6 16:51:33 CEST 2011


#4900: DEPENDS pragma
---------------------------------+------------------------------------------
    Reporter:  cdsmith           |        Owner:              
        Type:  feature request   |       Status:  new         
    Priority:  normal            |    Milestone:  7.4.1       
   Component:  Build System      |      Version:              
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by GregWeber):

 DEPENDS presumably wants *just* a file path. In Yesod, we allow our users
 to configure where their templates will be located.

 {{{
 module Settings (hamletFile) where

 hamletFile :: FilePath -> Q Exp
 hamletFile f = "myTemplateDir/" ++ f
 }}}

 {{{
 module UseTemplate where
 import Settings

 $(renderHamlet $(hamletFile "myfile.hamlet"))
 }}}

 Is there a way to do this in a compiler pragma?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4900#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the Glasgow-haskell-bugs mailing list