Re: [Haskell-cafe] Re: POSIX AIO (asych I/O) ...

2008-07-02 Thread Brandon S. Allbery KF8NH
On 2008 Jul 2, at 1:42, Galchin, Vasili wrote: errno - throwErrnoIfMinus1 aioError (c_aio_error p_aiocb) ghc thinks that Errno should be an instance of Num: System/Posix/Aio.hsc:117:15: No instance for (Num Errno) I expect so it can compare it to -1(throwErrnoIfMinusOne). But

Re: [Haskell-cafe] Re: POSIX AIO (asych I/O) ...

2008-07-02 Thread Jonathan Cast
On Wed, 2008-07-02 at 02:07 -0400, Brandon S. Allbery KF8NH wrote: On 2008 Jul 2, at 1:42, Galchin, Vasili wrote: errno - throwErrnoIfMinus1 aioError (c_aio_error p_aiocb) ghc thinks that Errno should be an instance of Num: System/Posix/Aio.hsc:117:15: No instance for

Re: [Haskell-cafe] Re: POSIX AIO (asych I/O) ...

2008-07-02 Thread Brandon S. Allbery KF8NH
On 2008 Jul 2, at 2:15, Jonathan Cast wrote: It seems as though it can return -1 if given non-sensical input. But in The POSIX spec says it returns EINVAL in that case. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED] system administrator [openafs,heimdal,too

Re: [Haskell-cafe] Re: POSIX AIO (asych I/O) ...

2008-07-02 Thread Jonathan Cast
On Wed, 2008-07-02 at 02:17 -0400, Brandon S. Allbery KF8NH wrote: On 2008 Jul 2, at 2:15, Jonathan Cast wrote: It seems as though it can return -1 if given non-sensical input. But in The POSIX spec says it returns EINVAL in that case. Are you sure? A little googling picks up e.g.

Re: [Haskell-cafe] Re: POSIX AIO (asych I/O) ...

2008-07-02 Thread Galchin, Vasili
Thanks, Brandon!! I understand most of what you say but let me ponder! Kind regards, Vasili On Wed, Jul 2, 2008 at 1:07 AM, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: On 2008 Jul 2, at 1:42, Galchin, Vasili wrote: errno - throwErrnoIfMinus1 aioError (c_aio_error p_aiocb)

Re: [Haskell-cafe] Re: Haskell on ARM (was Re: ANN: Topkata)

2008-07-02 Thread L.Guo
Thanks for sharing your experences. I just tried to port GHC 6.8.3 to my TI Davincci (c6446) board by following the GHC Wiki Building/Porting page [1]. Both arm-compile and cross-compile version have failed unfortunately. So, I turn to try compile an local GHC on linux. It takes me so many time.

[Haskell-cafe] Question about abstraction

2008-07-02 Thread Bas van Dijk
Dear list, I have I question about the following code I was playing with: (you can past the following right into your editor) -- import Data.Foldable (Foldable, foldMap) import Data.Monoid (mempty, mappend) import

Re: [Haskell-cafe] Re: POSIX AIO (asych I/O) ...

2008-07-02 Thread Brandon S. Allbery KF8NH
On 2008 Jul 2, at 2:32, Jonathan Cast wrote: On Wed, 2008-07-02 at 02:17 -0400, Brandon S. Allbery KF8NH wrote: On 2008 Jul 2, at 2:15, Jonathan Cast wrote: It seems as though it can return -1 if given non-sensical input. But in The POSIX spec says it returns EINVAL in that case. Are

[Haskell-cafe] Re: A Monad for on-demand file generation?

2008-07-02 Thread ChrisK
hen, the readFileOD could put the timestamp of the read file in a Monad-local state and the writeFileOD could, if the output is newer then all inputs listed in the state, skip the writing and thus the unsafeInterleaveIO’ed file reads are skipped as well, if they were not required for deciding the

[Haskell-cafe] Unboxed array of product type - product type of unboxed arrays

2008-07-02 Thread Scott Dillard
Hi, I'm trying to extended the standard unboxed array types and array classes to my own product types, for now let's just say (,). So if the proper MArray and IArray instances exist for e and f, then I can make an instance for (e,f). The actual type of that array, something like (UArray i e,

Re: [Haskell-cafe] Re: Haskell on ARM (was Re: ANN: Topkata)

2008-07-02 Thread Don Stewart
Could we start documenting this on the wiki ? It will be interesting to keep track of what we have tried, what attempts failed and why. -- Don leaveye.guo: Thanks for sharing your experences. I just tried to port GHC 6.8.3 to my TI Davincci (c6446) board by following the GHC Wiki

Re: [Haskell-cafe] Unboxed array of product type - product type of unboxed arrays

2008-07-02 Thread Daniel Fischer
Am Mittwoch, 2. Juli 2008 18:48 schrieb Scott Dillard: Hi, I'm trying to extended the standard unboxed array types and array classes to my own product types, for now let's just say (,). So if the proper MArray and IArray instances exist for e and f, then I can make an instance for (e,f). The

Re: [Haskell-cafe] Unboxed array of product type - product type of unboxed arrays

2008-07-02 Thread Scott Dillard
On Wed, Jul 2, 2008 at 11:52 AM, Daniel Fischer [EMAIL PROTECTED] wrote: Perhaps class (Ix i) = UArrClass i e where ... would work? class Ix i = UArrClass i e where data UArr i e unsafeAt_ :: UArr i e - Int - e instance ( IArray UArray e , IArray UArray f , Ix i ) =

[Haskell-cafe] GHC ARM Hackathon (Re: Haskell on ARM )

2008-07-02 Thread Greg Fitzgerald
It may not be long before most of the computing world has gone mobile. CNET suggests the major players will be Qualcomm and Intel, where QC is more power-efficient, but Intel conveniently targets x86. June 29, 2008 7:30 PM PDT Qualcomm vs Intel: You

[Haskell-cafe] Re: GHC ARM Hackathon (Re: Haskell on ARM )

2008-07-02 Thread Greg Fitzgerald
...try that hyperlink again... Qualcomm vs Intel: You decide http://news.cnet.com/8301-13924_3-9979989-64.html On Wed, Jul 2, 2008 at 11:16 AM, Greg Fitzgerald [EMAIL PROTECTED] wrote: It may not be long before most of the computing world has gone mobile. CNET suggests the major players will

[Haskell-cafe] Re: GHC ARM Hackathon (Re: Haskell on ARM )

2008-07-02 Thread Jeremy Shaw
At Wed, 2 Jul 2008 11:16:18 -0700, Greg Fitzgerald wrote: Would anybody be interested in a GHC on ARM Hackathon in San Diego this year? Definitely. (Conveniently, I live in La Jolla). When is 6.10 estimated to come out? Do we really need to wait for it? According to this Release plan, the

[Haskell-cafe] Re: GHC ARM Hackathon (Re: Haskell on ARM )

2008-07-02 Thread Braden Shepherdson
Jeremy Shaw wrote: At Wed, 2 Jul 2008 11:16:18 -0700, Greg Fitzgerald wrote: Would anybody be interested in a GHC on ARM Hackathon in San Diego this year? Definitely. (Conveniently, I live in La Jolla). When is 6.10 estimated to come out? Do we really need to wait for it? According to

[Haskell-cafe] Haskell Weekly News: Issue 75 - July 2, 2008

2008-07-02 Thread Brent Yorgey
--- Haskell Weekly News http://sequence.complete.org/hwn/20080702 Issue 75 - July 02, 2008 --- Welcome to issue 75 of HWN, a newsletter covering

[Haskell-cafe] database 101 question

2008-07-02 Thread Galchin, Vasili
Hello, I have installed the mysql server (mysqld) on my Ubuntu machine. What are the Haskell libraries/components that I will need to write a mysql client?? Kind regards, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] calling setWMHints (expects a CInt, I have an Int)

2008-07-02 Thread Martin DeMello
Could someone give me an example of calling setWMHints from Graphics.X11.Xlib.Extras? The signature is setWMHints :: Display - Window - WMHints - IO Status and WMHints is defined as data WMHints = WMHints { wmh_flags :: CLong wmh_input :: Bool wmh_initial_state :: CInt wmh_icon_pixmap :: Pixmap

Re: [Haskell-cafe] calling setWMHints (expects a CInt, I have an Int)

2008-07-02 Thread Neil Mitchell
Hi Martin, I can't figure out how to convert an Int to a CInt to construct the WMHints Ask Hoogle: http://haskell.org/hoogle/?q=Int+-%3E+CInt And Hoogle says: toEnum, fromIntegral Thanks Neil ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] calling setWMHints (expects a CInt, I have an Int)

2008-07-02 Thread Martin DeMello
On Wed, Jul 2, 2008 at 2:16 PM, Neil Mitchell [EMAIL PROTECTED] wrote: Hi Martin, I can't figure out how to convert an Int to a CInt to construct the WMHints Ask Hoogle: http://haskell.org/hoogle/?q=Int+-%3E+CInt Nice And Hoogle says: toEnum, fromIntegral thanks a lot :) martin

Re: [Haskell-cafe] database 101 question

2008-07-02 Thread Don Stewart
vigalchin: Hello, I have installed the mysql server (mysqld) on my Ubuntu machine. What are the Haskell libraries/components that I will need to write a mysql client?? Check on hackage.haskell.org under the 'database' category. -- Don

Re: [Haskell-cafe] database 101 question

2008-07-02 Thread Galchin, Vasili
Hi Don, I know where to look but I am knew to database architecture. I know there is a driver (whatever that is ... I write device drivers but this is obviously different), backend ??? My question is more generic about what pieces I would need for evenr sqlite3 for example. Vasil On Wed,

[Haskell-cafe] GHC ARM Hackathon (Re: Haskell on ARM )

2008-07-02 Thread Jeremy Apthorp
2008/7/3 Greg Fitzgerald [EMAIL PROTECTED]: Perhaps we should have some sort of GHC on the ARM hackathon when 6.10 comes out Would anybody be interested in a GHC on ARM Hackathon in San Diego this year? I'd be interested, but I live in Sydney, Australia. San Diego's a bit of a stretch :)

[Haskell-cafe] type classes

2008-07-02 Thread Cotton Seed
Hi everyone, I'm working on a computational algebra program and I've run into a problem. In my program, I have types for instances of algebraic objects, e.g. ZModN for modular integers, and types for the objects themselves, e.g. ZModNTy for the ring of modular integers. Now, I want to subclass

Re: [Haskell-cafe] type classes

2008-07-02 Thread Dan Doel
On Wednesday 02 July 2008, Cotton Seed wrote: Hi everyone, I'm working on a computational algebra program and I've run into a problem. In my program, I have types for instances of algebraic objects, e.g. ZModN for modular integers, and types for the objects themselves, e.g. ZModNTy for the

Re: [Haskell-cafe] type classes

2008-07-02 Thread Cotton Seed
Hi Dan, Thanks! This is exactly what I was looking for. Cotton On Wed, Jul 2, 2008 at 9:57 PM, Dan Doel [EMAIL PROTECTED] wrote: On Wednesday 02 July 2008, Cotton Seed wrote: Hi everyone, I'm working on a computational algebra program and I've run into a problem. In my program, I

Re: [Haskell-cafe] Re: POSIX AIO (asych I/O) ...

2008-07-02 Thread Galchin, Vasili
Hi Brandon, Most of what you say makes sense. However, at some places in your narrative aren't you mixing up my aioError and aioReturn?(or aio_error and aio_return, respectively). E.g. aioReturn should return the byte count and not errno? If you want to stick close to the C interface:

Re: [Haskell-cafe] database 101 question

2008-07-02 Thread Henning Thielemann
On Wed, 2 Jul 2008, Galchin, Vasili wrote: Hi Don, I know where to look but I am knew to database architecture. I know there is a driver (whatever that is ... I write device drivers but this is obviously different), backend ??? My question is more generic about what pieces I would need

Re: [Haskell-cafe] type classes

2008-07-02 Thread Henning Thielemann
On Wed, 2 Jul 2008, Cotton Seed wrote: Hi everyone, I'm working on a computational algebra program and I've run into a problem. In my program, I have types for instances of algebraic objects, e.g. ZModN for modular integers, and types for the objects themselves, e.g. ZModNTy for the ring of