An updated Zipper version is uploaded here:
http://www.haskell.org/haskellwiki/User_talk:Kr.angelov
It doesn't use State monad anymore and it returns Maybe. This seems to
be the common preference, is it? Feel free to vote against. Should we
change Data.Map also? There is another proposal for chan
G'day all.
Quoting Don Stewart <[EMAIL PROTECTED]>:
This is Haskell, we should use Maybe.
This is Haskell, more abstract is good.
I do agree, though, that Monad is arguably the wrong abstraction. Something
like this would arguably be better:
class (Functor f) => Fail f where
return ::
On Fri, May 23, 2008 at 5:17 PM, Thomas Hartman <[EMAIL PROTECTED]> wrote:
> > Maybe I don't like to read backwards. ;-)
>
> >>> (from Control.arrow) is like flip (.)
>
>
That's something I considered. I like the `|>` operator found in F# (I hope
it's not a curse word on this list) which is equiva
Nabil Alsharif wrote:
> I downloaded the gtk2hs 0.9.12.1 tarball and did the standard configure,
> make, make install but when I go to compile a test program I get a bunch
> of errors that look like:
How did you compile the program?
[snip link errors]
This usually indicates a missing --make or
On Fri, 23 May 2008, Ketil Malde wrote:
Henning Thielemann <[EMAIL PROTECTED]> writes:
An even more advanced tool could show differences between two Core
listings [..]
In this special example, actually simple 'diff' spotted the critical
difference
I would suggest Emacs's ediff for this, it
On Fri, May 23, 2008 at 2:20 PM, Thomas Hartman <[EMAIL PROTECTED]> wrote:
> > The big benefit I got from using the State Monad was that I was able to
> reorder the functions > by just copy/pasting the function name from one
> place to another.
>
> I don't understand... why do you need state to do
maybe also of interest in the ghc-core thread
-- Forwarded message --
Date: Fri, 23 May 2008 21:21:03 +0200 (CEST)
From: Henning Thielemann <[EMAIL PROTECTED]>
To: Simon Peyton-Jones <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Subject: RE: [Haskell-cafe] force inlining in GHC
On
I downloaded the gtk2hs 0.9.12.1 tarball and did the standard configure,
make, make install but when I go to compile a test program I get a bunch
of errors that look like:
compilation IS NOT required
[..snip..]
(.data+0x38): undefined reference to
`gtkzm0zi9zi12zi1_GraphicsziUIziGtkziTypes_zdf548_
duncan.coutts:
>
> On Fri, 2008-05-23 at 21:24 +0200, Henning Thielemann wrote:
> > On Fri, 23 May 2008, Bulat Ziganshin wrote:
> >
> > > Hello Henning,
> > >
> > > Friday, May 23, 2008, 8:31:24 PM, you wrote:
> > >
> > >> would guarantee speed in every case. Or I can SPECIALISE the function,
> >
Hello,
I recently ran into a strange cabal error. When trying to configure a
package (leksah 0.1.1) I get the following error:
MacBook-Pro:leksah-0.1.1 jwl$ runhaskell Setup.lhs configure
Configuring leksah-0.1.1...
Setup.lhs: ghc version >=6.2 is required but the version of
/usr/local/bin/ghc c
On Fri, 2008-05-23 at 21:24 +0200, Henning Thielemann wrote:
> On Fri, 23 May 2008, Bulat Ziganshin wrote:
>
> > Hello Henning,
> >
> > Friday, May 23, 2008, 8:31:24 PM, you wrote:
> >
> >> would guarantee speed in every case. Or I can SPECIALISE the function,
> >> then the function will only be
Hello Thomas,
Friday, May 23, 2008, 11:29:44 PM, you wrote:
> darcs: Pushing to http URLs is not supported.
of course. http is read-only media :) you have to send patches via
email (in most cases). read darcs docs
--
Best regards,
Bulatmailto:[EMAIL PROTECTED]
_
adding OPTIONS -XStandaloneDeriving made no difference
The following patch fixed the problem. (Well, at least the mud program
compiles. I haven't actually tried using it yet.)
[EMAIL PROTECTED]:~/mud>darcs whatsnew
{
hunk ./World.hs 50
-deriving Eq
+-- deriving Eq
+
+instance Eq (World TV
On Fri, 23 May 2008, Bulat Ziganshin wrote:
Hello Henning,
Friday, May 23, 2008, 8:31:24 PM, you wrote:
would guarantee speed in every case. Or I can SPECIALISE the function,
then the function will only be called, but with polymorphism overhead
eliminated. This would only work for a restrict
Hi,
Thanks for the bug report.
This should be filed on the GHC bug tracker,
http://hackage.haskell.org/trac/ghc/newticket?type=bug
And I've forwarded it to the glasgow-haskell-bugs mailing list.
kolar:
> Hello all,
>
> The attached file was compiled by the following command:
>
> ghc -O2
I am learning haskell and i need some advice about writing
functional-style code.
Give the following code below, my question is - how do i setup a
dependency of User on Common?
Obviously what i have there is wrong, because a change in common (i know
it's actually immutable) is not reflected in th
Back in October'06 Carlos Pita sent a message to this list:
Currently I'm trying to grasp haskell exception handling and although
I find it mostly clear I'm a bit confused regarding the lack of a
throwDynIO action "paralelling" throwIO, as there are dynamic variants
for the other throw functions
Using 'monad' here makes it easier to make a mistake with the code, as
it permits new kinds of unexpected failure.
This is Haskell, we should use Maybe.
And users that want it can lift Maybe a -> m a
-- Don
(-1) for new uses of fail in place of Nothing.
kr.angelov:
> The monads design is used
On 2008 May 23, at 13:34, Luke Palmer wrote:
On Fri, May 23, 2008 at 10:55 AM, Jules Bean <[EMAIL PROTECTED]>
wrote:
Krasimir Angelov wrote:
The monads design is used in Data.Map i.e.
lookup :: (Monad m, Ord k) => k -> Map k a -> m a
which is widely considered a poor design decision and
On Fri, May 23, 2008 at 10:55 AM, Jules Bean <[EMAIL PROTECTED]> wrote:
> Krasimir Angelov wrote:
>>
>> The monads design is used in Data.Map i.e.
>>
>> lookup :: (Monad m, Ord k) => k -> Map k a -> m a
>
> which is widely considered a poor design decision and a wart on Data.Map.
It is? Can you p
igloo:
> On Fri, May 23, 2008 at 05:54:36PM +0200, Henning Thielemann wrote:
> >
> > An even more advanced tool could show differences between two Core
> > listings.
>
> That would be great. In the meantime, from GHC 6.10,
> -ddump-simpl -dsuppress-uniques
> can be good enough to get by (it
Hello Henning,
Friday, May 23, 2008, 8:31:24 PM, you wrote:
> would guarantee speed in every case. Or I can SPECIALISE the function,
> then the function will only be called, but with polymorphism overhead
> eliminated. This would only work for a restricted range of types. I'd like
> to have a pr
lemming:
>
> On Fri, 23 May 2008, Henning Thielemann wrote:
>
> >An even more advanced tool could show differences between two Core
> >listings. Say I have a program which runs too slow. But if I change a
> >small detail it runs significantly faster - I want to know, how did my
> >change in th
On Fri, May 23, 2008 at 05:54:36PM +0200, Henning Thielemann wrote:
>
> An even more advanced tool could show differences between two Core
> listings.
That would be great. In the meantime, from GHC 6.10,
-ddump-simpl -dsuppress-uniques
can be good enough to get by (it means you don't get di
On Fri, 23 May 2008, Henning Thielemann wrote:
An even more advanced tool could show differences between two Core listings.
Say I have a program which runs too slow. But if I change a small detail it
runs significantly faster - I want to know, how did my change in the Haskell
file modified th
Robert Greayer wrote:
--- Eric <[EMAIL PROTECTED]> wrote:
Hi all,
I've written the following program to connect to a
submit an HTTP GET
request to a server and print the response:
module Main where
import Network
import System.IO
main = withSocketsDo go
go = do putStrLn "Connecting...
On Fri, May 23, 2008 at 5:11 PM, Thomas Hartman <[EMAIL PROTECTED]> wrote:
> I am assuming this used to work, but something changed, either in TH
> itself or switching from ghc6.6 to ghc6.8.
The "deriving" rules of 6.8 are more restrictive in some cases.
However, the same result can be obtained
On Sat, May 24, 2008 at 1:11 AM, Thomas Hartman <[EMAIL PROTECTED]> wrote:
> World.hs:42:0:
> No instances for (Eq (a (M.Map String Player)),
> Eq (a (M.Map ItemId Item)),
> Eq (a (M.Map PlayerId Player)),
> Eq (a (M.Map RoomId Room)),
>
On Fri, 2 May 2008, Neil Mitchell wrote:
Hi Don,
Just a quick announcement, I've uploaded to hackage 'ghc-core' , a
wrapper over ghc for displaying the optimised core and assembly language
ghc produces from your programs.
This is cool, but it still lags behind the facilities found in yhc-
Haskellers/Chris,
As part of my quest to better understand STM and eventually build a
concurrent haskell server app,
I checked out an embryonic haskell mud demo from Chris Smith's repo.
It seemed like a great
sample app.
But I ran into a build issue that seems to have to do with derive/TH.
Hello Johan,
Friday, May 23, 2008, 5:58:04 PM, you wrote:
>> cs<- hGetLine out
>> hClose out
>> print cs
>>
> I think you need to either print cs before you close the socket or
> make sure that cs is force (~computed) before you close the socket as
> laziness mak
Miguel Mitrofanov wrote:
I think that MonadZero m => ... is better than just Maybe. If you can
have more general solution for free, why fight it?
Because Maybe exists and MonadZero doesn't?
Jules
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On Fri, 2 May 2008, Neil Mitchell wrote:
Hi Don,
Just a quick announcement, I've uploaded to hackage 'ghc-core' , a
wrapper over ghc for displaying the optimised core and assembly language
ghc produces from your programs.
This is cool, but it still lags behind the facilities found in yhc-
I think that MonadZero m => ... is better than just Maybe. If you can
have more general solution for free, why fight it?
On 23 May 2008, at 14:55, Jules Bean wrote:
Krasimir Angelov wrote:
The monads design is used in Data.Map i.e.
lookup :: (Monad m, Ord k) => k -> Map k a -> m a
which is
--- Eric <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I've written the following program to connect to a
> submit an HTTP GET
> request to a server and print the response:
>
> module Main where
>
> import Network
> import System.IO
>
> main = withSocketsDo go
>
> go = do putStrLn "Connecting...
Hello all,
The attached file was compiled by the following command:
ghc -O2 --make -threaded ltest1pl.hs -o alall
When run in a sequential mode, I get this result:
./alall
Starting ...
Lst1: 416665
Lst2: 4166916670
T1: 0m 1.0e-6s
36
End!
On the other hand, when run in a threaded
On Fri, May 23, 2008 at 3:27 PM, Eric <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I've written the following program to connect to a submit an HTTP GET
> request to a server and print the response:
>
> module Main where
>
> import Network
> import System.IO
>
> main = withSocketsDo go
>
> go = do putS
Do any general-purpose monad 'do' (>>=) and (>>) operator desugaring tools
exist?
Such that I could first go from 'do' to bind notation and then expand (>>=)
definition, as Oliver compactly did.
I also tried to expand (>>=) by hand in 'getAny' code, though somewhat
differently (see below my pseudo
Hi all,
I've written the following program to connect to a submit an HTTP GET
request to a server and print the response:
module Main where
import Network
import System.IO
main = withSocketsDo go
go = do putStrLn "Connecting..."
out <- connectTo "haskell.org" (PortNumber 80)
2008/5/23 Peter Verswyvelen <[EMAIL PROTECTED]>:
> So it seems the GHCi linker is not using the metadata in the library file
> correctly? The libpng.dll.a library file clearly contains a reference to
> libpng3.dll, and I guess since GHC is using the GCC linker, this works fine,
> but GHCi most l
So it seems the GHCi linker is not using the metadata in the library file
correctly? The libpng.dll.a library file clearly contains a reference to
libpng3.dll, and I guess since GHC is using the GCC linker, this works fine,
but GHCi most likely has its own linker?
If this is correct, we should
That is annoying. I remember that there were people arguing that Monad
should be used instead of Maybe but I don't remember the reasons.
Personaly I feel quite happy with Maybe and I am using it in my own
code. There should be a consistent approach in the different libraries
or at least in a single
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Jules Bean
>
> Krasimir Angelov wrote:
> > The monads design is used in Data.Map i.e.
> >
> > lookup :: (Monad m, Ord k) => k -> Map k a -> m a
>
> which is widely considered a poor design decision and a wart
> on Data.Map.
>
Krasimir Angelov wrote:
The monads design is used in Data.Map i.e.
lookup :: (Monad m, Ord k) => k -> Map k a -> m a
which is widely considered a poor design decision and a wart on Data.Map.
:-)
Seriously, if you don't return a useful error message, then Maybe is as
good as it gets, why not
For information, not an "official" user group get together but I believe the
evening was enjoyed by all participants.
Dominic.
http://enhyper.blogspot.com/2008/05/haskell-get-together-22nd-may-2008.html
___
Haskell-Cafe mailing list
Haskell-Cafe@haske
The monads design is used in Data.Map i.e.
lookup :: (Monad m, Ord k) => k -> Map k a -> m a
and I think that this will be more consistent.
On 5/23/08, Ross Paterson <[EMAIL PROTECTED]> wrote:
> On Fri, May 23, 2008 at 09:03:29AM +0200, Krasimir Angelov wrote:
> > Alternatively I can use monad
2008/5/22 Peter Verswyvelen <[EMAIL PROTECTED]>:
> The first thing I noticed is that RUNGHC looks for a DLL called "png.dll"
> (which it doesn't find and then bails out with an error), while the
> executable build with GHC uses the correct "libpng3.dll". When I rename the
> libpng3.dll into png.dll
On Fri, May 23, 2008 at 09:03:29AM +0200, Krasimir Angelov wrote:
> Alternatively I can use monad with failure. In other words, there are
> two possibilities:
>
> 1. Use error ".." and types like: TreeLoc a -> TreeLoc a
> 2. Use monad and type like: Monad m => TreeLoc a -> m (TreeLoc a)
I
On Fri, May 23, 2008 at 9:03 AM, Krasimir Angelov <[EMAIL PROTECTED]> wrote:
> if isFirst loc
> then do_something (left loc)
> else i_cannot_go_left
I meant:
if isFirst loc
then i_cannot_go_left
else do_something (left loc)
___
Haskell-Cafe mailin
Aha. I see the point. The current design was influenced from some
other implementation that I spot somewhere in the net. I will change
it but this reminds me of another problem. Most movement functions
raise error if they can't do the movement. This is convenient if you
somehow know that the direct
50 matches
Mail list logo