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:
   http://code.haskell.org/~thielema/check-pvp/

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. 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-4.6.0.1, 4.6.0.0, 4.5.1.0, 4.5.0.0, 4.4.1.0, 4.4.0.0, 4.3.1.0,
4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0, 4.0.0.0 (only already installed
instances can be used)
rejecting: base-3.0.3.2 (conflict: base => base>=4.0 && <4.3)
rejecting: base-3.0.3.1 (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?

_______________________________________________
cabal-devel mailing list
cabal-devel@haskell.org
http://www.haskell.org/mailman/listinfo/cabal-devel

Reply via email to