check-pvp

Roman Cheplyaka 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:
>    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.

Certainly not.

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
artifacts either.

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-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?
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://www.haskell.org/pipermail/cabal-devel/attachments/20140301/d454c335/attachment.sig>


More information about the cabal-devel mailing list