Re: cvs commit: fptools/ghc/compiler/hsSyn HsUtils.lhs fptools/ghc/compiler/typecheck TcRnDriver.lhs TcRnMonad.lhs TcUnify.lhs

2005-05-22 Thread Jim Apple

Simon Peyton Jones wrote:


  - For command-line 'let' and 'x-e' forms, if exactly one variable
is bound, we print its value if it is Showable and not ()
prompt let x = 4
4
prompt x - return 5
5


prompt let ones = [1:x]

What am I to do if I want ones set, but not printed?

Jim

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


GHC Win32 ffi functions as implemented for Pugs

2005-05-22 Thread Max Maischein (Corion)

Hello all,

I have been working on Pugs, the current Perl6 interpreter, and have
been hacking on Win32 compatibility. For that, I've written some
wrappers around native Win32 API calls using the very convenient FFI
that GHC 6.4 provides!

I wonder if you want to include the functions in GHC, as they are
missing on Win32. Autrijus Tang pointed me to this list.

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 ()

For some other module:
statFileSize :: FilePath - IO Integer

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

The code implementing them is inefficient and crude, partly because I
speak Haskell with a quite perlish lisp, and partly because I used the
first implementation that worked, so I like to hear about implementing
them in better style, or, even better that you choose to accept them
into GHC so I don't have to worry about them anymore.

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

Hope you find my code useful,
-max

PS: If this message went to the wrong list, please tell me so and also
tell me where the message should go to!

PPS: Please CC me on the replies as I won't stay subscribed long.

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users