Re: [Haskell-cafe] trying to use unix's openFD ..

2008-01-30 Thread Galchin Vasili
MY bad!!! I was trying to open "/dev/cdrom/" and not "dev/cdrom"!!! and hence "/dev/cdrom/" was correctly treated as a directory ... Vasili On Jan 30, 2008 11:25 PM, Brandon S. Allbery KF8NH <[EMAIL PROTECTED]> wrote: > > On Jan 30, 2008, at 23:23 , Galchin Vasili wrote: > > > I am trying to do

Re: [Haskell-cafe] trying to use unix's openFD ..

2008-01-30 Thread Brandon S. Allbery KF8NH
On Jan 30, 2008, at 23:23 , Galchin Vasili wrote: I am trying to do the following on RedHat RHEL 5.0: main = do fs <- openFd "/dev/cdrom" ReadOnly (Just ???) defaultFileFlags putStrLn (show fd) what should (Just ???) be ??? I think you can pass Nothing instead of a Just, since that

Re: [Haskell-cafe] trying to use unix's openFD ..

2008-01-30 Thread Galchin Vasili
i.e. only the Linux CDROM device driver in read-only mode V. On Jan 30, 2008 11:23 PM, Galchin Vasili <[EMAIL PROTECTED]> wrote: > I am trying to do the following on RedHat RHEL 5.0: > > main = do > fs <- openFd "/dev/cdrom" ReadOnly (Just ???) defaultFileFlags > putStrLn (show fd) >

Re: [Haskell-cafe] trying to use unix's openFD ..

2008-01-30 Thread Galchin Vasili
I am trying to do the following on RedHat RHEL 5.0: main = do fs <- openFd "/dev/cdrom" ReadOnly (Just ???) defaultFileFlags putStrLn (show fd) what should (Just ???) be ??? Regards, Vasili On Jan 30, 2008 11:10 PM, Brandon S. Allbery KF8NH <[EMAIL PROTECTED]> wrote: > > On Jan 30, 200

Re: [Haskell-cafe] trying to use unix's openFD ..

2008-01-30 Thread Brandon S. Allbery KF8NH
On Jan 30, 2008, at 23:05 , Galchin Vasili wrote: Hello, The signature for openFD is openFd: FilePath -> OpenMode -> Maybe FileMode -> OpenFileFlags -> IO Fd I am currently reading http://www.haskell.org/ghc/docs/latest/html/ libraries/

[Haskell-cafe] trying to use unix's openFD ..

2008-01-30 Thread Galchin Vasili
Hello, The signature for openFD is openFd: FilePath -> OpenMode -> Maybe FileMode -> OpenFileFlags -> IO Fd I am currently reading http://www.haskell.org/ghc/docs/latest/html/libraries/unix/System-Posix-Files.html and diving down into links