Re: [Haskell-cafe] IO (Either a Error) question

2010-05-02 Thread Eugene Dzhurinsky
On Sat, May 01, 2010 at 02:42:26PM -0700, Ryan Ingram wrote: Check out ErrorT in Control.Monad.Error :t ErrorT ErrorT :: m (Either e a) - ErrorT e m a At this point I am lost. I'm not sure that I do understand this type transformation correctly. So we have some sort of monadic type m, error

Re: [Haskell-cafe] IO (Either a Error) question

2010-05-06 Thread Eugene Dzhurinsky
On Wed, May 05, 2010 at 02:54:27PM -0700, Ryan Ingram wrote: ErrorT is just a newtype wrapper, changing the order/application of the type variables. newtype ErrorT e m a = ErrorT (m (Either e a)) runErrorT (ErrorT action) = action This gives the bijection: ErrorT :: m (Either e a) -

Re: [Haskell-cafe] posting UTF8 data with Curl library

2010-05-06 Thread Eugene Dzhurinsky
On Wed, May 05, 2010 at 11:15:05PM +0200, Daniel Fischer wrote: It's the same type, so you can encode it using Data.ByteString.UTF8 and send it over the network as a plain old ByteString. On the receiving end, you read it as a plain ByteString and then interpret it as a utf-8 encoded

Re: [Haskell-cafe] IO (Either a Error) question

2010-05-06 Thread Eugene Dzhurinsky
On Thu, May 06, 2010 at 10:05:05AM +0200, David Virebayre wrote: A constructor can be seen as a function that takes some parameters and produces a value for example with the type Maybe a, which has 2 constructors ; Just and Nothing : Prelude :t Just Just :: a - Maybe a the

[Haskell-cafe] Getting a string from url-converted UTF8 input

2010-05-16 Thread Eugene Dzhurinsky
=== which is wrong. So what do I miss in encoding the data in UTF? Thank you in advance! -- Eugene Dzhurinsky pgpUPu4ndYSxU.pgp Description: PGP signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] Getting a string from url-converted UTF8 input

2010-05-16 Thread Eugene Dzhurinsky
, it really did help. Unfortunately, there's no port of GHC 6.12 available for FreeBSD now, so I used System.IO.UTF8 -- Eugene Dzhurinsky pgp4pa7EBeen7.pgp Description: PGP signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Getting a string from url-converted UTF8 input

2010-05-17 Thread Eugene Dzhurinsky
On Sun, May 16, 2010 at 06:55:33PM +0200, Daniel Fischer wrote: Is there any problem compiling from source on FreeBSD? Well, good question :) After I tried to find some sources, I realized that there are http://www.haskell.org/ghc/download_ghc_6_12_2.html#freebsd -- Eugene N Dzhurinsky

[Haskell-cafe] CURL and threads

2010-02-17 Thread Eugene Dzhurinsky
Hello, all! Can somebody please explain, what is the best way of using CURL with several threads? I wrote simple client, which tries to authenticate against HTTP server. With running this client, it starts to eat memory insanely (and I know this code is far, far away of even being close to be

[Haskell-cafe] listing mountpoints and getting their properties in Haskell

2010-02-27 Thread Eugene Dzhurinsky
Hello! I need to list all currently mounted filesystems and get some stats like total space, free space, mount point and physical device. Is there any library capable of obtaining such information from OS itself? Parsing output of 'df' is locale-dependent and error-prone (because of locale

[Haskell-cafe] XMonad.Shell.Prompt and unicode input

2012-01-24 Thread Eugene Dzhurinsky
Hello, community! I have some strange issue with recent XMonad: with using of standard Shell module it is not possible to use unicode input. It simply freezes up and in console I can observe: Enum.toEnum{Word8} : tag (1092) is outside of bounds (0,255). What function may cause such error

[Haskell-cafe] Reader monad, refactoring and missing the point all at once

2012-05-02 Thread Eugene Dzhurinsky
Hi all! Last day I was trying to fix idiii library, because it uses utf8 for parsing non-unicode content. I found the functions -- | Parses one value and returns it as a 'String' parseString :: CharEncoding - TagParser String parseString enc = do v - case enc of 0x01 -

[Haskell-cafe] Linking against Sqlite3 on Windows problem

2012-07-09 Thread Eugene Dzhurinsky
Hi all! I created simple application, which uses sqlite3 as it's datastore back-end. I faced no problems when building and running it on Linux, but after I tried to build it on Windows, I see weird linking error: Linking dist\build\hnotes\hnotes.exe ... C:\Documents and

[Haskell-cafe] linking Haskell app with Curl on Windows

2012-08-16 Thread Eugene Dzhurinsky
Hi! I'm facing strange issue with linking my application against Curl (using Haskell Curl binding curl-1.3.7): the application compiles well, but fails on linking stage: = C:\haskell\bin\ghc.exe --make -o