On 02/07/10 22:41, Gregory Crosswhite wrote:
On 7/2/10 5:16 AM, Vincent Hanquez wrote:
It's necessary in my case since i receive chunks of data to be hashed
from the
network, and I don't want to carry a buffer of data (with potential
security
issues), until i can hash everything.
As an
On Fri, Jul 02, 2010 at 11:01:17AM -0400, Brandon S Allbery KF8NH wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 7/2/10 07:23 , Vincent Hanquez wrote:
I'm not sure exactly what the API would looks like, but I think basically
you
would enter/leave the state monad quite
On Wed, 23 Jun 2010 00:14:03 -0700, Simon Peyton-Jones simo...@microsoft.com
wrote:
I'm interested in situations where you think fundeps work and type families
don't. Reason: no one knows how to make fundeps work cleanly with local type
constraints (such as GADTs).
Simon,
I have run into
Walt Rorie-Baety black.m...@gmail.com writes:
My work environment is what I'd call typical US corporate - IRC nodes are
blocked, but I can use a web-based client to access it.
I solve these kinds of problems by routing stuff through an SSH
connection to an outside server - which isn't blocked,
* Vasili I. Galchin vigalc...@gmail.com [2010-07-02 23:51:09-0500]
Hello,
Suppose I have the following fragment of a posting:
Message: 3
Date: Fri, 2 Jul 2010 12:32:43 -0500
From: aditya siram aditya.si...@gmail.com
Subject: Re: [Haskell-cafe] How easy is it to hire Haskell
Prelude :t id :: Eq b = b - b
id :: Eq b = b - b :: (Eq b) = b - b
Prelude id :: Eq b = b - b
interactive:1:0:
No instance for (Show (b - b))
arising from a use of `print' at interactive:1:0-19
Possible fix: add an instance declaration for (Show (b - b))
In a stmt of a
If you use the uu-parsing libraries you will get a breadth-first search,
instead of a non-backtrcaking depth-first search of Parsec; furthermore you do
not suffer from space leaks and get your results online. In addition you get
error correction, with high-quality error messages.
The
On 3 Jul 2010, at 03:39, Don Stewart wrote:
ivan.miljenovic:
Hmm, interesting. Applicative and Traversable are two classes I've never
used and don't really understand the purpose of. I have no idea what
hsc2hs is. I keep hearing finger trees mentioned, but only in connection
to papers
Don Stewart wrote:
So I guess that means that I don't count
as a knowledgable Haskell programmer. :-(
RWH is free and online, and covers many useful things. There's no
excuse :-)
I was about to say yeah, but RWH isn't that good - and then I noticed
who I'm speaking to. ;-)
So hsc2hs is related to writing C bindings? Well, that'll be why I've
never heard of it then; I don't understand C. (Nor do I particularly
want to... I chose Haskell.)
Besides, why in the world do Haskell libraries have to involve C? I've
written and released several libraries on
On Sat, Jul 3, 2010 at 12:30 PM, Chris BROWN chr...@cs.st-andrews.ac.uk wrote:
So hsc2hs is related to writing C bindings? Well, that'll be why I've
never heard of it then; I don't understand C. (Nor do I particularly
want to... I chose Haskell.)
Besides, why in the world do Haskell
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 7/3/10 05:22 , Andrew Coppin wrote:
Besides, why in the world do Haskell libraries have to involve C? I've
written and released several libraries on Hackage, none of which are in any
way related to C. Not every library is just a C binding, you
Brandon S Allbery KF8NH wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 7/3/10 05:22 , Andrew Coppin wrote:
Besides, why in the world do Haskell libraries have to involve C? I've
written and released several libraries on Hackage, none of which are in any
way related to C. Not every
Andrew Coppin andrewcop...@btinternet.com writes:
Don Stewart wrote:
So I guess that means that I don't count as a knowledgable Haskell
programmer. :-(
RWH is free and online, and covers many useful things. There's no
excuse :-)
I was about to say yeah, but RWH isn't
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 7/3/10 05:57 , Andrew Coppin wrote:
Agreed. So let me rephrase: Why should _every_ Haskell library involve C? ;-)
Who says they do, or should? AFAIK it's only done for the reasons I
mentioned (or, sometimes, for library compatibility; a native
Hello Andrew,
Saturday, July 3, 2010, 1:57:22 PM, you wrote:
(I suppose I'm just bitter because any Haskell libraries involving C are
almost guaranteed to not work on Windows...)
haskell code is easily ported between OSes, unlike C one. when i
ported my application from Win to Linux, i spend
On 3 Jul 2010, at 11:04, Brandon S Allbery KF8NH wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 7/3/10 05:57 , Andrew Coppin wrote:
Agreed. So let me rephrase: Why should _every_ Haskell library involve C? ;-)
Who says they do, or should?
Dons rather implied it... The
Brandon S Allbery KF8NH wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 7/3/10 05:57 , Andrew Coppin wrote:
Agreed. So let me rephrase: Why should _every_ Haskell library involve C? ;-)
Who says they do, or should?
Don, a few emails ago.
Personally, I agree with you -
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 7/3/10 06:12 , Thomas Davie wrote:
On 3 Jul 2010, at 11:04, Brandon S Allbery KF8NH wrote:
Who says they do, or should?
Dons rather implied it... The suggestion is that someone who hasn't used
hsc2hs is an inexperienced Haskeller... I'd bet
Brandon S Allbery KF8NH allb...@ece.cmu.edu writes:
On 7/3/10 05:57 , Andrew Coppin wrote:
Agreed. So let me rephrase: Why should _every_ Haskell library involve C? ;-)
Who says they do, or should? AFAIK it's only done for the reasons I
mentioned (or, sometimes, for library compatibility; a
Hi,
Am Samstag, den 03.07.2010, 11:15 +0100 schrieb Andrew Coppin:
(That would suggest that Haskell is kind of a pointless exercise...)
Haskell provides pointless exercises, but even these are not pointless.
(SCNR)
Joachim
--
Joachim nomeata Breitner
mail: m...@joachim-breitner.de | ICQ#
Greetings anyone,
Some time ago I with a friend of mine implemented a toy interactive
simulator of neural network activity. It has a totally imperative design
and uses Gtk2hs for user interface parts.
The darcs repository is available here:
http://vyal.ru/code/spiking_neuro
Now we decided
Bulat Ziganshin bulat.zigans...@gmail.com writes:
haskell code is easily ported between OSes, unlike C one. when i
ported my application from Win to Linux, i spend one day on haskell
code and 3 days on C one, despite the fact that haskell code dealed
with OS interaction and C used purely for
Hi all,
I have some incorrect Read instance make i got error Prelude.read: no
parse, and i don't know how to fix it.
-- code start --
newtype SerializedWindow = SerializedWindow (Maybe DrawWindow)
instance Show SerializedWindow where
Mihai Maruseac mihai.marus...@gmail.com writes:
As a matter of fact, all of my Haskell codes didn't even touch monads.
I always tried to write code as simple as possible and as
understandable as possible (mainly for teaching purposes) and not as
optimized as possible.
I take it you don't use
Andy Stewart lazycat.mana...@gmail.com writes:
Hi all,
I have some incorrect Read instance make i got error Prelude.read: no
parse, and i don't know how to fix it.
newtype SerializedWindow = SerializedWindow (Maybe DrawWindow)
instance Show SerializedWindow where
show _ =
Ivan Lazar Miljenovic ivan.miljeno...@gmail.com writes:
Andy Stewart lazycat.mana...@gmail.com writes:
Hi all,
I have some incorrect Read instance make i got error Prelude.read: no
parse, and i don't know how to fix it.
newtype SerializedWindow = SerializedWindow (Maybe DrawWindow)
And conversely, someone who have made a C-to-Haskell binding may not be a
Haskell guru.
What about Arrows: do you think one should master them so that he could be
regarded as experienced?
It's kind of hard to put a border between casual Haskell and skilled
Haskell, since it's a very wide language
Hello Ivan,
Saturday, July 3, 2010, 3:24:34 PM, you wrote:
haskell code is easily ported between OSes, unlike C one. when i
ported my application from Win to Linux, i spend one day on haskell
code and 3 days on C one, despite the fact that haskell code dealed
with OS interaction and C used
Yves Parès limestr...@gmail.com writes:
And conversely, someone who have made a C-to-Haskell binding may not be a
Haskell guru.
What about Arrows: do you think one should master them so that he could be
regarded as experienced?
It's kind of hard to put a border between casual Haskell and
Andy Stewart lazycat.mana...@gmail.com writes:
Ivan Lazar Miljenovic ivan.miljeno...@gmail.com writes:
Andy Stewart lazycat.mana...@gmail.com writes:
Hi all,
I have some incorrect Read instance make i got error Prelude.read: no
parse, and i don't know how to fix it.
newtype
Hello fellow Haskellers,
I'd like to discuss an interesting topic. My experience is that there
are two worlds in Haskell, which are quite separate: the pure,
algorithmic world, where you use idiomatic pure Haskell, and the
IO-driven world of state, change, threads and execution, where you use
Ertugrul Soeylemez e...@ertes.de writes:
[snip]
I fear that my code is already too difficult to understand for
beginners, and it's getting worse. But then I ask myself: I've got a
powerful language, so why shouldn't I use that power? After all I
haven't learnt Haskell to write C code with
Hello Ertugrul,
Saturday, July 3, 2010, 4:25:22 PM, you wrote:
This has proven very useful for me. My usual way is writing monad
transformers and sticking them together, often together with concurrent
programming.
... /what/ my code is
doing, because it's written in natural language as
On Sat, Jul 3, 2010 at 9:25 AM, Ertugrul Soeylemez e...@ertes.de wrote:
Haskell provides a lot of low level glue like laziness, currying and
other very helpful language features. But what is different in Haskell
is that it doesn't seem to provide any high level glue like other
languages do,
On Saturday 03 July 2010 12:12:56, Thomas Davie wrote:
On 3 Jul 2010, at 11:04, Brandon S Allbery KF8NH wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 7/3/10 05:57 , Andrew Coppin wrote:
Agreed. So let me rephrase: Why should _every_ Haskell library
involve C? ;-)
Who
Daniel Fischer daniel.is.fisc...@web.de writes:
Knowing about something /= knowing how to use it. I own and have read
RWH, but I've never had to use hsc2hs, or Applicative, etc.
Writing libraries that bind to C is a great way to have to use a lot of
hsc2hs (or c2hs), so clearly you need
On Sat, Jul 3, 2010 at 9:43 AM, Daniel Fischer daniel.is.fisc...@web.de wrote:
Andrew Coppin:
Who says they do, or should?
Don, a few emails ago.
I think you missed a small detail there.
ivan.miljenovic:
Hmm, interesting. Applicative and Traversable are two classes I've
never used
Don Stewart d...@galois.com writes:
* Maintaining Haskell98 compatability. Keep it simple. (See
regex-posix's mistakes here)
At the risk of resurrecting an old (albeit unfinished) thread, I've just
discovered that FGL is actually not Haskell98 compatible anyway, as it
utilised the
On 3 July 2010 14:00, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote:
So this argument isn't valid ;-)
Hi Ivan
I think it was Hugs compliant as least for some revisions - I seem to
remember looking at it before I switched to GHC.
___
Felipe Lessa felipe.le...@gmail.com writes:
There are many many other useful C libraries that we should have
bindings to. For example, Hackage doesn't have any MPI bindings.
Could we write an MPI client in Haskell? I guess so. Is it worth it?
We might get some in two weeks time shameless
Stephen Tetley stephen.tet...@gmail.com writes:
I think it was Hugs compliant as least for some revisions - I seem to
remember looking at it before I switched to GHC.
People still use Hugs? :p
A bit more seriously: is there any listing anywhere of which extensions
Hugs supports?
Definitely
Felipe Lessa wrote:
Oh, so it is about monad transformers. =)
I agree that it gets harder to reason about the code. In fact,
sometimes I stack monad transformers in the wrong order.
About monad transformers, I don't really like to use them because they
can get hairy in some cases, and
Hi,
Am Samstag, den 03.07.2010, 23:18 +1000 schrieb Ivan Lazar Miljenovic:
Stephen Tetley stephen.tet...@gmail.com writes:
I think it was Hugs compliant as least for some revisions - I seem to
remember looking at it before I switched to GHC.
People still use Hugs? :p
A bit more
People still use Hugs? :p
Is there another option for quick prototyping on iPhone?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
* Andrew Coppin andrewcop...@btinternet.com [2010-07-03 14:20:14+0100]
In my experience, using more than one monad transformer at once makes
code utterly incomprehensible.
See X monad (xmonad) for an counterexample.
-- | The X monad, 'ReaderT' and 'StateT' transformers over 'IO'
--
On 3 July 2010 14:18, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote:
Stephen Tetley stephen.tet...@gmail.com writes:
I think it was Hugs compliant as least for some revisions - I seem to
remember looking at it before I switched to GHC.
People still use Hugs? :p
A bit more
On 3 July 2010 14:20, Andrew Coppin andrewcop...@btinternet.com wrote:
Tangentally, it seems to me that all monads can be described as doing zero
or more of:
- Invisibly pass state around (and possibly modify it).
- Perform unusual flow control.
- I/O (or some restricted subset of it).
Can
Stephen Tetley stephen.tet...@gmail.com writes:
On 3 July 2010 14:20, Andrew Coppin andrewcop...@btinternet.com wrote:
Tangentally, it seems to me that all monads can be described as doing zero
or more of:
- Invisibly pass state around (and possibly modify it).
- Perform unusual flow
Most languages today provide a certain glue to bring everything
together.
Most languages today provide several kinds of glue and, while some
of those kinds are not recommended, Haskell unfortunately doesn't
provide all useful kinds of glue. Especially the module system is a
weak point: in SML,
Stephen Tetley stephen.tet...@gmail.com writes:
On 3 July 2010 14:00, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote:
So this argument isn't valid ;-)
I think it was Hugs compliant as least for some revisions - I seem to
remember looking at it before I switched to GHC.
Actually, how
Ivan Lazar Miljenovic wrote:
Stephen Tetley stephen.tet...@gmail.com writes:
On 3 July 2010 14:20, Andrew Coppin andrewcop...@btinternet.com wrote:
Tangentally, it seems to me that all monads can be described as doing zero
or more of:
- Invisibly pass state around (and possibly
Stephen Tetley wrote:
On 3 July 2010 14:20, Andrew Coppin andrewcop...@btinternet.com wrote:
Tangentally, it seems to me that all monads can be described as doing zero
or more of:
- Invisibly pass state around (and possibly modify it).
- Perform unusual flow control.
- I/O (or some
Roman Cheplyaka wrote:
* Andrew Coppin andrewcop...@btinternet.com [2010-07-03 14:20:14+0100]
In my experience, using more than one monad transformer at once makes
code utterly incomprehensible.
See X monad (xmonad) for an counterexample.
-- | The X monad, 'ReaderT' and 'StateT'
On 2 July 2010 11:56, JP Moresmau jpmores...@gmail.com wrote:
On Fri, Jul 2, 2010 at 12:34 PM, Duncan Coutts dun...@well-typed.com
wrote:
When we are done we intend to write up a blog post more details, e.g.
numbers and the range/distribution of experience among candidates. I
hope that will
Currently we have
class Functor c where
fmap :: (x - y) - (c x - c y)
This relies on c having kind * - *. For example, Bytestring cannot be
an instance of Functor.
A cleaner solution would be to have something like
class Container c where
type Element c :: *
I then attempted to
Andrew Coppin andrewcop...@btinternet.com writes:
Currently we have
class Functor c where
fmap :: (x - y) - (c x - c y)
This relies on c having kind * - *. For example, Bytestring cannot be
an instance of Functor.
A cleaner solution would be to have something like
class Container
On Sat, Jul 3, 2010 at 10:15 AM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
Felipe Lessa felipe.le...@gmail.com writes:
There are many many other useful C libraries that we should have
bindings to. For example, Hackage doesn't have any MPI bindings.
Could we write an MPI client in
Hello Andrew
The non-type-changing map is sometimes useful as a type class - in my
graphics lib Wumpus, I call it pointwise:
class Pointwise sh where
type Pt sh :: *
pointwise :: (Pt sh - Pt sh) - sh - sh
For the graphics I want objects to be parametric on unit (which is
usually Double),
On 3 July 2010 15:04, Andrew Coppin andrewcop...@btinternet.com wrote:
I said does something that doesn't fall under one of these. The identity
monad, by contrast, does nothing that does fall under these. :-P (It falls
under zero of these.)
Okay, how about:
The probability monad
The
On Fri, 2010-07-02 at 09:43 -0400, Edward Kmett wrote:
* How many applications did you get?
I tend to actively recruit rather than throw open the floodgates.
We did that initially. We are now very pleased that we switched track to
openly advertising. We've had many excellent people
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 7/3/10 08:01 , Bulat Ziganshin wrote:
so, the main catch for C part were OS-specific calls like
GetPhysicalMemory - i spent lot of time reading mans. for Haskell
part, main changes were about default directories
Even without libraries, if
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 7/3/10 07:25 , Ivan Lazar Miljenovic wrote:
Mihai Maruseac mihai.marus...@gmail.com writes:
As a matter of fact, all of my Haskell codes didn't even touch monads.
I always tried to write code as simple as possible and as
understandable as
I dump results of a computation as a Data.Trie of [(Int,Float)]. It
contains about 5 million entries, with the lists of 35 or less pairs
each. It takes 8 minutes to load with Data.Binary and lookup a single
key. What can take so long? If I change from compressed to
uncompressed (and then
deliverable:
I dump results of a computation as a Data.Trie of [(Int,Float)]. It
contains about 5 million entries, with the lists of 35 or less pairs
each. It takes 8 minutes to load with Data.Binary and lookup a single
key. What can take so long? If I change from compressed to
On Sat, Jul 3, 2010 at 3:32 AM, Kevin Quick qu...@sparq.org wrote:
On Wed, 23 Jun 2010 00:14:03 -0700, Simon Peyton-Jones
simo...@microsoft.com wrote:
I'm interested in situations where you think fundeps work and type
families don't. Reason: no one knows how to make fundeps work cleanly with
Back to initial topic, I have a sudden fear: do you have to master Template
Haskell so as to be regarded as a guru :-{ ?
Let it be no, please, let it be no...
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On Sat, Jul 3, 2010 at 8:57 PM, braver delivera...@gmail.com wrote:
I dump results of a computation as a Data.Trie of [(Int,Float)]. It
contains about 5 million entries, with the lists of 35 or less pairs
each. It takes 8 minutes to load with Data.Binary and lookup a single
key. What can
* Andrew Coppin andrewcop...@btinternet.com [2010-07-03 15:07:17+0100]
Roman Cheplyaka wrote:
* Andrew Coppin andrewcop...@btinternet.com [2010-07-03 14:20:14+0100]
In my experience, using more than one monad transformer at once makes
code utterly incomprehensible.
See X monad (xmonad) for
On Saturday 03 July 2010 2:11:37 pm David Menendez wrote:
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE FlexibleInstances, UndecidableInstances #-}
class C a b c | a - b, a - c where
op :: a - b - c
instance C Bool a a where op _ =
When I load up Control.Applicative in ghci and try, eg
many [1,2] or many (Just 1) or some [1,2] or some (Just 1)
this never returns.
What are the practical uses of these combinators, or for using the
Alternative class in general?
___
Haskell-Cafe
On Sat, Jul 3, 2010 at 10:54 PM, Alexey Khudyakov
alexey.sklad...@gmail.com wrote:
On Sat, Jul 3, 2010 at 8:57 PM, braver delivera...@gmail.com wrote:
I dump results of a computation as a Data.Trie of [(Int,Float)]. It
contains about 5 million entries, with the lists of 35 or less pairs
each.
On Sat, 03 Jul 2010 12:48:56 -0700, Dan Doel dan.d...@gmail.com wrote:
Then the instance declares infinitely many instances C Bool a a. This is a
violation of the fundep. Based on your error message, it looks like it ends up
treating the instance as the first concrete 'a' it comes across, but
On Saturday 03 July 2010 3:57:34 pm Thomas Hartman wrote:
When I load up Control.Applicative in ghci and try, eg
many [1,2] or many (Just 1) or some [1,2] or some (Just 1)
this never returns.
What are the practical uses of these combinators, or for using the
Alternative class in
For an applicative parser - many is the same combinator as Parsec's
many and some is many1.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Saturday 03 July 2010 4:01:12 pm Kevin Quick wrote:
As a side note, although I agree it abuses the fundeps intent, it was handy
for the specific purpose I was implementing to have a no-op/passthrough
instance of op. In general I like the typedef approach better, but it
looks like I must
Data.Map.Map and Data.Set.Set are exported abstractly, without
exposing knowledge about their internal structure.
I cannot directly create my own class instances for them because of
that. But I found that I can write Template Haskell code that could do
that - those data types could be reified
Roman Cheplyaka wrote:
* Andrew Coppin andrewcop...@btinternet.com [2010-07-03 15:07:17+0100]
In my experience, defining a type representing several stacked monad
transformers is the easy part.
Of course it is. It wasn't my intention just to show you how easy it is
to define a newtype
On 03/07/2010 21:11, Stephen Tetley wrote:
For an applicative parser - many is the same combinator as Parsec's
many and some is many1.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Serguey Zefirov sergu...@gmail.com writes:
Data.Map.Map and Data.Set.Set are exported abstractly, without
exposing knowledge about their internal structure.
I cannot directly create my own class instances for them because of
that. But I found that I can write Template Haskell code that could
I cannot directly create my own class instances for them because of
that. But I found that I can write Template Haskell code that could do
that - those data types could be reified just fine.
Huh? Sure you can write class instances for them.
,
| instance SizeOf (Map k v) where
|
Serguey Zefirov sergu...@gmail.com writes:
I cannot directly create my own class instances for them because of
that. But I found that I can write Template Haskell code that could do
that - those data types could be reified just fine.
Huh? Sure you can write class instances for them.
,
Hello everybody,
I'm trying to implement the type protection used by ST to prevent a monad
from returning a certain type.
There's my code:
import Control.Monad.Identity
newtype SomeMonad s a = SomeMonad { unSome :: Identity a }
deriving (Monad)
newtype SomeType s = SomeType Int
runSomeMonad
Hi,
I would like to understand the Peano module below.
I do wish to implement or improve the code.
I am unsure of the semantics of (suc = Suc) and then the subsequent use
of (Suc n)
Is this an example of type-level programming?
module Peano where
data Nat = Zero | Suc Nat deriving Show
class
As I say, every time I've tried to do this, I end up writing a function to
run this stuff, and it typically takes a few hours to reach the point
where it type-checks.
It took me a while the first time, but then I just learned the pattern
and I do it that way every time. Here's my pattern:
begin Andrew Coppin quotation:
Roman Cheplyaka wrote:
See above:
-- Dynamic components may be retrieved with 'get', static components
-- with 'ask'.
So you use ask to get some configuration variable (reader monad is used
for configuration in xmonad) and get/put/modify to deal with dynamic
For me the easiest way to understand something like this is to follow
the transformations of the code. Here's how your examples evaluate:
let t1 = plus (Suc (Zero)) (Suc ( Suc (Zero)))
t1 = plus (Suc (Zero)) (Suc ( Suc (Zero)))
= Suc (plus (Suc (Zero)) (Suc (Zero)))
= Suc (Suc (plus (Suc
On Sat, Jul 3, 2010 at 4:24 PM, Yves Parès limestr...@gmail.com wrote:
Hello everybody,
I'm trying to implement the type protection used by ST to prevent a monad
from returning a certain type.
There's my code:
import Control.Monad.Identity
newtype SomeMonad s a = SomeMonad { unSome ::
On Jul 3, 2010, at 4:39 PM, Andrew Coppin wrote:
class Container c = Functor c where
fmap :: (Functor cx, Functor cy, Element cx ~ x, Element cy ~ y) = (x -
y) - (cx - cy)
However, this fails horribly: The type signature fails to mention c.
You have to mention c, this means an extra
Hi,
I would like to understand the Peano module below.
I do wish to implement or improve the code.
I am unsure of the semantics of (suc = Suc) and then the subsequent use
of (Suc n)
Look's like author would like to declare an increment function instead
of suc lately.
Is this an example of
On Saturday 03 July 2010 7:24:17 pm Yves Parès wrote:
I'm trying to implement the type protection used by ST to prevent a monad
from returning a certain type.
There's my code:
import Control.Monad.Identity
newtype SomeMonad s a = SomeMonad { unSome :: Identity a }
deriving (Monad)
On Sunday 04 July 2010 01:27:19, Patrick Browne wrote:
Hi,
I would like to understand the Peano module below.
I do wish to implement or improve the code.
I am unsure of the semantics of (suc = Suc) and then the subsequent use
of (Suc n)
Is this an example of type-level programming?
No,
On Sat, Jul 3, 2010 at 7:20 PM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
Serguey Zefirov sergu...@gmail.com writes:
I cannot directly create my own class instances for them because of
that. But I found that I can write Template Haskell code that could do
that - those data types
On Sat, 03 Jul 2010 13:28:44 -0700, Dan Doel dan.d...@gmail.com wrote:
As a side note, although I agree it abuses the fundeps intent, it was handy
for the specific purpose I was implementing to have a no-op/passthrough
instance of op. In general I like the typedef approach better, but it
Hello!
On Sat, Jul 3, 2010 at 9:12 PM, Dan Doel dan.d...@gmail.com wrote:
The problem is instantiation. SomeMonad is a constructor for the type
SomeMonad s a
for any *particular* s and a. But the type:
forall s. SomeMonad s a
is not that type. That type doesn't have constructors
I suppose that what qualifies as a good Haskell candidate depends on what you
are looking for in a software engineer in general. For my part, having hired
engineers into various groups over the last 20+ years, I've always preferred to
hire people who demonstrate a broad understanding of
On Saturday 03 July 2010 10:52:31 pm Felipe Lessa wrote:
I understood your explanation. However, is this an implementation
detail/bug or is it an intended feature?
Well, I wouldn't call it a bug. Perhaps it could be called a lack of a
feature, because one can imagine such pattern matches
David Menendez d...@zednenem.com writes:
I believe the point is that Template Haskell can see the internal
structure of a type even when the constructors are not exported. The
question is whether or not that is intentional.
I was under the impression that the question was whether the hiding
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 7/4/10 00:29 , Ivan Lazar Miljenovic wrote:
David Menendez d...@zednenem.com writes:
I believe the point is that Template Haskell can see the internal
structure of a type even when the constructors are not exported. The
question is whether or
99 matches
Mail list logo