On Tue, 2008-10-07 at 15:50 -0400, David Barton wrote:
> OK, I suspect this is a real newbie error, but please have mercy. I have
> downloaded and installed cabal (at least it responds to the --help command
> from the command line). Yet when I do, say (to give a real example):
>
> cabal config
Recently, I had recommended Liskell to somebody in the thread entitled
"Closest statically typed FP "cousin" to Scheme?" (on
comp.lang.scheme) (see
http://groups.google.se/group/comp.lang.scheme/browse_thread/thread/1fa8fb06885cfd8f/a65f73105ef671a1?#a65f73105ef671a1),
but then another user replie
On Fri, 10 Oct 2008 00:24:08 -0400, John Dorsey <[EMAIL PROTECTED]>
wrote:
>> dmehrtash:
>> >What is the difference between empty list [] and list with one unit
>> >element [()]?
>>
>> Prelude> length []
>> 0
>> Prelude> length [()]
>> 1
>
>Also, they differ in type.
>
>[(
> What is the difference between empty list [] and list with one unit element
> [()]?
>
The [] constructor takes no arguments and is like Nothing in the Maybe
type. The list ":" (cons) infix constructor takes two arguments, an
element of type a and a list of type a, to construct a new list. Com
> dmehrtash:
> >What is the difference between empty list [] and list with one unit
> >element [()]?
>
> Prelude> length []
> 0
> Prelude> length [()]
> 1
Also, they differ in type.
[()] is a list of unit elements, and happens to contain exactly one
of them.
[] is a (pol
dmehrtash:
>What is the difference between empty list [] and list with one unit
>element [()]?
Prelude> length []
0
Prelude> length [()]
1
:-)
-- Don
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/
What is the difference between empty list [] and list with one unit element
[()]?
daryoush
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Needs text in Haskell's official font ;)
http://research.microsoft.com/~simonpj/papers/haskell-tutorial/TasteOfHaskell.pdf
http://research.microsoft.com/~simonpj/papers/ndp/NdpSlides.pdf
http://research.microsoft.com/~simonpj/papers/marktoberdorf/Marktoberdorf.ppt
signature.asc
Description: Thi
Sure thing: http://cale.yi.org/LambdaAsphalt-1920x1200.jpg
cheers!
- Cale
2008/10/9 Magnus Therning <[EMAIL PROTECTED]>:
> On Thu, Oct 9, 2008 at 8:24 AM, Cale Gibbard <[EMAIL PROTECTED]> wrote:
>> Hello!
>>
>> I worked on this for a few minutes in the GIMP. Thought it might look
>> nice spraypa
On Thu, Oct 09, 2008 at 05:11:17PM +0100, Eric Kow wrote:
> This is a correction to my previous announcement. I had misgrepped the
> ChangeLog. There are only 20 bug fixes and 7 new features since 2.0.2.
Nevermind. It's way better than 2.0.2, anyway ;-)
Ciao,
Kili
--
the story in pthr
Don Stewart wrote:
http://sandersn.com/blog/index.php?title=two_weeks_of_haskell
Has some good thoughts on what tripped him up in his first two weeks of
Haskell programming. Anything people want to work on there? :-)
Worth a read if you're thinking about how to make Haskell yet more
accessible.
Magnus Therning wrote:
Very nice indeed. You don't have any images in aspect 8x5 that don't
include the window decorations? ;-) (Yes, I'm lazy!)
I replaced the sphereflake image with one without window decorations:
http://syn.cs.pdx.edu/~jsnow/glome/sphereflake5-720p.png
I don't have any
Ryan Ingram wrote:
There's also a haskell98 way to do the same thing, it's just a bit
more wordy at the ghci prompt, and a bit more work to decode the
result:
ghci> :t \z -> (foo (undefined :: Bar x) z :: Bar y)
Now, the type of this expression is clearly
type of z -> Bar y
So just read the
Hi,
After running bootstrap.sh, I got an error
related to 'pushd' not beeing available. In
fact, when I run 'man sh' I can't find 'pushd'
as a command. However, just changing
#!/bin/sh
to
#!/bin/bash
(bash do have 'pushd') the installation
process went well, except that I got this
package ver
Reiner Pope wrote:
The syntax is for the implicit parameter extension[1]. I think you
would write your example as
foo (undefined :: Bar x) ?z :: Bar y
Then querying the type of that whole expression with :t will list ?z's
type in the expression's constraints. (Of course, you should turn off
On Thu, 2008-10-09 at 15:14 -0300, Mauricio wrote:
> About cabal: the fact that the last versions of packages
> are not available in the pointed place mean I should
> not use cabal? For instance, utf8-string is using github.com
> instead of the darcs page pointed in its hackage page. Does
> that m
So, the law under discussion is
(m `mplus` n) >>= f == (m >>= f) `mplus` (n >>= f)
Definitely holds for lists and other backtracking searches, but it
definitely doesn't hold for non-backtracking monads like Maybe.
In particular:
divide n 0 = mzero
divide n x = return (n `div` x)
(Just 0 `mplu
On Thu, 2008-10-09 at 20:20 +0200, apfelmus wrote:
> Daryoush Mehrtash wrote:
> > Assuming A, B, C are monadic operation. How do you read the following
> > function:
> >
> > do
> > A 'mplus' B
> > C
> >
> > I expect this to translate to:
> >
> > (A 'mplus' B) >>= C
>
> It
Daryoush Mehrtash wrote:
> Assuming A, B, C are monadic operation. How do you read the following
> function:
>
> do
> A 'mplus' B
> C
>
> I expect this to translate to:
>
> (A 'mplus' B) >>= C
It translates to
(A `mplus` B) >> C
> Can I then say it is equivalent to:
Hi,
I want to use a few libraries from hackage
and have already download and built them. Can
I install those libraries somewhere in my
home dir (...)
$ cabal instsll xmonad
Does exactly that by default. No other flags are required.
(...)
Nice. Thanks for all tips. Reading them I understood
Assuming A, B, C are monadic operation. How do you read the following
function:
do
A 'mplus' B
C
I expect this to translate to:
(A 'mplus' B) >>= C
Can I then say it is equivalent to:
(A >>=C) mplus (B >>=C)
Thanks,
Daryoush
___
cabal install --reinstall
On Thu, Oct 9, 2008 at 6:42 PM, Anatoly Yakovenko <[EMAIL PROTECTED]> wrote:
> is the a way to reinstall a package with cabal install? I want to add
> profiling support to a libarary.
>
> Thanks,
> Anatoly
> ___
> Haskell-Cafe
On Thu, 2008-10-09 at 09:42 -0700, Anatoly Yakovenko wrote:
> is the a way to reinstall a package with cabal install? I want to add
> profiling support to a libarary.
Yes. With cabal-install-0.5.2 and later:
$ cabal install foobar --reinstall --enable-library-profiling
If you always want profi
On Thu, 2008-10-09 at 10:08 -0300, Mauricio wrote:
> Hi,
>
> I want to use a few libraries from hackage
> and have already download and built them. Can
> I install those libraries somewhere in my
> home dir (I want to avoid installing as root)
> so that ghc can find them?
>
> If so, which options
On Thu, 2008-10-09 at 06:15 +0200, Alfonso Acosta wrote:
> ghc-pkg hide {pkg-id}
This will only make a difference to ghc --make. It makes no difference
to anything built using Cabal.
> On Thu, Oct 9, 2008 at 5:53 AM, Jason Dusek <[EMAIL PROTECTED]> wrote:
> > I don't know anything about how to
I was wondering if it was possible to implement synchronous channels
within STM. In particular, I'd like to have CSP-like send and recv primitives
on a channel that each block until the other side arrives to complete
the transaction.
I think I've convinced myself that it's not possible, but
anyon
is the a way to reinstall a package with cabal install? I want to add
profiling support to a libarary.
Thanks,
Anatoly
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
This seemed like an interesting problem, so I whipped together a
quick-and-dirty implementation of transactional CML semantics in
Haskell using STM.
Example:
main = do
forkIO chsThread -- administrative thread that manages communication
forkIO (synchronize test1 >>= print)
synchronize
On Thu, Oct 9, 2008 at 18:10, Arnar Birgisson <[EMAIL PROTECTED]> wrote:
>> But I did write a concurrent prime sieve with it:
>
> I did the same, with the one-place-buffers (the MVars implemented over
> STM). Be warned that there is no stop condition, this just keeps
> printing primes forever.
Ple
This is a correction to my previous announcement. I had misgrepped the
ChangeLog. There are only 20 bug fixes and 7 new features since 2.0.2.
Sorry!
==
Hi all,
I am delighted to announce the release of darcs 2.1.0, available at
http://darcs.net/darcs-2.1.0.tar.gz
What has changed?
--
Hi there,
2008/10/9 David Leimbach <[EMAIL PROTECTED]>:
> see writeTChan and readTChan. I assume readTChan is synchronous :-).
> writeTChan may be asynchronous for all I can tell (haven't looked deeply).
writeTChan is asynchronous, i.e. channels in this case are unbounded buffers.
> But I did
Hi all,
I am delighted to announce the release of darcs 2.1.0, available at
http://darcs.net/darcs-2.1.0.tar.gz
What has changed?
-
This version provides over 40 bug fixes and 20 new features since
darcs 2.0.2. The most notable changes are:
* Defaulting to darcs-2. The darc
On Thu, Oct 9, 2008 at 1:50 AM, roger peppe <[EMAIL PROTECTED]> wrote:
> On Thu, Oct 9, 2008 at 9:15 AM, Ryan Ingram <[EMAIL PROTECTED]> wrote:
> > I don't think what you want is possible if both sides are in STM.
> > Other authors have posted solutions where one side or the other of the
> > trans
On Wed, Oct 8, 2008 at 3:10 PM, roger peppe <[EMAIL PROTECTED]> wrote:
> I was wondering if it was possible to implement synchronous channels
> within STM. In particular, I'd like to have CSP-like send and recv
> primitives
> on a channel that each block until the other side arrives to complete
>
On Thu, Oct 9, 2008 at 3:08 PM, Mauricio <[EMAIL PROTECTED]> wrote:
> I want to use a few libraries from hackage
> and have already download and built them. Can
> I install those libraries somewhere in my
> home dir (I want to avoid installing as root)
> so that ghc can find them?
Sure, just write
Am Donnerstag, 9. Oktober 2008 15:08 schrieb Mauricio:
> Hi,
>
> I want to use a few libraries from hackage
> and have already download and built them. Can
> I install those libraries somewhere in my
> home dir (I want to avoid installing as root)
> so that ghc can find them?
runghc ./Setup.hs con
Hi,
In addition if you want to do this all or most of the time, that is there are
few/no cabalised libraries you DO wish to install globally, then you can tell
'cabal' to do this all the time by editing your ~/.cabal/config file. Here is
mine:
repos: hackage.haskell.org:http://hackage.haskell.
On Thu, Oct 9, 2008 at 2:08 PM, Mauricio <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to use a few libraries from hackage
> and have already download and built them. Can
> I install those libraries somewhere in my
> home dir (I want to avoid installing as root)
> so that ghc can find them?
>
> If so
Thankyou, this is exactly what I was looking for.
Iain
On 9 Oct 2008, at 2:05 pm, Mitchell, Neil wrote:
Hi Iain,
The wiki page has quite a nice article:
http://www.haskell.org/haskellwiki/Smart_constructors
Thanks
Neil
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PRO
Hi,
I want to use a few libraries from hackage
and have already download and built them. Can
I install those libraries somewhere in my
home dir (I want to avoid installing as root)
so that ghc can find them?
If so, which options should I give to Setup.hs
(with main=defaultMain) so that the libra
Hi Iain,
The wiki page has quite a nice article:
http://www.haskell.org/haskellwiki/Smart_constructors
Thanks
Neil
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Iain Barnett
> Sent: 09 October 2008 2:03 pm
> To: haskell-cafe@haskell.org
> Subje
If I were to create an object in C#, for instance, I could add code
to the constructor that might limit the type further e.g.
public class Car
{
string model;
int wheels;
public Car ( string model, int no_of_wheels )
{
if ( no_of_wheels <= 2 )
On Thu, Oct 9, 2008 at 12:29, roger peppe <[EMAIL PROTECTED]> wrote:
> It's useful, thanks, but not really what I was originally looking for.
> Synchronous channels are generally easier to reason about (less states
> to deal with).
Right, that's very true. Interaction between transactions is natur
Hi Arnaud Bailly,
Share the world? *g* is a bit vague..
Fast CGI differs from CGI in one point: your application keeps running.
Thus as long as the application is running you can use
IORefs (bad for multithreading)
MVars (thread safe)
STM etc to keep track of your "world" state
and of course you
There's also newer material at
http://happstutorial.com:5002 that's in darcs but hasn't been packaged
for hackage.
2008/10/9 Thomas Hartman <[EMAIL PROTECTED]>:
> Have you seen happstutorial.com?
>
> thomas.
>
>
> 2008/10/9 Arnaud Bailly <[EMAIL PROTECTED]>:
>> Hello,
>> I am trying to implement
Have you seen happstutorial.com?
thomas.
2008/10/9 Arnaud Bailly <[EMAIL PROTECTED]>:
> Hello,
> I am trying to implement a complete web application from the ground
> up, with the objective to convince myself and others that 1) it is
> possible, 2) it is powerful and 3) it is more expressive to
On Thu, Oct 9, 2008 at 10:12 AM, Arnar Birgisson <[EMAIL PROTECTED]> wrote:
> Sorry, I come into this discussion late. One-place buffers, or MVars,
> are indeed implemented over STM in the orignal paper [1].
Yes, I should have remembered that. It's ok just as long as
there's a buffer there because
Hi Arnaud,
Here's a simple counter program. I mount this to /ws/ with mod_scgi,
and can then do requests http://localhost/ws/ or
http://localhost/ws/?amount=19 (increment by 19 not 1).
http://hpaste.org/11033
I'm no expert but I'm also working on web applications in Haskell now.
If you are lik
On Thu, Oct 9, 2008 at 7:32 AM, Jim Snow <[EMAIL PROTECTED]> wrote:
> Ray tracing about a million spheres in a regular grid with reflections:
>
> lattice =
> let n = 50 :: Flt
> in bih [sphere (vec x y z) 0.2 | x <- [(-n)..n],
> y <- [(-n)..n],
>
On Thu, Oct 9, 2008 at 8:24 AM, Cale Gibbard <[EMAIL PROTECTED]> wrote:
> Hello!
>
> I worked on this for a few minutes in the GIMP. Thought it might look
> nice spraypainted on asphalt.
>
> http://cale.yi.org/LambdaAsphalt.jpg (this one's at 1280x1024)
This one is nice. Any chance of getting it
Hello,
I am trying to implement a complete web application from the ground
up, with the objective to convince myself and others that 1) it is
possible, 2) it is powerful and 3) it is more expressive to do such a
thing in Haskell.
I managed to get to the point where I can handle users lifecycle
wit
I'd rather say that STM is intended to be used just for building up
transactions, not to model your whole process/thread, simply because in the
latter case your process couldn't have any observable intermediate state, or
put in another way, between any two transactions the information can only go
i
On Thu, Oct 9, 2008 at 10:50, roger peppe <[EMAIL PROTECTED]> wrote:
> On Thu, Oct 9, 2008 at 9:15 AM, Ryan Ingram <[EMAIL PROTECTED]> wrote:
>> I don't think what you want is possible if both sides are in STM.
>> Other authors have posted solutions where one side or the other of the
>> transaction
On Saturday 20 September 2008 19:13:43 Donnie Jones wrote:
> [...]
> > checking GL/gl.h usability... yes
> > checking GL/gl.h presence... yes
> > checking for GL/gl.h... yes
> > checking OpenGL/gl.h usability... no
> > checking OpenGL/gl.h presence... no
> > checking for OpenGL/gl.h... no
> > check
On Thu, Oct 9, 2008 at 9:15 AM, Ryan Ingram <[EMAIL PROTECTED]> wrote:
> I don't think what you want is possible if both sides are in STM.
> Other authors have posted solutions where one side or the other of the
> transaction is in I/O, but wholly inside STM it's not possible.
Thanks, that's what
Yes, it doesn't do anything yet (apart from update a currently discarded
accumulator (symbol table)).
-Original Message-
From: Ryan Ingram [mailto:[EMAIL PROTECTED]
Sent: 09 October 2008 09:06
To: Paul Keir
Cc: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] Simple Table Update
On W
2008/10/9 Reiner Pope <[EMAIL PROTECTED]>:
> The syntax is for the implicit parameter extension[1]. I think you would
> write your example as
>
> foo (undefined :: Bar x) ?z :: Bar y
>
> Then querying the type of that whole expression with :t will list ?z's type
> in the expression's constraints. (
I don't think what you want is possible if both sides are in STM.
Other authors have posted solutions where one side or the other of the
transaction is in I/O, but wholly inside STM it's not possible.
The problem is that in order for synchronization to happen, you need
both sides to be able to com
On Wed, Oct 8, 2008 at 9:12 PM, Paul Keir <[EMAIL PROTECTED]> wrote:
> It brings tears to my eyes to see such a beautiful function ;) You've hit
> the nail on the head Ryan. The new version of my second previous code
> snippet now no longer requires "fixpu*", and is:
>
> typeCheckAST (Program pus)
Hello!
I worked on this for a few minutes in the GIMP. Thought it might look
nice spraypainted on asphalt.
http://cale.yi.org/LambdaAsphalt.jpg (this one's at 1280x1024)
- Cale
2008/10/8 R. Emre Başar <[EMAIL PROTECTED]>:
> Hi,
>
> I created a wallpaper from The.Monad.Reader logo. You can find
60 matches
Mail list logo