roma at ro-che.info
Sat Mar 1 21:29:58 UTC 2014
* Henning Thielemann <lemming at henning-thielemann.de> [2014-03-01 19:02:35+0100]
> Am 01.03.2014 16:57, schrieb Henning Thielemann:
> >Treating check-pvp as compiler driven by Cabal sounds reasonable, since
> >this would do all the preprocessing stuff and would also work on
> >tarballs etc. However the haskell-name framework seems to expect a
> >binary executable as compiler. According to
> > http://documentup.com/haskell-suite/haskell-names
> >I would have to design the checker as a tool that only reads modules,
> >not the package description, called maybe 'check-modules-pvp' and then run
> >$ cabal install --haskell-suite -w check-modules-pvp mypkg
> I have pushed a new version to the repo that contains two
> executables: The stand-alone executable check-pvp and the
> haskell-suite compiler check-pvp-compiler:
> You can run the compiler with
> $ cabal install --haskell-suite -w check-pvp-compiler
> I got some problems. Using NamesDB as in hs-gen-iface works, but I
> guess, I do not need NamesDB and thus haskell-names.
Perhaps the compiler abstraction is not such a good fit for check-pvp.
For a usual compiler, you need your dependencies to be installed. For
check-pvp, you don't. And, as you note, check-pvp doesn't produce any
I guess a new abstraction (and a new command, similar to build)
should be added to haskell-packages to support such use cases. I have to
think about this. (TBH I'm too concerned with what's happening to my
country right now to think clearly.)
If you have any suggestions, let me know. Are there any similar use
cases to this one, or is it too different from anything else? In other
words, is it worth it to create an abstraction for this?
> I tried to define a StandardDB type with a custom name type:
> data CheckPVPName = CheckPVPName
> instance IsDBName CheckPVPName where getDBName = Tagged "check-pvp"
> theTool :: Compiler.Simple (StandardDB CheckPVPName)
> However with this definition the above 'cabal install' fails in
> configuration phase
> utility$ cabal install --haskell-suite -w check-pvp-compiler
> Resolving dependencies...
> cabal: Could not resolve dependencies:
> trying: utility-ht-0.0.10 (user goal)
> next goal: base (dependency of utility-ht-0.0.10)
> rejecting: base-126.96.36.199, 188.8.131.52, 184.108.40.206, 220.127.116.11, 18.104.22.168, 22.214.171.124,
> 126.96.36.199, 188.8.131.52, 184.108.40.206, 220.127.116.11, 18.104.22.168, 22.214.171.124 (only already installed
> instances can be used)
> rejecting: base-126.96.36.199 (conflict: base => base>=4.0 && <4.3)
> rejecting: base-188.8.131.52 (conflict: base => base>=4.0 && <4.2)
> Dependency tree exhaustively searched.
> I guess I do not understand the purpose of the StandardDB type and
> its associated name type.
> There is another problem: With NamesDB it worked, but the final
> installation phase fails, because check-pvp-compiler does not
> generate files. What is the recommended way to cope with compilers
> that do not write something to files?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: Digital signature
More information about the cabal-devel