[Haskell-cafe] OS Abstraction module??

Galchin Vasili vigalchin at gmail.com
Mon Oct 22 12:41:09 EDT 2007


Hi Neil,

    I am really talking about a module or perhaps a Haskell class that
provides notion for multiple threads of execution, semaphores, .. that
"hides" POSIX vs Win32 APIs .. i.e. the underlying OS APIs would be totally
hidden. The reason I bring this up is that OS abstraction layers are very
common in "mainstream" languages like C++. Any code written using an OS
abstraction layer is absoutely portable. IMO if Haskell (or say OCaml) want
to be accepted by industry this kind of functionality is absolutely
critical.

Kind regards, Bill


On 10/22/07, Neil Mitchell <ndmitchell at gmail.com> wrote:
>
> >     Besides GUI stuff, in what modules are the platform neutral stuff
> implemented? Or how > do I look for this code?
>
> Most of the code is platform neutral. A few specific bits
> (System.Posix, System.Win32) are limited to one operating system, but
> that's hardly any of it. If you just write code, there is a strong
> chance it will work perfectly on both operating systems. I've only
> ever developed Haskell on Windows, and I've never had a Linux user
> have a problem with any of it. About the only thing to be "careful"
> about with platform differences is that you should make use of the
> System.FilePath module to manipulate filepaths, if you are doing that
> to any great extent.
>
> If you say what you are tying to do, and why you suspect it might not
> "just work" in a cross platform manner, people might be able to
> address your specific concerns.
>
> Thanks
>
> Neil
>
>
> On 10/22/07, Neil Mitchell <ndmitchell at gmail.com> wrote:
> > Hi Bill,
> >
> > >      In the Haskell libraries, is there an OS abstraction module, that
> would
> > > "hide" the POSIX API and Win-32 API? If not, this would be nice so
> that
> > > Haskell "programs" could be written in an OS independent manner!
> >
> > Yes, Haskell provides a fairly complete API in the base libraries,
> > which is platform neutral. If you want platform neutral GUI programs
> > then you have Gtk2hs.
> >
> > Thanks
> >
> > Neil
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20071022/c15b4b4a/attachment.htm


More information about the Haskell-Cafe mailing list