[Haskell-cafe] Regarding simple xml string parser code review

2012-04-02 Thread rajendra prasad
Hi, I am trying to fetch the values under tags in an xml string given the tag string and xml string. Actually, I don't want to use xml parser since I need to parse very small xml strings. Also, I dont want to use anything else other than haskell platform. I wrote some routines and want to know whe

Re: [Haskell-cafe] Regarding Haskell FFI

2012-03-28 Thread rajendra prasad
c08d1ea<http://hackage.haskell.org/trac/ghc/changeset/d146fdbbf8941a8344f0ec300e79dbeabc08d1ea> > > Cheers, >Simon > > > > On 28/03/2012 09:57, rajendra prasad wrote: > >> Hi, >> >> I am using GHC version 7.0.4. >> >> Thanks,

Re: [Haskell-cafe] Regarding Haskell FFI

2012-03-28 Thread rajendra prasad
Hi, I am using GHC version 7.0.4. Thanks, Rajendra On Wed, Mar 28, 2012 at 2:09 PM, Simon Marlow wrote: > On 27/03/2012 08:56, rajendra prasad wrote: > >> Hi, >> >> I am trying to load the DLL(Wrapper.dll) in my code(Main.hs). When I am >> placing the dll in

[Haskell-cafe] Regarding Haskell FFI

2012-03-27 Thread rajendra prasad
Hi, I am trying to load the DLL(Wrapper.dll) in my code(Main.hs). When I am placing the dll in local directory, I am able to load it through following command: ghci Main.hs -L. -lWrapper But, I am not able to load it if I am putting it in some other directory(../../bin). I used the following co

Re: [Haskell-cafe] Regarding Haskell FFI for C/C++ (Passing of String)

2012-03-27 Thread rajendra prasad
tml >> ) >> Hope that helps. >> >> Le 22 mars 2012 15:10, rajendra prasad a >> écrit : >> >>> Hi, >>> >>> I have just started learning Haskell FFI. I am trying to send a string >>> from hastell to a C function. For this, I

[Haskell-cafe] Regarding Haskell FFI for C/C++ (Passing of String)

2012-03-22 Thread rajendra prasad
Hi, I have just started learning Haskell FFI. I am trying to send a string from hastell to a C function. For this, I am required to convert the haskell string to byte string. I have two methods to achieve this task. Both are listed below: 1) import Foreign.C.String let arg1 = map castCharToCC

Re: [Haskell-cafe] Unable to call function from DLL using FFI

2012-03-14 Thread rajendra prasad
7:43 PM > Subject: Re: [Haskell-cafe] Unable to call function from DLL using FFI > To: haskell-cafe@haskell.org > > > On 14/03/12 14:01, rajendra prasad wrote: > >> My c++ code(HelloWorld.cpp) looks like this: >> > > Try adding extern "C" { ... } to use

[Haskell-cafe] Unable to call function from DLL using FFI

2012-03-14 Thread rajendra prasad
Hi, I am new to Haskell and I need to call a c function by loading dynamic link library in Haskell. I started with very simple code to create a dll in visual studio 2008 and then trying to load it in haskell. I am listing here the steps I follwed to achieve this: *Step 1: * My c++ code(HelloWorld