[Haskell-cafe] OS Abstraction module??

Tommy M. McGuire mcguire at crsr.net
Tue Oct 23 14:17:55 EDT 2007


David Roundy wrote:
> On Mon, Oct 22, 2007 at 09:44:11PM -0500, Galchin Vasili wrote:
>> Hi Ryan,
>>
>> I am trying to avoid "ifdef's" and have all
>> decisions made at run-time (maybe given the nature of Haskell .. i..e
>> static/compile-time type checking this is impossible) ...
> 
> I don't see how in any language you could introduce working
> run-time-determined os-specific code.  How would you link with the windows
> libraries under linux, and vice versa? And moreover, why would you do so?
> Unless you're talking about running under an interpreter, I don't see how
> you'd construct a binary that would be able to run under both windows and
> linux.

A FFI supporting dynamic linking, plus a lot of hope?  The binary 
wouldn't run under both OS's, but the program could pick which library 
to link against at runtime.

-- 
Tommy M. McGuire
mcguire at crsr.net



More information about the Haskell-Cafe mailing list