GHC Win32 ffi functions as implemented for Pugs

Simon Marlow simonmar at microsoft.com
Mon May 23 06:57:27 EDT 2005


On 22 May 2005 23:32, Max Maischein (Corion) wrote:

> The file is (live version) :
> 
>    http://svn.openfoundry.org/pugs/src/Pugs/Compat.hs
> 
> The implemented wrappers that are functional and not just stubs are
> (as of r3680) :
> 
> For System.Environment:
> setEnv :: String -> String -> Bool -> IO ()
> getEnv :: String -> IO (Maybe String)
> unsetEnv :: String -> IO ()

System.Environment.getEnv should work on Win32.  For the others, it
would possibly make sense to include these in System.Environment, with
implementations for both Unix & Win32.

> For Posix.Process
> getProcessTimes :: IO ProcessTimes
> getProcessID :: IO Int

Should probably be in System.Win32 somewhere.

> The code itself is dual-licensed under the Artistic License and GPL
> and thus should be compatible with whatever license GHC uses.

Unfortunately we can't take code under that license into our existing
packages - the rule is that each package has a single license, and
currently all the packages distributed with GHC have a BSD3 license,
with the exception of readline.  You can start new packages, of course.

> Hope you find my code useful,

Contributions are always welcome, even if we can't use the code
directly.  You've pointed out things that the standard libraries lack.
Thanks!

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list