[Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-24 Thread Magicloud Magiclouds
Hi, I am writing a small program using LDAP hackage. A weird problem occured. When the code was run by runhaskell, things were fine, worked as expected. But when ghc compiled (no any args), and ran, I got this: LDAP error: ldapSimpleBind: LDAPException LdapServerDown(-1): Can't contact LDAP s

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-24 Thread Vincent Ambo
Can you paste your code somewhere? I'm using the LDAP package at work (for authenticating a Yesod app) and a quick test of the basic LDAP package in GHCi works for me: λ> import LDAP λ> ldap <- ldapInit "10.0.0.12" ldapPort λ> ldapSimpleBind ldap "geva" "**" λ> let desiredAttr = LDAPAtt

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-24 Thread Magicloud Magiclouds
Hi there, The code could not be simpler. Just ldapInit, ldapSimpleBind. I just found that the code works with ghci, too. So to sum up, ghci/runhaskell works, ghc not. On Thu, May 24, 2012 at 8:15 PM, Vincent Ambo wrote: > Can you paste your code somewhere? I'm using the LDAP package at work (

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-24 Thread Thomas DuBuisson
If it is simple then please paste it somewhere. Perhaps stackoverflow would be a better medium for this discussion. -Thomas On Thu, May 24, 2012 at 8:05 PM, Magicloud Magiclouds wrote: > Hi there, > The code could not be simpler. Just ldapInit, ldapSimpleBind. > I just found that the code wor

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-24 Thread Brandon Allbery
On Thu, May 24, 2012 at 11:05 PM, Magicloud Magiclouds < magicloud.magiclo...@gmail.com> wrote: > Hi there, > The code could not be simpler. Just ldapInit, ldapSimpleBind. > I just found that the code works with ghci, too. So to sum up, > ghci/runhaskell works, ghc not. A possibility that occu

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-24 Thread Magicloud Magiclouds
Versions: libldap2 2.4.28 LDAP 0.6.6 ghc 7.4.1 Code below: import LDAP main :: IO () main = do let domain = "vancloa.cn" bindDN = "CN=wangshida.admin,OU=admin_accounts,DC=vancloa,DC=cn" bindPW = "" baseDN = Just "DC=vancloa,DC=cn" ldapFilter = Just ("(&(sAMAccou

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-25 Thread Chris Dornan
on GHC-7.4.1, and maybe the others haven’t either.) Chris From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Brandon Allbery Sent: 25 May 2012 04:21 To: Magicloud Magiclouds Cc: Haskell-Cafe Subject: Re: [Haskell-cafe] What is the difference

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-27 Thread Magicloud Magiclouds
ery > Sent: 25 May 2012 04:21 > To: Magicloud Magiclouds > Cc: Haskell-Cafe > Subject: Re: [Haskell-cafe] What is the difference between runhaskell and > compile? > > > > On Thu, May 24, 2012 at 11:05 PM, Magicloud Magiclouds > wrote: > > Hi there, >  The cod

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-27 Thread Chris Dornan
10:12 To: Chris Dornan Cc: Brandon Allbery; Haskell-Cafe Subject: Re: [Haskell-cafe] What is the difference between runhaskell and compile? Hi, Sorry for the delayed reply. I am using ghc 7.4.1 and LDAP 0.6.6. When you said "configuration of the OpenLDAP client library", may I

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-27 Thread Ozgun Ataman
about? (I don’t think I have tested this on GHC-7.4.1, and maybe the others >> haven’t either.) >> >> >> >> Chris >> >> >> >> >> >> From: haskell-cafe-boun...@haskell.org >> [mailto:haskell-cafe-boun...@haskell.org]

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-27 Thread Magicloud Magiclouds
om: Magicloud Magiclouds [mailto:magicloud.magiclo...@gmail.com] > Sent: 27 May 2012 10:12 > To: Chris Dornan > Cc: Brandon Allbery; Haskell-Cafe > Subject: Re: [Haskell-cafe] What is the difference between runhaskell and > compile? > > Hi, >  Sorry for the delayed reply. I am

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-27 Thread Magicloud Magiclouds
t;> >> Chris >> >> -Original Message- >> From: Magicloud Magiclouds [mailto:magicloud.magiclo...@gmail.com] >> Sent: 27 May 2012 10:12 >> To: Chris Dornan >> Cc: Brandon Allbery; Haskell-Cafe >> Subject: Re: [Haskell-cafe] What is the d

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-28 Thread Chris Dornan
> Sorry for the wrong information. I made a mistake when did the test. > After more testing, I think it is a bug of ghc 7.4.1. Until now, I cannot > find a way to make ghc 7.4.1 compiled binary work. It sounds like this should be looked at further. Somebody should verify try to repeat what you

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-28 Thread Chris Dornan
> Sorry for the wrong information. I made a mistake when did the test. > After more testing, I think it is a bug of ghc 7.4.1. Until now, I cannot > find a way to make ghc 7.4.1 compiled binary work. I have set up this test on 7.4.1 and I cannot recreate the problem -- compiling and running an e

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-28 Thread Magicloud Magiclouds
Interesting. I have this code tested in Debian unstable/stable, CentOS 6.1, all 64 bit, with two different version of libldap2. At first, Debian-s were installed with 7.4.1, CentOS with 7.2.2. Only in CentOS the code connected after compiled. Then I removed 7.4.1 from Debian stable and installed 7.

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-29 Thread Chris Dornan
On 29 May 2012 02:21, Magicloud Magiclouds wrote: > Interesting. I have this code tested in Debian unstable/stable, CentOS > 6.1, all 64 bit, with two different version of libldap2. > At first, Debian-s were installed with 7.4.1, CentOS with 7.2.2. Only > in CentOS the code connected after compile

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-29 Thread Chris Dornan
I will send the header and object files off list. Here is the test program I am using: import LDAP main :: IO () main = do putStrLn "domain>" domain <- getLine putStrLn "bindDN>" bindDN <- getLine putStrLn "bindPW>" bindPW <- getLine putStrLn

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-29 Thread Magicloud Magiclouds
A little information. I did not notice the gcc/binutils versions. But in CentOS, the ghc 7.2.2/7.4.1 were all compiled myself with all default configurations. On Tue, May 29, 2012 at 10:54 PM, Chris Dornan wrote: > On 29 May 2012 02:21, Magicloud Magiclouds > wrote: >> Interesting. I have this c

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-07-11 Thread Magicloud Magiclouds
ing the problem. >> >> Did you try to running the variants that read address, account and passwords >> from standard input? Did it show the same perverse behaviour? >> >> Chris >> >> >> >> >> >> -Original Message- >> From: Magicloud Magic

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-07-11 Thread Magicloud Magiclouds
gt;>> >>> -Original Message- >>> From: Magicloud Magiclouds [mailto:magicloud.magiclo...@gmail.com] >>> Sent: 01 June 2012 02:01 >>> To: Chris Dornan >>> Subject: Re: [Haskell-cafe] What is the difference between runhaskell and >&g

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-07-16 Thread Magicloud Magiclouds
e big difference here is: the failed one sent unbindRequest before >>>> got bindResponse success. >>>> Just a clue, I have no idea what is going on >>>> >>>> On Fri, Jun 1, 2012 at 5:17 PM, Chris Dornan wrote: >>>>> No problem -- I have at

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-07-16 Thread Lars Viklund
On Thu, Jul 12, 2012 at 09:41:43AM +0800, Magicloud Magiclouds wrote: > Sorry for the attachments. They are wireshark files. May I suggest not sending multi-megabyte files of limited interest down a widely subscribed list? Contrary to popular belief, bandwidth, time and spool storage isn't free.

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-07-16 Thread Magicloud Magiclouds
Sorry for that. The problem got solved yesterday. On Mon, Jul 16, 2012 at 6:01 PM, Lars Viklund wrote: > On Thu, Jul 12, 2012 at 09:41:43AM +0800, Magicloud Magiclouds wrote: >> Sorry for the attachments. They are wireshark files. > > May I suggest not sending multi-megabyte files of limited inte