As a side note, I think a direct superclass of Functor for Monad is not
a good idea, just sayin'
class Functor f where
fmap :: (a -> b) -> f a -> f b
class Functor f => Apply f where
(<*>) :: f (a -> b) -> f a -> f b
class Apply f => Bind f where
(=<<) :: (a -> f b) -> f a -> f b
class Ap
Thanks guys for the clarification, this blowed my mind a bit :P
As far as I understood, is that my initial thought about Sum and Product
was wrong; in fact, they don't even participate to the party!
This is confirmed by the Oleg's paradox about (-).
What really happens is that Endo (which I guess i
On Tue, Oct 16, 2012 at 9:37 PM, AUGER Cédric wrote:
> As I said, from the mathematical point of view, join (often noted μ in
> category theory) is the (natural) transformation which with return (η
> that I may have erroneously written ε in some previous mail) defines a
> monad (and requires some
> From: Alfredo Di Napoli
> Subject: [Haskell-cafe] A clarification about what happens under the
> hoodwith foldMap
>
> I'm sure I'm missing a point, but the "minimum" definition for a Foldable
> instance is given in terms of foldMap, so I get the cake for free, foldr
> included, right
On Tue, Oct 23, 2012 at 5:03 PM, "José A. Lopes" wrote:
> Hey everyone,
>
> I changed my code I now I get the following error message
> Main: thread blocked indefinitely in an MVar operation
>
> Before the change, I was using the State monad with runState.
> Then, I changed the code to use the
Hey everyone,
I changed my code I now I get the following error message
Main: thread blocked indefinitely in an MVar operation
Before the change, I was using the State monad with runState.
Then, I changed the code to use the StateT monad transformer wrapped
around IO monad and runStateT.
A
On Tue, Oct 23, 2012 at 1:53 AM, Myles C. Maxfield
wrote:
> Is there a better way to make this algorithm discoverable?
How about deprecation pragmas?
http://www.haskell.org/ghc/docs/7.2.2/html/users_guide/pragmas.html
--
gwern
http://www.gwern.net
__
Hello -cafe,
There's a very cool Haskell job opening at Functor AB, involving some cool
type theory, for use in nuclear fusion research.
You can read about it here:
http://alpmestan.com/posts/2012-10-23-haskell-job-opening-at-functor.html
--
Alp Mestanogullari
__
Hi,
I can't say anything about HSQL, but I use HDBC and I'm happy with it.
[1] says it's the most popular database for Haskell.
Best, Daniel
[1] http://en.wikibooks.org/wiki/Haskell/Database
Am 10/23/12 4:21 PM, schrieb Johannes Waldmann:
Hi.
I am using hsql-(mysql-)1.8.2
When compiled wit
Thanks guys,
I'll work my way through Oleg's paradox as well as what you just said
Chaddai.
I'm very busy right now, but I'll probably come back to you tomorrow
morning, when I'll have an hour to think freely :)
Cheers,
A.
___
Haskell-Cafe mailing list
H
Hi.
I am using hsql-(mysql-)1.8.2
When compiled with ghc-7.6, the resulting executable
does not seem to be able to read strings from the DB correctly
(umlauts do "vanish")
while it worked with hsql-(mysql-)1.8.1 and ghc-7.4.
the mysql server says (show variables)
| character_set_client
On Thu, Oct 18, 2012 at 11:49:08PM +0530, niket wrote:
> I am a novice in Haskell but I would love to see the gurus out here
> teaching Haskell on MOOCs like Coursera or Udacity.
>
> Dr Martin Odersky is doing it for Scala here:
> https://www.coursera.org/course/progfun
>
> I would love to see Ha
On Tue, Oct 23, 2012 at 10:36 AM, Alfredo Di Napoli
wrote:
> I'm sure I'm missing a point, but the "minimum" definition for a Foldable
> instance is given in terms of foldMap, so I get the cake for free, foldr
> included, right?
> In the example I have defined my treeSum as:
>
> treeSum = Data.Fol
> I was playing with the classic example of a Foldable structure: Trees.
> So the code you can find both on Haskell Wiki and LYAH is the following:
>
> data Tree a = Empty | Node (Tree a) a (Tree a) deriving (Show, Eq)
>
> instance Foldable Tree where
> foldMap f Empty = mempty
> foldMap f
-- Forwarded message --
From: Alfredo Di Napoli
Date: 23 October 2012 10:35
Subject: Re: [Haskell-cafe] A clarification about what happens under the
hood with foldMap
To: Chaddaï Fouché
I'm sure I'm missing a point, but the "minimum" definition for a Foldable
instance is given i
Andreas Abel wrote:
> I tell them that monads are for sequencing effects; and the
> sequencing is visible clearly in
>
>(>>) :: IO a -> IO b -> IO b
>(>>=) :: IO a -> (a -> IO b) -> IO b
>
> but not in
>
>fmap :: (a -> b) -> IO a -> IO b
>join :: IO (IO a) -> IO a
Indeed! I'd lik
Le 23 oct. 2012 09:54, "Alfredo Di Napoli" a
écrit :
>
> What this code does is straighforward. I was struck from the following
sentences in LYAH:
>
>> Notice that we didn't have to provide the function that takes a value
and returns a monoid value.
>> We receive that function as a parameter to fo
> And HList paper left me with two questions. The first one is how much
> such an encoding costs both in terms of speed and space. And the
> second one is can I conveniently define a Storable instance for
> hlists. As I said before, I need all this machinery to parse a great
> number of serialized
Hi Cafe,
I was playing with the classic example of a Foldable structure: Trees.
So the code you can find both on Haskell Wiki and LYAH is the following:
data Tree a = Empty | Node (Tree a) a (Tree a) deriving (Show, Eq)
instance Foldable Tree where
foldMap f Empty = mempty
foldMap f (Nod
The last revision of the encoding package (0.6.7.1) was uploaded 6
days ago, so it's certainly not old. The package is also not
unwieldly: the functions (runPut . encode punycode) and (runGet
(decode punycode)) are equivalent to my 'encode' and 'decode'
functions. In addition, it supports many more
20 matches
Mail list logo