finding the dependecies of cabal packages

Simon Marlow simonmar at microsoft.com
Mon Aug 1 07:21:19 EDT 2005


[ oops, hit send by mistake ]

On 01 August 2005 11:31, Krasimir Angelov wrote:

> Visual Haskell works quite well with hooks.

Hmm, I'm not sure it does.  The hooks are only run when building the
project, not when interactively editing the source code.  We can't
discover what hooks are being used, because they are embedded in the
Setup.lhs script.

The preXXX hooks are a one-way mechanism for obtaining the
PackageDescription: there's no way to re-inject a modified
PackageDescription.  The postXXX hooks, on the other hand, are fine.  As
long as you stick to postXXX hooks, then VH works fine, because the
PackageDescrption is static and in a known place.

This isn't an argument against hooks, just an observation that (a) there
are uses of hooks that work fine with an IDE, (b) there are uses of
hooks that don't, and (c) the IDE can't tell whether a package is even
using hooks, let alone whether it is using safe hooks or not.  We should
at least do something about (c).  Sorry for not bringing this up when
hooks were being discussed...

Cheers,
	Simon

> We are already using hooks
> in order to build Visual Haskell itself. In Visual C++ projects you
> can specify a sequence of shell commands which can be executed at
> specified point in the build process. In Visual Haskell you can use
> Cabal hooks to perform the same actions but the hooks approach is more
> flexible.
> The only limitation of Visual Haskell is that it can work only with
> the simple build architecture. It can be extended with the makefile
> based system but the drawback will be that we will lose the project
> editing features, interactive type checking and all other advanced
> features. The situation is the same with the Makefile based Visual C++
> projects. Visual C++ provides only basic support for Makefiles.
> 
> Cheers,
>   Krasimir
> 
> On 8/1/05, Simon Marlow <simonmar at microsoft.com> wrote:
>> On 29 July 2005 21:18, Duncan Coutts wrote:
>> 
>>> However an IDE wants even more. It wants to be able to rebuild
>>> individual files quickly (so dependency tracking is required and
>>> linear build scripts are out). It will want to provide a GUI
>>> interface for changing build system parameters (which means that the
>>> build system has to be declarative, not scripted). And no doubt
>>> there are other things too. 
>>> 
>>> The point is that fulfilling these requirements might be possible
>>> for some imagined future version of the "simple" build system,
>>> however if the Cabal interface is extended to stipulate these same
>>> features then it would exclude most other build system
>>> implementations. 
>> 
>> My feeling is that the requirements for incremental building should
>> be part of the simple build system.
>> 
>> It's not quite true now, because we allow arbitrary hooks into the
>> simple build system.  So tools like Visual Haskell only work
>> properly if you don't use hooks.  This is one reason why being more
>> explicit about whether a package uses hooks or not would be useful.
>> 
>> Cheers,
>>        Simon
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://www.haskell.org/mailman/listinfo/libraries



More information about the Libraries mailing list