On Mon, 2007-08-13 at 22:29 +0200, Benjamin Franksen wrote:
Brian Brunswick wrote:
One thing that I keep seeing people say (not you), is that
monads /sequence/
side effects. This is wrong, or at
least a limited picture.
/All/ of the above structures are about combining compatible
On Mon, 2007-08-13 at 19:31 +0200, peterv wrote:
When I read side-effects, I understand it as unwanted effects, like
aliasing, and effects depending on the order of execution. I'm not sure
if my understanding here is correct. I hope Haskell does not allow
side-effects but only effects, meaning
On Tue, 2007-08-14 at 09:55 -0500, Lanny Ripple wrote:
Having just gone through all the tutorials and things (again but
this time I think it stuck) the Haskell community is on the wrong
track as far as teaching Monads to new programmers.
If I were teaching addition and multiplication to
On Tue, 2007-08-14 at 12:40 -0500, Lanny Ripple wrote:
Derek Elkins wrote:
What people need to do is stop reading two page blog posts by someone
who's just got monads and read the well-written peer-reviewed papers
I have taught many people to program in group settings and
individually
On Sat, 2007-08-18 at 20:35 +0200, Peter Verswyvelen wrote:
When reading an article about tail recursion
(http://themechanicalbride.blogspot.com/2007/04/haskell-for-c-3-programmers.
html) I came across the follow statements:
If you can write a non-recursive function that uses the colon
On Wed, 2007-08-22 at 23:24 +0200, Marc A. Ziegert wrote:
i interpret it as this:
all [ usage x usage y || fun_to_talk_about x fun_to_talk_about y
| let lang=[minBound .. maxBound] -- C++,Haskell,Java,etc.
, x-lang
, y-lang
, irc_channel_users x irc_channel_users y
[*] Which notation do you use for functions in text? is f() ok?
Sure, although a little unusual for Haskell where f() means f applied
to the empty tuple. Some people use |f| (generally those who use
latex), but generally it can be inferred from the context what is a
function
Neil's
On Thu, 2007-08-23 at 10:17 +1000, Donald Bruce Stewart wrote:
overdrigzed:
Using the fromInteger (and fromRational) axioms should only *increase*
precission, I don't see how that is such a bad thing.
I think it's bad if the behaviour of your program depends on the
optimisation
On Sat, 2007-08-25 at 22:51 +0100, Philippa Cowderoy wrote:
On Sat, 25 Aug 2007, Andrew Coppin wrote:
Would be nice if I could build something in Haskell that overcomes these.
OTOH, does Haskell have any way to talk to the audio hardware?
It would definitely be nice if someone wrote a
On Sat, 2007-08-25 at 23:36 +0200, [EMAIL PROTECTED]
wrote:
Evan Laforge writes:
Indeed, you can write certain DSP algorithms beautifully in Haskell.
Now, if only it could talk to the audio hardware... (Or just use common
file formats even.)
Oh, that's easy. I wrote an FFI
On Sun, 2007-08-26 at 14:50 +0200, manu wrote:
Hello,
After reading Peter Norvig's take on writing a Sudoku solver (http://
norvig.com/sudoku.html)
I decided that I would port his program to Haskell, without changing
the algorithm, that'll make a nice exercise I thought
and should be
On Mon, 2007-08-27 at 16:29 +0200, Peter Verswyvelen wrote:
A while ago I confused currying with partial application, which was
pointed out by members of this community, and the wiki pages got adapted
so that newbies like me don't make the same mistake twice ;) That's great.
Anyway, at the
On Mon, 2007-08-27 at 17:56 +0200, Peter Verswyvelen wrote:
Look at Template Haskell.
Intuitively Template Haskell provides new language features that
allow us to convert back and forth between concrete syntax, i.e. what
Gee coming from C++ that was the last thing I expected templates to
On Thu, 2007-08-30 at 11:34 +0800, Hugh Perkins wrote:
On 8/26/07, Peter Verswyvelen [EMAIL PROTECTED] wrote:
Game developers are really struggling to get performance out of the
Playstation 3 console. This console has a single PowerPC CPU with 6 Cell SPU
coprocessors, all running at 3.3GHz.
On Thu, 2007-08-30 at 18:17 +0200, Peter Hercek wrote:
Hi,
I find the feature that the construct let x = f x in expr
assigns fixed point of f to x annoying. The reason is that
I can not simply chain mofifications a variable like e.g. this:
f x =
let x = x * scale in
let x = x
On Thu, 2007-08-30 at 23:58 +0200, [EMAIL PROTECTED]
wrote:
Dan Piponi writes:
In mathematics, if you write x = f y you mean that these two
expressions are equal. In Haskell, if you say x = f y you mean *make*
then equal!
Haskell is a declarative language, not an imperative
On Sun, 2007-09-02 at 22:52 +0800, Hugh Perkins wrote:
Sooo.. what is the modern equivalent of Prolog?
Because no one has said it quite this way:
The modern equivalent of Prolog is Prolog.
Most of the advancement in logic programming has either been folded back
into Prolog or has been advanced
On Mon, 2007-09-03 at 14:57 +0200, Henning Thielemann wrote:
In the current Haskell Wiki (haskell.org/haskellwiki) I found references
to articles of the old Hawiki (haskell.org/hawiki), like OnceAndOnlyOnce
and SeparationOfConcerns. Are the files still available somewhere?
Bring back HaWiki!
On Mon, 2007-09-03 at 19:47 +0200, Lars Oppermann wrote:
Dear all,
In the Haskell Wiki at http://www.haskell.org/haskellwiki/Closure
there is an example for a function returning a closure given as
f x = (\y - x + y)
Another way to achieve the same effect would be to write
f' x = (+)
On Mon, 2007-09-03 at 20:44 +0200, Lars Oppermann wrote:
Ah, thanks...
However, I think I have just become more confused as to what makes a
closure a closure. The defining principle seems to go along the lines
some kind of context that is enclosed within the closure object. It
was argued
On Mon, 2007-09-03 at 15:35 -0400, Andrew Wagner wrote:
I've been reading the classic Why functional programming matters
paper [1] lately, particularly looking at the alpha beta stuff. I've
ported all his code to haskell, but I have a question.
His algorithm takes a board position, creates a
On Mon, 2007-09-03 at 21:56 +0200, Henning Thielemann wrote:
On Tue, 4 Sep 2007, Donald Bruce Stewart wrote:
lemming:
... and there was unfortunately no support in porting the stuff. I guess
some simple program (perl -p -e 's/{{{/hask/g' :-) could have simplified
a lot. Its
On Tue, 2007-09-04 at 09:38 +1200, Daniel McAllansmith wrote:
On Tuesday 04 September 2007 08:29, Neil Mitchell wrote:
Hi
There are two entirely separate issues in this thread - let's not confuse
them.
1) The old HaWiki content is good and unavailable. I want it made
available, in
On Mon, 2007-09-03 at 23:50 +0200, Henning Thielemann wrote:
On Mon, 3 Sep 2007, Derek Elkins wrote:
The issue is that we don't know what the license is for the -content-
of HaWiki. HaskellWiki explicitly states that all the content in it has
a specific license. We can't take the old
On Wed, 2007-09-05 at 13:21 +1000, Thomas Conway wrote:
On 9/2/07, Andrew Coppin [EMAIL PROTECTED] wrote:
One of standard exercices in Prolog is the construction of the
meta-interpreter of Prolog in Prolog. While this is cheating, I recommend
it to you. It opens eyes.
Ever tried
On Sat, 2007-09-08 at 12:24 +1000, Stuart Cook wrote:
On 9/8/07, Ryan Ingram [EMAIL PROTECTED] wrote:
This does what you want, I think:
{-# LANGUAGE ExistentialQuantification #-}
module Exist where
data Showable = forall a. (Show a) = Showable a
instance Show Showable where
On Sun, 2007-09-09 at 15:09 +0200, Peter Verswyvelen wrote:
Why? What is your application? In fact, alphanumeric identifiers are
used as unary operators.
Why? Well, why are binary operators allowed and unary operators not?
Isn't that some kind of discrimination? In math, many many
On Mon, 2007-09-10 at 00:49 +0100, Neil Mitchell wrote:
Hi
(Some list operations are too expensive with ByteString but for most
string processing it's perfectly fine and much faster than String).
I'm sure it's true, but it's quite irrelevant to my question, which is
why is using
On Mon, 2007-09-10 at 15:47 +1000, Stuart Cook wrote:
On 9/10/07, PR Stanley [EMAIL PROTECTED] wrote:
Hi
Any comments and/or criticisms would be most appreciated:
--count the occurrences of char in string
countC :: Char - [Char] - Int
countC x xs = sum [1 | c - xs, c == x]
That's a
On Tue, 2007-09-11 at 16:48 -0700, Don Stewart wrote:
byorgey:
On 9/11/07, Don Stewart [EMAIL PROTECTED] wrote:
byorgey:
On 9/11/07, PR Stanley [EMAIL PROTECTED] wrote:
Hi
take 1000 [1..3] still yields [1,2,3]
I thought it
On Wed, 2007-09-12 at 23:36 +, Aaron Denney wrote:
On 2007-09-12, Don Stewart [EMAIL PROTECTED] wrote:
ok:
I've been told that functional dependencies are old hat and there is
now something better. I suspect that better here means worse.
Better here means better -- a functional
On Thu, 2007-09-13 at 11:12 -0700, Don Stewart wrote:
Better here means better -- a functional language on the type
system,
to type a functional language on the value level.
-- Don
For a taste, see Instant Insanity transliterated in this functional
language:
On Thu, 2007-09-13 at 19:34 +0100, Jules Bean wrote:
Any comments? I'm sure this has been shown before but I don't
remember where.
The Monad Transformer Library essentially does this, the types you get
are along the lines of:
foo :: (Monad m, MonadState s m, MonadReader r m) = m Int
On Tue, 2007-09-18 at 18:13 +0200, Thomas Girod wrote:
Hi there. Beeing rather new to the realm of Haskell and functional
programming, I've been reading about how is easier it is to
parallelize code in a purely functional language (am I right saying
that ?).
My knowledge of parallelization
On Sat, 2007-09-22 at 21:14 -0700, Thomas Hartman wrote:
I came up with the following functions to do reverse. The first one
is obviously bad, because of the expensive list concat. The last one,
myreverse, I think is the reference implementation you get in the
prelude. The ones between, I'm
On Sun, 2007-09-23 at 20:03 -0400, Cale Gibbard wrote:
On 23/09/2007, Neil Mitchell [EMAIL PROTECTED] wrote:
Hi
The haskell-cafe@ mailing list is more appropriate for messages such
as this. haskell@ is just for announcements (it should be called
haskell-annouce@ !)
* Lambda
On Mon, 2007-09-24 at 19:11 -0700, Dan Weston wrote:
Well, I did footnote in my first e-mail that:
[1] I used the asterisk in the category name Hask* to exclude undefined
values or partial functions
[Although I think I may have flipped the asterisk convention.]
I see what you mean by
On Tue, 2007-09-25 at 12:24 +0100, Andrew Coppin wrote:
Chaddaï Fouché wrote:
2007/9/25, Andrew Coppin [EMAIL PROTECTED]:
This is why I found it so surprising - and annoying - that you can't use
a 2-argument function in a point-free expression.
For example, zipWith (*) expects two
On Tue, 2007-09-25 at 16:18 -0500, Creighton Hogg wrote:
On 9/25/07, Philippa Cowderoy [EMAIL PROTECTED] wrote:
On Tue, 25 Sep 2007, Seth Gordon wrote:
Are Benjamin C. Pierce's _Types and Programming Languages_
and/or _Basic
Category Theory for
On Wed, 2007-09-26 at 18:50 -0400, Steven Fodstad wrote:
Andrew Coppin wrote:
Chaddaï Fouché wrote:
2007/9/25, Andrew Coppin [EMAIL PROTECTED]:
This is why I found it so surprising - and annoying - that you can't
use
a 2-argument function in a point-free expression.
For example,
On Wed, 2007-09-26 at 17:23 -0700, Dan Weston wrote:
Not to beat a dead horse, but I wasn't suggesting to rename the fix
function that everyone knows and loves:
fix :: (a - a) - a
fix f = let f' = f f' in f'
I was merely trying to suggest that it would be wise to rename the
function in
On Sat, 2007-09-29 at 17:58 +0100, PR Stanley wrote:
Hi
in C type languages a function must be declared before its application.
Would I be right in thinking that this isn't the case in Functional languages?
For example:
transmit :: String - String
transmit = decode . channel . encode
On Wed, 2007-10-03 at 01:42 +0100, PR Stanley wrote:
f x = x + x
Is the x use to create a pattern in the definition and when f is
called it's replaced by a value?
Those equation-like definitions are syntactic sugar for lambda
abstractions. f could as well be defined as f = \x -
On Wed, 2007-10-03 at 22:31 +1000, Stuart Cook wrote:
On 10/3/07, PR Stanley [EMAIL PROTECTED] wrote:
Without looking at the standard prelude, define the
higher-order library function curry that converts a function
on pairs into a curried
function, and
On Mon, 2007-10-08 at 20:54 +1000, Thomas Conway wrote:
I just had a conversation today that seems relevant to this thread. I
was chatting with a friend who is working in the academic sector, and
I was observing that Melbourne Uni (my old school), is switching in
the new year from teaching
On Wed, 2007-10-10 at 23:48 +0100, Philippa Cowderoy wrote:
On Wed, 10 Oct 2007, Andrew Coppin wrote:
(I'm less sold on whether you really need to learn a particular dialect
well enough to *program* in it...)
If you don't then you won't be able to see how complicated things actually
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
1 - 100 of 527 matches
Mail list logo