Cabal + WinHugs + Windows + No C Compiler

Ross Paterson ross at soi.city.ac.uk
Tue Nov 7 14:23:46 EST 2006


On Tue, Nov 07, 2006 at 06:55:38PM +0000, Neil Mitchell wrote:
> >> 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?

Cabal isn't an existing dependency either (thought both will be present).
Surely System.Win32.DLL.getModuleFileName is the Right Thing.



More information about the cabal-devel mailing list