On Fri, 2007-10-12 at 16:20 -0700, Dan Weston wrote:
I like that name, and will henceforth use it myself until someone sees
fit to add it to the Prelude!
Maxime Henrion wrote:
Isaac Dupree wrote:
Dan Weston wrote:
applyNtimes :: (a - a) - Int - a - a
This sounds like it should be
On Sun, 2007-10-14 at 15:22 +0100, Andrew Coppin wrote:
Vimal wrote:
I think you have got a very good point in your mail that I overlooked
all along ... Why was Haskell created? is a question that I havent
tried looking for a answer :)
To avoid success at all costs?
(No,
On Sun, 2007-10-14 at 15:20 -0600, Luke Palmer wrote:
On 10/14/07, Tim Newsham [EMAIL PROTECTED] wrote:
I've been struggling with this for the last day and a half. I'm
trying to get some exercise with the type system and with logic by
playing with the curry-howard correspondence. I got
On Sun, 2007-10-14 at 18:14 -0400, Brandon S. Allbery KF8NH wrote:
On Oct 14, 2007, at 17:54 , ntupel wrote:
Now my problem still is, that I don't know how to speed things up. I
tried putting seq and $! at various places with no apparent
improvement.
Maybe I need to find a different
On Sun, 2007-10-14 at 17:19 -1000, Tim Newsham wrote:
On Sun, 14 Oct 2007, Roberto Zunino wrote:
(Warning: wild guess follows, I can not completely follow CPS ;-))
Adding a couple of forall's makes it compile:
propCC :: ((forall q . p - Prop r q) - Prop r p) - Prop r p
func1 :: (forall q
On Tue, 2007-10-16 at 17:02 +0100, Neil Mitchell wrote:
Hi
(/ 10) means the function that divides its argument by 10
(- 10) however is just the number -10, even if I put a space between the -
and 10.
How can I create a function that subtracts 10 from its argument in a clean
way
On Wed, 2007-10-17 at 15:06 -0700, Dan Weston wrote:
That is a great tutorial. Thanks! But in the last two sentences of the
introduction you say:
We just need to find any program with the given type.
The existence of a program for the type will be a proof
of the corresponding
On Mon, 2007-10-22 at 01:12 +0100, Lennart Augustsson wrote:
There's nothing wrong with Haskell types. It's the terms that make
Haskell types an inconsistent logic.
Logics are what are consistent or not, so saying the logic Haskell's
type system corresponds to is inconsistent is all that can
On Mon, 2007-10-22 at 10:09 +0200, manu wrote:
Hello
I am not sure it is appropriate to post to this mailing list to
inquire about a peculiar algorithm, if not let me know...
I was looking at one particular puzzle posted on the Facebook site,
'Wiretaps'
On Mon, 2007-10-22 at 17:12 +0100, Neil Mitchell wrote:
Hi
I can see problems with this. This comes up when typing windows file path's:
C:\path to my\directory\boo
If this now reports no errors, who wants to guess which come up as
escape codes, and which don't. The way other languages
On Thu, 2007-10-25 at 11:30 -0400, Graham Fawcett wrote:
Hi folks,
I'm writing a Gnu DBM module as an exercise for learning Haskell and
its FFI. I'm wondering how I might write a function that returns the
database keys as a lazy list. I've wrapped the two relevant foreign
functions:
On Sun, 2007-10-28 at 10:23 -0400, Prabhakar Ragde wrote:
Jaak Randmets wrote:
On 10/28/07, Prabhakar Ragde [EMAIL PROTECTED] wrote:
For the purposes of learning, I am trying to optimize some variation of
the following code for computing all perfect numbers less than 1.
divisors i =
On Sun, 2007-10-28 at 12:01 -0700, Don Stewart wrote:
jerzy.karczmarczuk:
Stefan O'Rear adds to the dialogue:
Prabhakar Ragde wrote:
Jerzy Karczmarczuk wrote:
Just a trivial comment... 1. Don't speak about comparing *languages*
when you compare *algorithms*,
and in
On Sun, 2007-10-28 at 23:34 +0100, Peter Hercek wrote:
Don Stewart wrote:
C++ version times: 1.109; 1.125; 1.125
Int32 cpu times: 1.359; 1.359; 1.375
Int64 cpu times: 11.688; 11.719; 11.766
Integer cpu times: 9.719; 9.703; 9.703
Great result from ghc.
What Haskell program were
On Wed, 2007-10-31 at 23:44 +0100, Henning Thielemann wrote:
On Wed, 31 Oct 2007, Dan Piponi wrote:
But every day, while coding at work (in C++), I see situations where
true partial evaluation would give a big performance payoff, and yet
there are so few languages that natively support
On Sat, 2007-11-03 at 11:40 +, Adrian Hey wrote:
Bulat Ziganshin wrote:
because program that require 8mb stack, will probably require 8gb when
processing more data :)
So.. what? You could say the same about heap, which was rather the point
of the earlier thread.
I personally would
On Thu, 2007-11-08 at 22:54 -0800, Don Stewart wrote:
bulat.ziganshin:
definitely, it's a whole new era in low-level ghc programming
victory!
Now I want a way of getting (well-used) SIMD instructions and such, and
with some luck some high-level approach as well.
On Fri, 2007-11-09 at 17:41 +0100, Alfonso Acosta wrote:
I this there's no need for a binding
How about this?
import Control.Monad (when)
import System.IO
getpasswd :: Handle - IO String
getpasswd h = do wasEnabled - hGetEcho h
when wasEnabled
On Mon, 2007-11-12 at 15:51 -0800, Donn Cave wrote:
On Nov 12, 2007, at 12:00 PM, Galchin Vasili wrote:
I am looking for (objective.. i.e. not juts FPL cheerleading)
opinions as to why Wall Street ( http://www.janestcapital.com/) and
banking are now using OCaml and Haskell. I really
On Tue, 2007-11-13 at 14:21 -0800, Ryan Ingram wrote:
On 11/13/07, Ryan Ingram [EMAIL PROTECTED] wrote:
Also, what stops getRule from going off the end of the array?
I didn't see anything that prevented that in the code, and
you're using unsafeAt, which seems like a
On Tue, 2007-11-13 at 13:51 -0800, Dan Piponi wrote:
On Nov 13, 2007 1:24 PM, Ryan Ingram [EMAIL PROTECTED] wrote:
I tend to prefer where, but I think that guards function declarations are
more readable than giant if-thens and case constructs.
Up until yesterday I had presumed that guards
On Wed, 2007-11-14 at 16:27 -0800, Justin Bailey wrote:
It's:
f $! x = x `seq` f x
That is, the argument to the right of $! is forced to evaluate, and
then that value is passed to the function on the left. The function
itself is not strictly evaluated (i.e., f x) I don't believe.
On Sat, 2007-11-17 at 16:40 +, Andrew Coppin wrote:
Thomas DuBuisson wrote:
BTW, while I'm here... I sat down and wrote my own MD5 implementation.
How is the performance on this new MD5 routine?
Ask me *after* I modify it to give the correct answers. ;-)
Interesting
On Sat, 2007-11-17 at 13:30 -0500, John D. Ramsdell wrote:
...
It seems rather hard to avoid lazyness in the current version of
Haskell when it's not wanted. I hope one of the proposals for deep
strictness makes it into Haskell prime. In my application, there is
one datastructure, such that
On Sat, 2007-11-17 at 16:45 -0800, Tim Chevalier wrote:
On 11/17/07, Derek Elkins [EMAIL PROTECTED] wrote:
However, to put things in motion for something concrete at all, we're
hoping to put together a meeting taking place in the Portland area as
that seems most convenient to the most
On Sat, 2007-11-17 at 17:38 -0800, Tim Chevalier wrote:
On 11/17/07, Derek Elkins [EMAIL PROTECTED] wrote:
Don mentioned that. However, something specifically Haskell and aimed
at a wider audience than just the Portland area is desirable. It's also
a different tone than a user group
On Mon, 2007-11-19 at 21:47 +0100, Radosław Grzanka wrote:
2007/11/19, brad clawsie [EMAIL PROTECTED]:
The problem is that only one person gets to comment on the quality of
a library, the author, who is about the least objective person.
by rolling certain libraries into a base
On Tue, 2007-11-20 at 00:18 -0500, Dimitry Golubovsky wrote:
Hi,
I have been using plain non-monadic CPS for a while in my web-browser
related stuff. Now I am tempted to switch from plain CPS to
syntactically sweetened monadic style based on Continuation Monad, but
I feel stuck with one
On Tue, 2007-11-20 at 13:22 +0200, Gleb Alexeyev wrote:
Dimitry Golubovsky wrote:
If I have
callCC $ \exit - do
foo
...
I cannot jump to `exit' from within foo unless `exit' is given to foo
as an argument.
As Derek Elkins has written, one of the options is to use
On Thu, 2007-11-22 at 01:01 -0500, Dimitry Golubovsky wrote:
Hi,
I finally was able to write a function which grabs the remainder of
the computation in Cont monad and passes it to some function, in the
same time forcing the whole computation to finish by returning a final
value.
I am not
On Fri, 2007-11-23 at 18:45 +, Paulo Silva wrote:
Hello,
Type representations using GADTs are being used to achieve dynamic
typing in Haskell. However, representing polymorphic types is
problematic. Does anyone know any work about including polymorphism
in dynamic typing?
Look at
On Fri, 2007-11-23 at 21:11 -0800, Ryan Ingram wrote:
On 11/22/07, apfelmus [EMAIL PROTECTED] wrote:
A context passing implementation (yielding the ContT monad
transformer)
will remedy this.
Wait, are you saying that if you apply ContT to any monad that has the
On Sat, 2007-11-24 at 11:10 +0100, apfelmus wrote:
Derek Elkins wrote:
Ryan Ingram wrote:
apfelmus wrote:
A context passing implementation (yielding the ContT monad
transformer)
will remedy this.
Wait, are you saying that if you apply ContT to any monad
On Tue, 2007-11-27 at 00:15 +0100, Chris Eidhof wrote:
On 26 nov 2007, at 19:48, Henning Thielemann wrote:
I wonder whether it is a typical mistake of beginners
to write 'return' within a do-block (that is, not at the end)
and if it is possible to avoid this mistake by clever typing.
In a
On Thu, 2007-11-29 at 07:29 +, Thomas Davie wrote:
On 29 Nov 2007, at 06:32, PR Stanley wrote:
Hi
Thanks for the response.
JCC: In most languages, if you have some expression E, and when the
computer attempts to evaluate E it goes in to an infinite loop, then
when the
On Sun, 2007-12-02 at 03:29 +, Robin Green wrote:
On Sat, 01 Dec 2007 21:22:53 -0600
Derek Elkins [EMAIL PROTECTED] wrote:
There's also the issue of finding a more elegant way of threading
the Store through my evaluator, but I'm not concerned too much
about that at this point. I
On Sun, 2007-12-02 at 21:54 -0800, Don Stewart wrote:
catamorphism:
On 12/2/07, Don Stewart [EMAIL PROTECTED] wrote:
prstanley:
Hi
data Tree = Leaf Int | Node Tree Int Tree
occurs :: Int - Tree - Bool
occurs m (Leaf n) = m == n
occurs m (Node l n r) = m == n || occurs
On Mon, 2007-12-03 at 16:56 +0200, Yitzchak Gale wrote:
Adrian Neumann wrote:
data Tree a = Leaf a | Node a [Tree a]
example: given a tree t and two nodes u,v, find the
first common ancestor. In Java this is really simple,
because each node has a parent reference...
In Haskell however
On Mon, 2007-12-03 at 10:48 +0100, Ketil Malde wrote:
Johan Tibell [EMAIL PROTECTED] writes:
It would be great if someone could exemplify these rules of thumb,
e.g. Primitive types such as Int should be strict unless in the three
canonical examples X, Y and Z. My strictness radar is still
On Mon, 2007-12-03 at 19:13 -0800, Stefan O'Rear wrote:
On Mon, Dec 03, 2007 at 09:18:18AM -0800, Carlo Vivari wrote:
Hi! I'm a begginer in haskell and I have a problem with an exercise, I
expect
someone could help me:
In one hand I have a declaration of an algebra data, like this:
On Wed, 2007-12-05 at 10:01 +0100, Pablo Nogueira wrote:
Hasn't Ryan raised an interesting point, though?
Bottom is used to denote non-termination and run-time errors. Are they
the same thing?
Up to observational equality, yes.
To me, they're not. A non-terminating program has
different
On Sat, 2007-12-08 at 16:39 -0800, Bryan O'Sullivan wrote:
Loganathan Lingappan wrote:
main = do
hSetBuffering stdin LineBuffering
numList - processInputs
foldr (+) 0 numList
The type of main is understood to be IO (), so it can't return anything.
You could
On Tue, 2007-12-11 at 23:06 -0500, [EMAIL PROTECTED] wrote:
On 2007.12.12 03:29:13 +0100, Wolfgang Jeltsch [EMAIL PROTECTED] scribbled
1.6K characters:
Am Mittwoch, 12. Dezember 2007 03:12 schrieb [EMAIL PROTECTED]:
FWIW to the discussion about changing the main page, I was reading the
On Sun, 2007-12-16 at 13:49 +0100, apfelmus wrote:
Dan Weston wrote:
newtype O f g a = O (f (g a)) -- Functor composition: f `O` g
instance (Functor f, Functor g) = Functor (O f g) where ...
instance Adjunction f g = Monad (O g f) where ...
instance Adjunction f g =
On Mon, 2007-12-17 at 13:51 +, Bayley, Alistair wrote:
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nicholls, Mark
To recap...
type introduces a synonym for another type, no new type is
createdit's for readabilities sake.
Newtype introduces an
On Mon, 2007-12-17 at 09:58 -0500, David Menendez wrote:
On Dec 17, 2007 4:34 AM, Yitzchak Gale [EMAIL PROTECTED] wrote:
Derek Elkins wrote:
There is another very closely related adjunction that is
less often
mentioned.
((-)-C)^op
On Mon, 2007-12-17 at 22:12 +0300, Miguel Mitrofanov wrote:
There's a third way, too, and I haven't seen anybody mention it yet
I've noticed it, but there are some problems with this
representation, so I decided not to mention it. It's OK as far as we
don't want functions working on two
On Mon, 2007-12-17 at 21:22 -0200, Andre Nathan wrote:
On Mon, 2007-12-17 at 17:33 -0200, Andre Nathan wrote:
Hello (Newbie question ahead :)
Thanks everyone for the great suggestions. The code is much cleaner now
(not to mention it works :)
This is the first non-tutorial program I'm
On Tue, 2007-12-18 at 23:04 -0800, Don Stewart wrote:
jules:
Brad Larsen wrote:
Hi there list,
How would one go about creating a new type for a subset of the integers,
for (contrived) example just the even integers? I was thinking of
making a new type
newtype EvenInt =
On Fri, 2007-12-21 at 09:13 -0800, Justin Bailey wrote:
Given this function:
dropTest n = head . drop n $ [1..]
I get a stack overflow when n is greater than ~ 550,000 . Is that
inevitable behavior for large n? Is there a better way to do it?
A similar example is discussed on
On Fri, 2007-12-21 at 09:56 -0800, David Benbennick wrote:
On Dec 21, 2007 9:51 AM, Justin Bailey [EMAIL PROTECTED] wrote:
I think its [1..] which is building up the unevaluated thunk. Using
this definition of dropTest does not blow the stack:
It also works if you do [(1::Int) ..] !! n,
On Mon, 2007-12-24 at 11:15 +0200, Cristian Baboi wrote:
While reading the Haskell language report I noticed that function type is
not an instance of class Read.
I was told that one cannot define them as an instance of class Show
without breaking referential transparency or printing a
On Fri, 2007-12-28 at 17:54 -0600, Jonathan Cast wrote:
Programming languages are generally classified into three groups,
imperative, functional, and logical. The difference is in the style
of programming encouraged (or mandated, for older languages) by the
language.
Usually the
On Sun, 2007-12-30 at 12:27 +0100, [EMAIL PROTECTED]
wrote:
[...]
I don't understand your point. We know what swimming is: floating and
moving autonomously. Thinking is different, since our thinking is (at least
for some of us) conscious, and we have no idea what is the conscience.
For
On Wed, 2008-01-02 at 15:49 +0200, Yitzchak Gale wrote:
[...]
Some people are worried that this version of Hask is missing
certain nice properties that one would like to have. For
example, it was recently claimed on this list that tuples
are not products in that category. (Or some such. I
On Sun, 2008-01-06 at 16:19 +0100, Daniel Fischer wrote:
Am Sonntag, 6. Januar 2008 15:54 schrieb Achim Schneider:
Daniel Fischer [EMAIL PROTECTED] wrote:
Am Sonntag, 6. Januar 2008 15:18 schrieb Andrew Coppin:
Daniel Fischer wrote:
Just because I don't know:
what bugs would be
On Sun, 2008-01-06 at 09:45 -0800, Jonathan Cast wrote:
On 6 Jan 2008, at 3:02 AM, Derek Elkins wrote:
On Fri, 2007-12-28 at 17:54 -0600, Jonathan Cast wrote:
Programming languages are generally classified into three groups,
imperative, functional, and logical. The difference
On Sun, 2008-01-06 at 22:31 +0100, [EMAIL PROTECTED]
wrote:
Derek Elkins writes:
Jonathan Cast wrote:
I find the term `declarative' to be almost completely meaningless.
I was originally thinking of having the final sentence: There are no
clear, accepted meanings for any
On Sun, 2008-01-06 at 13:48 -0800, Jonathan Cast wrote:
On 6 Jan 2008, at 1:31 PM, [EMAIL PROTECTED] wrote:
Derek Elkins writes:
Jonathan Cast wrote:
I find the term `declarative' to be almost completely meaningless.
I was originally thinking of having the final sentence
On Sun, 2008-01-06 at 23:28 +0100, [EMAIL PROTECTED]
wrote:
Derek Elkins writes:
Jonathan Cast wrote:
I find the only
similarity between Haskell and Prolog to be that neither is imperative.
Indeed, you've discovered it. The definition of declarative is often
not imperative
On Sun, 2008-01-06 at 23:44 +0100, Peter Verswyvelen wrote:
If I understand it correctly, implicit parameters in Haskell allow you
to pass values to functions with explicitly adding a parameter to each
of the functions being “called” (I appologize for my imperative
terminology here. How would
On Fri, 2007-12-28 at 09:51 -0700, Luke Palmer wrote:
On Dec 28, 2007 9:35 AM, Jules Bean [EMAIL PROTECTED] wrote:
In particular, adding sharing can stop something being GCed, which can
convert an algorithm which runs in linear time and constant space to one
which runs in linear space (and
On Mon, 2008-01-07 at 18:15 +0300, Miguel Mitrofanov wrote:
data Stack a = Stack { run :: [a] - (a, [a]) }
[...skipped...]
But, I have simply no clue how to fix that. :-(
Can anybody give my a hint?
Yes. It's simply impossible. The Stack data type can't be turned into
a monad.
On Mon, 2008-01-07 at 17:24 +0100, Peter Verswyvelen wrote:
Derek Elkins wrote:
Implicit parameters add an extra argument to a function conceptually.
What you need is to add an argument to SF which implicit parameters
don't know how to do since SF is just some data structure. One way
On Mon, 2008-01-07 at 18:21 +, Paul Johnson wrote:
Miguel Mitrofanov wrote:
Yes. It's simply impossible. The Stack data type can't be turned into
a monad.
Why not? Surely this is just a variation on the theme of a state monad?
I somewhat explain in this reply:
On Mon, 2008-01-07 at 20:26 +, Jon Harrop wrote:
On Monday 07 January 2008 20:27:17 Peter Verswyvelen wrote:
If your compiler (pretty amazing job btw) does whole program optimization,
can it remove the dictionary (aka v-table in C/C++ parlance?) overhead of
type classes? Because if I
in code
bloat?)
Can the same trick be used in GHC?
Regarding Derek Elkins excellent example
f :: Show a = Int - a - String -- type signature required
f 0 x = show x
f n x = f (n-1) (x,x)
this indeed cannot be inlined nor optimized away, since you generally
don't know the value
On Tue, 2008-01-08 at 17:14 +, Richard Kelsall wrote:
Henning Thielemann wrote:
On Tue, 8 Jan 2008, Richard Kelsall wrote:
...
'=' is spoken bind
...
On a related note, if there isn't already, it would be nice to have a
page in the wiki that gives good ways of vocalizing the
On Wed, 2008-01-09 at 00:51 +0100, Achim Schneider wrote:
Fernando Rodriguez [EMAIL PROTECTED] wrote:
Hi,
Is currying in Haskell the same thing as Partial Evaluation
(http://en.wikipedia.org/wiki/Partial_evaluation)? Am I getting
partial evaluation for free just by using Haskell?
On Wed, 2008-01-09 at 03:37 +0100, Achim Schneider wrote:
Derek Elkins [EMAIL PROTECTED] wrote:
On Wed, 2008-01-09 at 00:51 +0100, Achim Schneider wrote:
Fernando Rodriguez [EMAIL PROTECTED] wrote:
Hi,
Is currying in Haskell the same thing as Partial Evaluation
On Wed, 2008-01-09 at 04:32 +0100, Achim Schneider wrote:
Derek Elkins [EMAIL PROTECTED] wrote:
On Wed, 2008-01-09 at 03:37 +0100, Achim Schneider wrote:
Derek Elkins [EMAIL PROTECTED] wrote:
On Wed, 2008-01-09 at 00:51 +0100, Achim Schneider wrote:
Fernando Rodriguez [EMAIL
On Tue, 2008-01-08 at 21:44 -0800, Jonathan Cast wrote:
On 8 Jan 2008, at 7:56 PM, Derek Elkins wrote:
Can we stop using confusing, misleading or outright wrong definitions
and analogies?
What, and bring CS to a halt?
CS wouldn't be the only thing brought to a halt
On Wed, 2008-01-09 at 15:06 +, Dougal Stanton wrote:
On 09/01/2008, Yu-Teh Shen [EMAIL PROTECTED] wrote:
I got question about why haskell insist to be a purely FL. I mean is
there any feature which is only support by pure?
Have a look at the ueber-retrospective on Haskell, fifty-five
On Sun, 2008-01-13 at 20:59 +0100, Hugh Perkins wrote:
What are the possibilities for website construction using Haskell?
http://hackage.haskell.org/packages/archive/pkg-list.html
http://www.haskell.org/haskellwiki/Applications_and_libraries/Web_programming
I'm sure you can figure it out from
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.
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,
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 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
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 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
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
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
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
Michael Vanier wrote:
P. R. Stanley wrote:
What are the pre-requisites for Lambda calculus?
Thanks
Paul
Learning lambda calculus requires no prerequisites other than the
ability to think clearly. However, don't think that you need to
understand all about lambda calculus in order to learn
Neil Mitchell wrote:
Hi
I'm starting to play with GADT's, and I was trying to write a safe
version of head and tail, on a safe version of lists. What I came up
with is:
data ConsT a
data NilT
data List a t where
Cons :: a - List a b - List a (ConsT b)
Nil :: List a NilT
instance
On Thu, 2008-01-17 at 03:16 +0100, Mitar wrote:
Hi!
On Jan 11, 2008 7:30 AM, Cristian Baboi [EMAIL PROTECTED] wrote:
NaN is not 'undefined'
Why not? What is a semantic difference? I believe Haskell should use
undefined instead of NaN for all operations which are mathematically
undefined
On Fri, 2008-01-18 at 07:32 +0100, Peter Verswyvelen wrote:
Reminds me of a song, I'm dreaming of a ... dotnet Haskell...
I find it such a petty no real work seems to be done on that.
No one is stopping you.
___
Haskell-Cafe mailing list
On Sun, 2008-01-20 at 18:18 +, Lauri Pesonen wrote:
Hi,
I'm relatively new to Haskell so please bear with me. I'm trying to
parse Java class files with Data.Binary and I'm having a few problems:
(The class file format is described here:
On Mon, 2008-01-21 at 16:18 +, Lauri Pesonen wrote:
Hi Derek,
Thanks for the reply.
On 20/01/2008, Derek Elkins [EMAIL PROTECTED] wrote:
You may want to consider using the other side of Data.Binary rather than
the Binary class. The -class- Binary is intended for de/serialization
On Mon, 2008-01-21 at 22:36 +0100, Peter Verswyvelen wrote:
Hey, I knew about the forall (I use that to represent OO style
collections, very handy), but not about the exists. Thanks. But GHC
6.8.2 (with -fglasgow-exts) does not seem to accept this exists
keyword?
That's because it isn't GHC
On Tue, 2008-01-22 at 02:24 +0200, Yitzchak Gale wrote:
I wrote:
That said, looking around briefly, I came up with this paper
by L'Ecuyer et al that does seem to describe a decent
random generator with properties of split worked out:
Derek Elkins wrote:
According to the documentation
On Tue, 2008-01-22 at 07:45 -0200, Felipe Lessa wrote:
2008/1/22 Magnus Therning [EMAIL PROTECTED]:
I vaguely remember that in GHC 6.6 code like this
length $ map ord a string
being able able to generate a different answer than
length a string
I guess it's not very difficult
On Tue, 2008-01-22 at 11:55 -0500, Michael Speer wrote:
I've been using the creation of a regular expression engine as an
ongoing project to learn Haskell. Last night I created the newest
iteration.
My love for the irrefutable pattern can be found in the definition of
the rexn ( apply
On Thu, 2008-01-24 at 10:45 +0100, Peter Hercek wrote:
Tim Chevalier wrote:
On 1/23/08, Peter Hercek [EMAIL PROTECTED] wrote:
Other things did not seem that great for me from the beginning. For
example: referential transparency - just enforces what you can take care
not to do yourself
On Wed, 2008-01-23 at 13:29 +, Simon Peyton-Jones wrote:
Friends
Over the next few months I'm giving two or three talks to groups of
*non* functional programmers about why functional programming is
interesting and important. If you like, it's the same general goal as
John Hughes's
On Sun, 2008-01-27 at 14:30 -0800, Don Stewart wrote:
brian.sniffen:
On Jan 27, 2008 3:49 AM, Bulat Ziganshin [EMAIL PROTECTED] wrote:
a few months ago i
have a conversation with today student and they still learn Lisp (!!!).
it seems that they will switch to more modern FP languages
On Sun, 2008-01-27 at 17:25 -0500, Brian Sniffen wrote:
On Jan 27, 2008 3:49 AM, Bulat Ziganshin [EMAIL PROTECTED] wrote:
a few months ago i
have a conversation with today student and they still learn Lisp (!!!).
it seems that they will switch to more modern FP languages no earlier
that
On Mon, 2008-01-28 at 14:39 -0500, istarex wrote:
On Jan 28, 2008 1:07 PM, Neil Mitchell [EMAIL PROTECTED] wrote:
To answer the question if Haskell has a stack depth restriction ...
like Java the answer is no. It has a stack depth restriction, but its
absolutely nothing like Java in the
101 - 200 of 581 matches
Mail list logo