Hello, everybody!
I am trying to develop some sort of library, which supposed to sign into a WEB
service, then perform some requests with it.
Initially I designed methods in the following way
data DServError = InvalidCredentials | InvalidRequest | ...
newtype Result a = Result { getOpResult ::
On Tue, May 25, 2010 at 10:46:47PM +0100, Stephen Tetley wrote:
Hi Eugene
You can store different things in a Map by collecting them with a
simple 'sum' type:
Hello, Stephen!
The records to be stored into a Map are not related to each other. So wrapping
them into another type is not very
Hello, all!
I'm trying to create set of polymorphic functions for working with custom
containers. I decided to try out typeclass and define generic function, which
uses the methods from the typeclass. The quick and naive solution is listed
below:
On Tue, May 25, 2010 at 07:59:24PM +0100, Stephen Tetley wrote:
Hi Eugeny
Its not that GHC thinks you're doing something weird, but that there
is no relation between the type parameters in the Storage class. You
could use either functional dependencies or type families to introduce
a
Hello, All!
I need some help to solve the following task:
=
import Data.Map as M
import Data.List as L
data Pair = Pair { name, value :: String }
type IxPair = (Int, String, String)
type
On Thu, May 13, 2010 at 04:43:26PM +0100, Stephen Tetley wrote:
Hi Eugene
You don't need to supply all the arguments to a constructor at once:
makeWithOne :: String - (String - String - Object)
makeWithOne s1 = \s2 s3 - Object s1 s2 s3
-- or even:
-- makeWithOne s1 = Object s1
This
On Thu, May 13, 2010 at 07:15:22PM +0100, Stephen Tetley wrote:
On 13 May 2010 19:14, Stephen Tetley stephen.tet...@gmail.com wrote:
Hi Eugene
Hi Eugeny
Whoops - apologies for the the name change...
In fact it doesn't make any difference, so both these names are equal :)
--
Eugene
On Thu, May 13, 2010 at 07:14:25PM +0100, Stephen Tetley wrote:
Hi Eugene
Is something like this close to what you want:
Not really. First of all, there're many properties, not 3. So it may end up
with plenty of support (boilerplate) code.
Also, names of these parameters are not sortable. Of
On Thu, May 13, 2010 at 09:03:48PM +0200, Daniel Fischer wrote:
so if it is possible to have partially initialized objects in Haskell,
If the fields aren't strict, there's no problem having
...
Wow! Thank you, that's it :)
--
Eugene Dzhurinsky
pgpPXFjii1ixC.pgp
Description: PGP signature
Hello!
I need to submit data to HTTP server using UTF8 encoding. I found out that
libcurl for haskell can work with Data.ByteString - but it seems not able to
work with Data.ByteString.UTF8.
Can you please advice, how do I convert Data.ByteString.UTF8 into
Data.ByteString and visa versa?
Thank
Hello!
I have some sort of strange question:
assume that there are 2 functions
func1 :: Int - IO (Either Error String)
func2 :: String - IO (Either Error [String])
in case if there will be no IO involved, I could use
Control.Monad.Either and write something like
runCalc :: Int - IO (Either
On Wed, Feb 17, 2010 at 07:34:07PM +0200, Eugene Dzhurinsky wrote:
Hopefully, someone could help me in overcoming my ignorance :)
I realized that I can share the same Chan instance over all invocations in
main, and wrap internal function into withCurlDo to ensure only one IO action
gets executed
12 matches
Mail list logo