Re: [Haskell-cafe] TH splicing and recompilation checking

2013-07-16 Thread Tristan Ravitch
I think you want qAddDependentFile in Language.Haskell.TH.Syntax

  
http://hackage.haskell.org/packages/archive/template-haskell/2.7.0.0/doc/html/Language-Haskell-TH-Syntax.html

On Tue, Jul 16, 2013 at 05:41:19PM +, Johannes Waldmann wrote:
> Hi. 
> 
> we are using template Haskell to splice in some code
> that is produced by reading and transforming the contents of another file. 
> 
> now, if this "other file" is touched (by editing),
> but not the main file, then ghc (and cabal) do not realize 
> that the main file does need to be recompiled.
> 
> is there a way to tell them about the dependency?
> 
> (example main file: 
> https://github.com/apunktbau/co4/blob/master/CO4/Test/Queens.hs)
> 
> - J.W.
> 
> 
> 
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe


pgpJqUt8gyZ03.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] TH splicing and recompilation checking

2013-07-16 Thread Erik Hesselink
There is a GHC ticket about implementing a DEPENDS pragma for doing
this [0]. There are patches attached, but it looks like it isn't
finished yet.

Erik

[0] http://ghc.haskell.org/trac/ghc/ticket/4900

On Tue, Jul 16, 2013 at 7:41 PM, Johannes Waldmann
 wrote:
> Hi.
>
> we are using template Haskell to splice in some code
> that is produced by reading and transforming the contents of another file.
>
> now, if this "other file" is touched (by editing),
> but not the main file, then ghc (and cabal) do not realize
> that the main file does need to be recompiled.
>
> is there a way to tell them about the dependency?
>
> (example main file:
> https://github.com/apunktbau/co4/blob/master/CO4/Test/Queens.hs)
>
> - J.W.
>
>
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] TH splicing and recompilation checking

2013-07-16 Thread Michael Sloan
Yup, such a thing exists!  I think it's a little bit obscure because for
some bizarre reason it isn't reexported by Language.Haskell.TH:

http://hackage.haskell.org/packages/archive/template-haskell/2.8.0.0/doc/html/Language-Haskell-TH-Syntax.html#v:addDependentFile

-Michael


On Tue, Jul 16, 2013 at 10:41 AM, Johannes Waldmann <
waldm...@imn.htwk-leipzig.de> wrote:

> Hi.
>
> we are using template Haskell to splice in some code
> that is produced by reading and transforming the contents of another file.
>
> now, if this "other file" is touched (by editing),
> but not the main file, then ghc (and cabal) do not realize
> that the main file does need to be recompiled.
>
> is there a way to tell them about the dependency?
>
> (example main file:
> https://github.com/apunktbau/co4/blob/master/CO4/Test/Queens.hs)
>
> - J.W.
>
>
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe