I created the following page on the wiki to capture one pattern that
occurs often in Edward Kmett's lens library.
http://www.haskell.org/haskellwiki/Function_decoration_pattern
Feel free to rename it or add comments, examples, clarifications,
additional notes or extensions to the technique.
that even -standard- types fail to satisfy even the laws that you
perhaps can interpret the Haskell Report as requiring. There have
been violations of type safety due to assuming instances satisfied
laws that they didn't.
On 20 June 2012 04:03, Derek Elkins derek.a.elk...@gmail.com wrote
Un-top-posted. See below.
On 19 June 2012 02:21, Derek Elkins derek.a.elk...@gmail.com wrote:
On Jun 18, 2012 4:54 PM, George Giorgidze giorgi...@gmail.com wrote:
Hi Derek,
On 16 June 2012 21:53, Derek Elkins derek.a.elk...@gmail.com wrote:
The law that ends up failing is toList
On Sat, Jun 16, 2012 at 3:47 AM, Dan Burton danburton.em...@gmail.com wrote:
Convenience aside, doesn't the functor instance conceptually violate some
sort of law?
fmap (const 1) someSet
The entire shape of the set changes.
fmap (g . h) = fmap g . fmap h
This law wouldn't hold given
Well, you can get A Novel Representation of Lists and Its Application
to the Function 'Reverse' by John Hughes online published in 1986
which is referenced by Wadler's 1987 The Concatenate Vanishes and
references Richard Bird's 1984 paper Transformational programming and
the paragraph problem
On Sun, Oct 31, 2010 at 7:27 PM, Richard O'Keefe o...@cs.otago.ac.nz wrote:
On 1/11/2010, at 12:05 PM, Gregory Collins wrote:
They're called difference lists:
As a matter of fact the original context was precisely
difference lists in logic programming.
On Sun, Oct 31, 2010 at 9:02 PM, wren ng thornton w...@freegeek.org wrote:
On 10/31/10 7:10 PM, Derek Elkins wrote:
Well, you can get A Novel Representation of Lists and Its Application
to the Function 'Reverse' by John Hughes online published in 1986
which is referenced by Wadler's 1987
On Sun, Oct 17, 2010 at 6:49 AM, Miguel Mitrofanov
miguelim...@yandex.ru wrote:
On 17 Oct 2010, at 05:21, Ben Franksen wrote:
I want to prove that
f r == do
s1 - readIORef r
r' - newIORef s1
x - f r'
s3 - readIORef r'
writeIORef r s3
return x
That is not true.
On Sat, Oct 16, 2010 at 9:21 PM, Ben Franksen ben.frank...@online.de wrote:
I have a formal proof where I am stuck at a certain point.
Suppose we have a function
f :: IORef a - IO b
I want to prove that
f r == do
s1 - readIORef r
r' - newIORef s1
x - f r'
s3 - readIORef
On Tue, Oct 12, 2010 at 4:34 AM, Bertram Felgenhauer
bertram.felgenha...@googlemail.com wrote:
Simon Marlow wrote:
Interesting. You're absolutely right, GHC doesn't respect the
report, on something as basic as sections! The translation we use
is
(e op) == (op) e
once upon a time,
On Thu, Oct 7, 2010 at 8:44 AM, Luke Palmer lrpal...@gmail.com wrote:
On Thu, Oct 7, 2010 at 6:17 AM, Brent Yorgey byor...@seas.upenn.edu wrote:
The source code seems to be easy to read, but I don't think I understand
that. For me I think if I change the first line from
fib = ((map fib' [0
This is a forward of a message from March 4th.
-- Forwarded message --
From: Derek Elkins derek.a.elk...@gmail.com
Date: Thu, Mar 4, 2010 at 9:43 PM
Subject: Re: Bug in Parsec.Token
To: Don Stewart d...@galois.com
Cc: Greg Fitzgerald gari...@gmail.com, Antoine Latter
aslat
http://hackage.haskell.org/package/simple-reflect This is what is
used in lambdabot.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Or... one could just use the exceptions that are already built into
the IO monad...
2010/6/10 Yitzchak Gale g...@sefer.org:
Lennart Augustsson wrote:
I would not use the continuation monad just for early exit. Sounds
like the error monad to me.
I.e., the Either/ErrorT monad. But the
On Sun, May 23, 2010 at 11:38 AM, Daniel Fischer
daniel.is.fisc...@web.de wrote:
On Sunday 23 May 2010 18:24:50, R J wrote:
Correction: the theorem is
h . either (f, g) = either (h . f, h . g)
Still not entirely true,
const True . either (undefined, undefined) $ undefined = True
On Sat, May 22, 2010 at 8:36 PM, Dave Neuer dave.ne...@pobox.com wrote:
Hi.
I'm a Haskell newbie, and I've been reading Oleg's work about
lightweight dependent types in Haskell, and I've been trying to figure
out if I understand how branding works (warning bells already, I
know).
At
On Sat, May 15, 2010 at 2:28 PM, Max Cantor mxcan...@gmail.com wrote:
Where is my bind statement doing a case analysis? Isn't it just propagating,
in a sense, the case analysis that came from values coming into the monad via
return or via throwError?
What you did was reimplement the Either
On Sat, May 15, 2010 at 9:20 PM, Antoine Latter aslat...@gmail.com wrote:
On Fri, May 14, 2010 at 4:25 PM, Derek Elkins derek.a.elk...@gmail.com
wrote:
You did it wrong. All you did was Church encode the Either type.
Your bind is still doing a case-analysis. All you have to do is use
ContT
You did it wrong. All you did was Church encode the Either type.
Your bind is still doing a case-analysis. All you have to do is use
ContT r (Either e). The bind implementation for ContT is completely
independent of the underlying monad. It doesn't even require the m in
ContT r m to be a
On Fri, May 14, 2010 at 4:53 PM, Antoine Latter aslat...@gmail.com wrote:
On Fri, May 14, 2010 at 4:25 PM, Derek Elkins derek.a.elk...@gmail.com
wrote:
You did it wrong. All you did was Church encode the Either type.
Your bind is still doing a case-analysis. All you have to do is use
ContT
On Thu, May 13, 2010 at 10:49 AM, Edward Amsden eca7...@cs.rit.edu wrote:
On Wed, May 12, 2010 at 3:29 PM, Peter Robinson thaldy...@gmail.com wrote:
As far as I know, TChan needs the 'retry' combinator which requires GHC's
RTS.
Same is true for TMVar, I think.
(sorry for the doubling peter,
2010/3/29 Günther Schmidt gue.schm...@web.de:
Hi,
I can easily see how one identifies the domain and co-domain of a unary
function.
How would the domain of a function be expressed that takes more than one
argument and arguments of different type?
All functions in Haskell are unary.
Parsec is a monadic combinator library that is well-documented, simple
to use, and produces good error messages. Parsec is not inherently
lazy/incremental and is not well-suited to handling large quantities
of simply formatted data. Parsec 3 adds to Parsec the ability to use
Parsec as a monad
Parsec is a monadic combinator library that is well-documented, simple
to use, and produces good error messages. Parsec is not inherently
lazy/incremental and is not well-suited to handling large quantities
of simply formatted data. Parsec 3 adds to Parsec the ability to use
Parsec as a monad
On Sun, Feb 28, 2010 at 10:03 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Luke Palmer wrote:
I have seen some proposals around here for SoC projects and other
things to try to improve the latency of GHC's garbage collector. I'm
currently developing a game in Haskell, and even 100ms
On Sun, Jan 24, 2010 at 3:12 PM, Stephen Tetley
stephen.tet...@gmail.com wrote:
Doesn't the simply typed lambda calculus introduce if-then-else as a
primitive precisely so that it can be typed?
Its not an illuminating answer to your question and I'd welcome
clarification for my own
On Sat, Jan 23, 2010 at 4:57 PM, Jeremy Shaw jer...@n-heptane.com wrote:
On Sat, Jan 23, 2010 at 7:57 AM, Neil Mitchell ndmitch...@gmail.com
wrote:
No, that's definitely not correct, or even remotely scalable as we
increase the number of abstract types in disparate packages.
Yes..
On Wed, Jan 20, 2010 at 9:42 AM, Will Ness will_...@yahoo.com wrote:
Derek Elkins derek.a.elkins at gmail.com writes:
On Sun, Jan 17, 2010 at 2:22 PM, Will Ness will_n48 at yahoo.com wrote:
Hello cafe,
I wonder, if we have List.insert and List.union, why no List.merge (:: Ord
On Sun, Jan 17, 2010 at 2:22 PM, Will Ness will_...@yahoo.com wrote:
Hello cafe,
I wonder, if we have List.insert and List.union, why no List.merge (:: Ord a
=
[a] - [a] - [a]) and no List.minus ? These seem to be pretty general
operations.
Presumably by List.minus you mean the (\\)
On Tue, Jan 5, 2010 at 7:49 AM, Steffen Schuldenzucker
sschuldenzuc...@uni-bonn.de wrote:
Hi Paul,
Paul Brauner wrote:
Hi,
I'm trying to get a deep feeling of Functors (and then pointed Functors,
Applicative Functors, etc.). To this end, I try to find lawless
instances of Functor that
On Tue, Jan 5, 2010 at 7:14 AM, Paul Brauner paul.brau...@loria.fr wrote:
Hi,
I'm trying to get a deep feeling of Functors (and then pointed Functors,
Applicative Functors, etc.). To this end, I try to find lawless
instances of Functor that satisfy one law but not the other.
I've found one
On Tue, Jan 5, 2010 at 5:13 AM, Maciej Piechotka uzytkown...@gmail.com wrote:
On Mon, 2010-01-04 at 07:17 -0700, Luke Palmer wrote:
On Mon, Jan 4, 2010 at 6:51 AM, Maciej Piechotka uzytkown...@gmail.com
wrote:
About comonad - not exactly as every comonad is copointed and the only
possible
On Tue, Jan 5, 2010 at 8:15 AM, Dan Piponi dpip...@gmail.com wrote:
On Mon, Jan 4, 2010 at 3:01 PM, Derek Elkins derek.a.elk...@gmail.com wrote:
Ignoring bottoms the free theorem for fmap can be written:
If h . p = q . g then fmap h . fmap p = fmap q . fmap g
When I play with http
On Tue, Jan 5, 2010 at 8:22 AM, Brent Yorgey byor...@seas.upenn.edu wrote:
On Mon, Jan 04, 2010 at 11:49:33PM +0100, Steffen Schuldenzucker wrote:
data Foo a = Foo a
instance Functor Foo where
fmap f (Foo x) = Foo . f . f $ x
Then:
fmap id (Foo x) == Foo . id . id $ x == Foo x
fmap
What does Haskell need to be saved from?
(Its growing popularity and mushrooming library?)
Arguably John Earle's emails suggest that the answer to this is Yes.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On Fri, Dec 4, 2009 at 11:26 AM, Radek Micek radek.mi...@gmail.com wrote:
Hello.
I have two types for expression:
data Expr = Add Expr Expr | Mul Expr Expr | Const Int
data AExpr = AAdd AExpr AExpr | AConst Int
The first one supports addition and multiplication and the second
only
On Fri, Dec 4, 2009 at 11:01 PM, Evan Laforge qdun...@gmail.com wrote:
On Fri, Dec 4, 2009 at 1:09 PM, John MacFarlane j...@berkeley.edu wrote:
On Mon, Nov 23, 2009 at 12:29 PM, Antoine Latter aslat...@gmail.com wrote:
I finally had some time to test it. After running it multiple times
(of
On Mon, Nov 30, 2009 at 6:22 AM, Michael Lesniak mlesn...@uni-kassel.de wrote:
Hello,
In terms of
to become a great programmer, you need to read great programs[1]
what are great programs written in Haskell (for your personal
definition of great), which source code is freely available on
On Wed, Nov 25, 2009 at 3:48 PM, Ben Franksen ben.frank...@online.de wrote:
Derek Elkins wrote:
The following code works fine for me, so it seems you are missing some
details that may help.
[...snip code...]
Thank you! Indeed I did simplify the code when writing the message --
because I
On Wed, Nov 25, 2009 at 2:51 PM, Michael Mossey m...@alumni.caltech.edu wrote:
I'm fairly new to Haskell, and starting to write some big projects.
Previously I used OO exclusively, mostly Python. I really miss the
namespace capabilities... a class can have a lot of generic method names
which
The following code works fine for me, so it seems you are missing some
details that may help.
{-# LANGUAGE RecursiveDo, GeneralizedNewtypeDeriving,
TypeSynonymInstances, MultiParamTypeClasses #-}
import Control.Monad
import Control.Monad.State
import Control.Monad.Error
import
On Tue, Oct 13, 2009 at 4:44 AM, Eugene Kirpichov ekirpic...@gmail.com wrote:
I took a toy problem - find the first node satisfying a predicate in a
binary tree, started with a naive Maybe-based implementation - and
experimented with 3 ways of changing the program:
- Church-encode the Maybe
On Thu, Oct 22, 2009 at 1:32 PM, David Menendez d...@zednenem.com wrote:
On Thu, Oct 22, 2009 at 2:23 AM, Gregory Crosswhite
gcr...@phys.washington.edu wrote:
For clarity, one trick that uses unsafePerformIO which you may have seen
posted on this list earlier today is the following way of
On Sat, Oct 17, 2009 at 3:24 PM, Andrew Coppin
andrewcop...@btinternet.com wrote:
Edward Z. Yang wrote:
Excerpts from Andrew Coppin's message of Sat Oct 17 15:21:28 -0400 2009:
Suppose we have
newtype Foo x
instance Monad Foo
runFoo :: Foo x - IO x
What sort of things can I do to
See vacuum: http://hackage.haskell.org/package/vacuum
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Mon, Oct 12, 2009 at 8:15 PM, Joe Fredette jfred...@gmail.com wrote:
Sadly not enough, I understand the basics, but the whole proof = this
diagram commutes thing still seems like
voodoo to me. There is a section coming up in my Topology ISP that will be
on CT. So I hope that I will be able
On Sun, Oct 11, 2009 at 8:55 AM, Iain Barnett iainsp...@gmail.com wrote:
On 11 Oct 2009, at 13:58, John Lato wrote:
For anyone writing introductions to generic programming, take this as
a plea from Haskellers everywhere. If one of the RWH authors can't
understand how to make use of these
On Thu, Oct 1, 2009 at 6:22 PM, Gregory Propf gregorypr...@yahoo.com wrote:
Is there a way to tell, let's say, how many constructors there are for a
type? Or do I need one of the haskell extensions I've read about?
Use Data.Data and derive Data for the types you are interested in or
instance
On Sat, Sep 19, 2009 at 6:54 AM, Daniel Fischer
daniel.is.fisc...@web.de wrote:
Am Samstag 19 September 2009 12:37:41 schrieb staafmeister:
Hi haskell-cafe,
Why does rlist 10 [] gives stack overflow in ghci?
rlist 0 l = return l
rlist n l = do {x - randomRIO (1,maxBound::Int); let nl =
But pedantically even the function:
quux :: Int - Int
quux x = trace Quux (bar 12)
optmain :: IO ()
optmain = quux 10 `seq` quux 11 `seq` return ()
might print only once if GHC at the optimization level selected recognizes
that quux doesn't depend on its argument and rewrote your code
On Tue, Sep 15, 2009 at 10:14 AM, Manuel Simoni msim...@gmail.com wrote:
Hello!
I'm trying to wrap my head around OO'Haskell's notion of objects as fixpoints.
Is OO'Haskell's use of mfix simply a use of something like a monadic
Y-combinator to give the object access to its own identity?
On Mon, Sep 14, 2009 at 10:25 AM, Martijn van Steenbergen
mart...@van.steenbergen.nl wrote:
Hello cafe,
Inspired by Sean Leather's xformat package [1] I built a datatype with which
you can build a monoid with holes, yielding a function type to fill in these
holes, continuation-passing style.
The first thing I would do i is verify that the compiler is not
already doing this.
On Sun, Sep 6, 2009 at 7:50 AM, Peter Verswyvelenbugf...@gmail.com wrote:
I've seen a couple of package being announced that provide first class
labels, and other packages already existed for this (Grapefruit
2009/8/22 Eugene Kirpichov ekirpic...@gmail.com:
Use 'round' instead of 'truncate'.
Prelude let numDigits = (+1) . round . logBase 10 . fromIntegral
Prelude map (numDigits . (10^)) [0..9]
[1,2,3,4,5,6,7,8,9,10]
round won't work because 999 is close to 1000.
You simply need to use logBase
On Sat, Aug 22, 2009 at 12:31 PM, Derek Elkinsderek.a.elk...@gmail.com wrote:
2009/8/22 Eugene Kirpichov ekirpic...@gmail.com:
Use 'round' instead of 'truncate'.
Prelude let numDigits = (+1) . round . logBase 10 . fromIntegral
Prelude map (numDigits . (10^)) [0..9]
[1,2,3,4,5,6,7,8,9,10]
On Fri, Aug 21, 2009 at 5:04 AM, Lennart
Augustssonlenn...@augustsson.net wrote:
On Fri, Aug 21, 2009 at 10:52 AM, Bayley, Alistair
alistair.bay...@invesco.com wrote:
From: haskell-cafe-boun...@haskell.org
[mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Bulat Ziganshin
To: Peter
On Tue, Aug 11, 2009 at 3:51 PM, Robin Greengree...@greenrd.org wrote:
On Wed, 12 Aug 2009 11:37:02 +0200
Peter Verswyvelen bugf...@gmail.com wrote:
Yes, sorry.
But I think I already found the answer to my own question.
DDC functions that are lazy don't allow side effects:
On Wed, Aug 12, 2009 at 4:41 AM, John Latojwl...@gmail.com wrote:
Hi Job,
I don't think this hypothetical function could exist; you may as well
call it notEverSafeOhTheHumanity and be done with it.
Since Haskell provides no guarantees about when (if ever) any given
function/data will be
On Thu, Jul 16, 2009 at 2:52 PM, Andrew
Coppinandrewcop...@btinternet.com wrote:
Ross Mellgren wrote:
It's not where -- let also works
Prelude let { foo x = x } in (foo 1, foo True)
(1,True)
Awesome. So by attempting to implement Haskell's type system, I have
discovered that I actually
On Fri, Jul 10, 2009 at 12:42 AM, rocon...@theorem.ca wrote:
On Thu, 9 Jul 2009, rocon...@theorem.ca wrote:
You can use by lib without worrying about the CIE. You can use my library
without ever importing or using the word CIE. However, the CIE stuff is
there for those who need it.
On Sat, Jul 11, 2009 at 12:54 PM, Derek Elkinsderek.a.elk...@gmail.com wrote:
On Fri, Jul 10, 2009 at 12:42 AM, rocon...@theorem.ca wrote:
On Thu, 9 Jul 2009, rocon...@theorem.ca wrote:
You can use by lib without worrying about the CIE. You can use my library
without ever importing or using
On Thu, Jul 9, 2009 at 12:31 PM, Jason Dagitda...@codersbase.com wrote:
On Thu, Jul 9, 2009 at 10:00 AM, Thomas ten Cate ttenc...@gmail.com wrote:
By the way, the most valuable pixels, right at the top of the page,
are wasted on wiki stuff. Compare
http://www.haskell.org/
with, for
On Thu, Jul 9, 2009 at 5:17 PM, Jason Dagitda...@codersbase.com wrote:
On Thu, Jul 9, 2009 at 3:11 PM, Derek Elkins derek.a.elk...@gmail.com
wrote:
On Thu, Jul 9, 2009 at 12:31 PM, Jason Dagitda...@codersbase.com wrote:
On Thu, Jul 9, 2009 at 10:00 AM, Thomas ten Cate ttenc
On Sun, Jun 28, 2009 at 4:11 PM, Antoine Latteraslat...@gmail.com wrote:
On Sun, Jun 28, 2009 at 3:42 PM, Andrew
Coppinandrewcop...@btinternet.com wrote:
Andrew Coppin wrote:
Alrighty then, so how I just do Setup configure, and now Setup sdist, and
then I can upload the result to Ha-- oh,
On Fri, Jun 5, 2009 at 8:14 PM, Tim Newsham news...@lava.net wrote:
I just watched http://video.google.com/videoplay?docid=810232012617965344
It's a great talk that is suprisingly relevant to Haskell programming
(although at first blush it looks a bit unrelated). (It refs a lot of older
work
On Sat, May 30, 2009 at 1:12 PM, Jason Dusek jason.du...@gmail.com wrote:
2009/05/30 Bartosz Wójcik bar...@sudety.it:
...reading RWH I could not memorize what those liftM funtions
meant.
The basic one, `liftM`, means `fmap`, though specialized for
functors that are monads.
Prelude
On Fri, May 29, 2009 at 5:36 AM, Max Rabkin max.rab...@gmail.com wrote:
On Fri, May 29, 2009 at 12:29 PM, Paul Keir pk...@dcs.gla.ac.uk wrote:
f''' = ([]::[()]) == ([]::[()])
(Very pretty.)
So why doesn't ghc have 'default' instances?
It does. I believe Num defaults to Integer and then to
On Fri, May 29, 2009 at 4:02 AM, Tillmann Vogt
tillmann.v...@rwth-aachen.de wrote:
Bartosz Wójcik wrote:
Hi Everybody (especially Parsec Creator),
is there any reason why float parses only positive numbers?
I find following defition:
float = lexeme floating ? float
floating
On Tue, 2009-05-12 at 14:09 +0100, Philippa Cowderoy wrote:
On Mon, 2009-05-11 at 20:43 -0400, Anton van Straaten wrote:
Serious question: what is the significance of the question mark and
double question marks in those signatures, or better yet, where can I
read about it?
I've
On Sun, 2009-04-19 at 20:46 -0400, Dan Doel wrote:
On Sunday 19 April 2009 7:11:51 pm wren ng thornton wrote:
Yes, however, because consumers (e.g. @f@) demand that their arguments
remain polymorphic, anything which reduces the polymorphism of @a@ in
@x@ will make it ineligible for being
On Thu, 2009-04-02 at 18:01 -0600, Duane Johnson wrote:
So I was thinking about a killer feature for a text editor.
Wouldn't it be neat if you could expand function calls into their
definitions, in-place?
For example, suppose we have minus defined like so, somewhere in
another file:
On Sat, 2009-03-07 at 23:12 +0100, Martijn van Steenbergen wrote:
Derek Elkins wrote:
Both are poorish style.
reader - forkIO $ forever $ do (nr', line) - readChan; when (nr /= nr') $
putStrLn hdl line
This is fine assuming you always want to re-enter the loop. If you want
to loop
On Sat, 2009-03-07 at 22:18 +, R J wrote:
Here's another Bird problem that's stymied me:
The function inits computes the list of initial segments of a list;
its type is inits :: [a] - [[a]]. What is the appropriate naturality
condition for inits?
A natural transformation is between two
On Thu, 2009-03-05 at 16:12 -0800, Jonathan Cast wrote:
On Thu, 2009-03-05 at 15:36 -0800, Daryoush Mehrtash wrote:
In this chat server implementation
http://www.haskell.org/haskellwiki/Implement_a_chat_server
forkIO is used with fix as in:
reader - forkIO $ fix $ \loop - do
On Tue, 2009-03-03 at 10:43 +0100, Peter Verswyvelen wrote:
Lambda calculus is a nice theory in which every function always has
one input and one output. Functions with multiple arguments can be
simulated because functions are first class and hence a function can
return a function. Multiple
On Thu, 2009-02-19 at 17:00 +0300, Khudyakov Alexey wrote:
Hello,
While browsing documentation I've found following function
-- | @'fix' f@ is the least fixed point of the function @f@,
-- i.e. the least defined @x@ such that @f x = x...@.
fix :: (a - a) - a
fix f = let x = f x in x
On Thu, 2009-02-19 at 05:53 -0800, Kim-Ee Yeoh wrote:
There's a lot to chew on (thank you!), but I'll just take something
I can handle for now.
Dan Doel wrote:
An existential:
exists a:T. P(a)
is a pair of some a with type T and a proof that a satisfies P (which has
On Sun, 2009-02-15 at 18:53 +0100, Tillmann Rendel wrote:
Gregg Reynolds wrote:
BTW, I'm not talking about Haskell's Functor class, I guess I should
have made that clear. I'm talking about category theory, as the
semantic framework for thinking about Haskell.
In that case, I even less
On Thu, 2009-02-12 at 19:55 -0500, Chung-chieh Shan wrote:
wren ng thornton w...@freegeek.org wrote in article
4993bbee.9070...@freegeek.org in gmane.comp.lang.haskell.cafe:
It's ugly, but one option is to just reify your continuations as an ADT,
where there are constructors for each
On Mon, 2009-02-09 at 16:54 -0800, Lyle Kopnicky wrote:
Looks like a lot of fun!
http://www.haskellchamber.com/page6.html
I could readily go there. Maybe I could pick up a beauty at the
pageant.
___
Haskell-Cafe mailing list
On Thu, 2009-02-05 at 11:47 -0700, m...@justinbogner.com wrote:
Jake McArthur j...@pikewerks.com writes:
m...@justinbogner.com wrote:
| Oops, sent this off list the first time, here it is again.
|
| Jake McArthur j...@pikewerks.com writes:
| m...@justinbogner.com wrote:
| | Bind is a
On Thu, 2009-02-05 at 20:52 -0600, Gregg Reynolds wrote:
I'm working on a radically different way of looking at IO. Before I
post it and make a fool of myself, I'd appreciate a reality check on
the following points:
a) Can IO be thought of as a category? I think the answer is yes.
No.
On Wed, 2009-02-04 at 14:32 +0900, Benjamin L.Russell wrote:
On Wed, 04 Feb 2009 00:15:48 +, Philippa Cowderoy
fli...@flippac.org wrote:
[...]
If you need to know how to use monads so you can do IO,
#haskell-in-depth isn't the place. On the other hand, if you want to
discuss how
On Sat, 2009-01-31 at 11:00 -0600, Gregg Reynolds wrote:
Hi,
I think I've finally figured out what a monad is, but there's one
thing I haven't seen addressed in category theory stuff I've found
online. That is the relation between type constructors and data
constructors.
The typical
On Tue, 2009-01-27 at 08:51 -0800, Anish Muttreja wrote:
On Thu, 22 Jan 2009 09:46:19 -0800, Derek Elkins derek.a.elk...@gmail.com
wrote:
The old wiki had an excellent page that has not been replicated either
verbatim or in spirit in the new wiki.
http://web.archive.org/web
On Sun, 2009-01-25 at 09:32 +, Magnus Therning wrote:
Bulat Ziganshin wrote:
Hello Gwern,
Sunday, January 25, 2009, 2:56:07 AM, you wrote:
my usual complaint: it will be great to see all announces duplicated
in main haskell list
I always only announce things on haskell-cafe.
On Sun, 2009-01-25 at 07:11 -0800, Jonathan Cast wrote:
On Sun, 2009-01-25 at 10:46 +0100, Thomas Davie wrote:
On 25 Jan 2009, at 10:08, Daniel Fischer wrote:
Am Sonntag, 25. Januar 2009 00:55 schrieb Conal Elliott:
It's obvious because () is a defined value, while bottom is not -
On Sun, 2009-01-25 at 23:09 +0100, Magnus Therning wrote:
On Sun, Jan 25, 2009 at 10:47 AM, Derek Elkins derek.a.elk...@gmail.com
wrote:
On Sun, 2009-01-25 at 09:32 +, Magnus Therning wrote:
Bulat Ziganshin wrote:
Hello Gwern,
Sunday, January 25, 2009, 2:56:07 AM, you wrote
On Sat, 2009-01-24 at 15:43 -0600, Jeremy Shaw wrote:
Hello,
I was reading about the Factory Method Pattern on wikipedia, and
noticed that the very first example was written in Haskell. Sweet!
http://en.wikipedia.org/wiki/Factory_method_pattern#Haskell
Unfortunately, it looks to me like
On Fri, 2009-01-23 at 13:39 -0800, George Pollard wrote:
On Fri, 2009-01-23 at 21:30 +, Joachim Breitner wrote:
Hi,
Am Freitag, den 23.01.2009, 21:50 +0100 schrieb Henning Thielemann:
However our recent Monoid discussion made me think about mapM_,
sequence_, and friends. I
On Thu, 2009-01-22 at 16:11 +0100, Ketil Malde wrote:
One wart that was briefly mentioned during the Great Monoid Naming
Thread of 2009 is the need to wrap types in newtypes to provide multiple
instances of the same class with different semantics -- the archetypical
example being Integer as a
On Thu, 2009-01-22 at 11:32 -0600, Jeremy Shaw wrote:
Hello,
Just some minor suggestions and comments:
The description might read better as two sentences:
A class for monoids with various general-purpose instances. Monoids
are types with an associative binary operation that has an
On Mon, 2009-01-19 at 21:18 +0100, Alberto G. Corona wrote:
This is one of the shortcomings of haskell not to mention other
programming languages. Mathemathicist would find it very annoying.
Instead of
instance Monoid Integer where
mappend = (+)
mempty = 0
instance Monoid
On Mon, 2009-01-19 at 12:10 -0800, Iavor Diatchki wrote:
Hi,
On Mon, Jan 19, 2009 at 11:06 AM, Jonathan Cast
jonathancc...@fastmail.fm wrote:
On Mon, 2009-01-19 at 10:59 -0800, Iavor Diatchki wrote:
Hello,
The multitude of newtypes in the Monoid module are a good indication
that the
On Mon, 2009-01-19 at 22:12 -0500, S. Doaitse Swierstra wrote:
On 17 jan 2009, at 22:22, Derek Elkins wrote:
On Thu, 2009-01-15 at 13:40 +0100, Apfelmus, Heinrich wrote:
Eugene Kirpichov wrote:
Well, your program is not equivalent to the C++ version, since it
doesn't bail on incorrect
On Sun, 2009-01-18 at 18:17 +0100, Benja Fallenstein wrote:
On Sun, Jan 18, 2009 at 5:48 PM, rocon...@theorem.ca wrote:
I noticed the Bool datatype isn't well documented. Since Bool is not a
common English word, I figured it could use some haddock to help clarify it
for newcomers.
--
On Thu, 2009-01-15 at 13:40 +0100, Apfelmus, Heinrich wrote:
Eugene Kirpichov wrote:
Well, your program is not equivalent to the C++ version, since it
doesn't bail on incorrect input.
Oops. That's because my assertion
show . read = id
is wrong. We only have
read . show = id
On Fri, 2009-01-16 at 15:21 -0800, Jonathan Cast wrote:
On Fri, 2009-01-16 at 18:14 -0500, Anton van Straaten wrote:
Niklas Broberg wrote:
I still think existential quantification is a step too far though. :-P
Seriously, existential quantification is a REALLY simple concept, that
Actually programming requires -far more- precision than mathematics ever
has. The standards of formal and precise that mathematicians use
are a joke to computer scientists and programmers. Communication is
also more important or at least more center stage in mathematics than
programming.
On Thu, 2009-01-15 at 14:11 -0600, John Goerzen wrote:
On Thu, Jan 15, 2009 at 07:46:02PM +, Andrew Coppin wrote:
John Goerzen wrote:
If we *must* insist on using the most obscure possible name for
everything, can we at least write some documentation that doesn't
require a PhD
1 - 100 of 582 matches
Mail list logo