Cabal + WinHugs + Windows + No C Compiler

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Tue Nov 7 16:06:45 EST 2006


On Tue, 2006-11-07 at 18:55 +0000, Neil Mitchell wrote:
> Hi
> 
> > > However, I also want to develop Hoogle using WinHugs on Windows on a
> > > computer without a C compiler, and it seems that the generated
> > > Paths_Hoogle module requires FFI on Windows? Is there any way round
> > > this, or am I just out of luck in using Cabal's path feature in this
> > > situation?
> >
> > Perhaps it could call things from the System.Win32 lib instead of doing
> > the FFI directly.
> >
> > Could you investigate what external functions we need exactly and if
> > they're exported from System.Win32.
> 
> foreign import stdcall unsafe "windows.h GetModuleFileNameA"
>  getModuleFileName :: Ptr () -> CString -> Int -> IO Int32
> 
> That's the only one. Wouldn't it make more sense to put this FFI call
> in Cabal (which is always there, and always required) instead of
> Win32, which isn't an existing dependancy?

Well I guess that's just the issue. Cabal also isn't an existing
dependency. It'd be pretty bad to make every library & program depend on
Cabal. Perhaps it's just as bad to make it depend on Win32, but I think
it's probably less bad. Or it could go in base or we could leave it as
is as an FFI import.

Duncan



More information about the cabal-devel mailing list