#398: Xlib Types Not Instances of Anything
+---
Reporter: jcast | Owner: ross
Type: bug| Status: closed
Priority: normal | Milestone:
Simon Peyton Jones wrote:
simonpj 2006/01/06 07:51:23 PST
Modified files:
libraries/base/Data IntMap.hs Map.hs Sequence.hs Set.hs
libraries/base/Data/Generics Instances.hs Twins.hs
Log:
Eta-expand some higher-rank functions. GHC is about to
move to *invariant* rather
On 05/01/06, John Meacham [EMAIL PROTECTED] wrote:
independent of anything else, giving up error messages on pattern match
failures in do notation is not acceptable. so, if the split were to
happen, having two methods in MonadZero, one which takes a string
argument, would be needed.
My solution to this when developing a database library for my own use
was to define the API
in a bracket notation style, and only provide safe functions. The idea
is that the function obtains the resource, calls a function passed as an
argument, then frees the resource, so all resouces are
Hello,
The following class definition:
class Foo o where
(:+) :: o - o - o
and even the following function definition:
bar f (x,y) = x :+ y
are accepted by GHC. However, when I try to create
one instance of Foo:
instance Foo Int where
x :+ y = x + y
I get the following error
On 08/01/06, Bruno Oliveira [EMAIL PROTECTED] wrote:
Hello,
The following class definition:
class Foo o where
(:+) :: o - o - o
and even the following function definition:
bar f (x,y) = x :+ y
are accepted by GHC. However, when I try to create
one instance of Foo:
instance
Bruno Oliveira writes:
class Foo o where
(:+) :: o - o - o
The Haskell report specifies in section 2.4 Identifiers and
Operators:
An operator symbol starting with a colon is a constructor.
Think of ':' as a character that is interpreted as uppercase;
you can't use it to start a
On 08/01/06, Bruno Oliveira [EMAIL PROTECTED] wrote:
On 08 Jan 2006 16:37:47 +0100, Peter Simons wrote:
Bruno Oliveira writes:
class Foo o where
(:+) :: o - o - o
The Haskell report specifies in section 2.4 Identifiers and
Operators:
An operator symbol starting with a colon is a
As everyone has noticed during the making Haskell more open
discussion, MediaWiki was suggested as a better wiki technology for
haskell.org. Ashley Yakeley has generously installed MediaWiki and we
would like to migrate the main pages of haskell.org into this wiki.
The migration is not complete -
wiki is under the GNU FDL so the licenses are not necessarily
compatible.
As far as I understand, this means that if I see a sample of code on
the haskell wiki, and just want to steal it for my project, I'm not
allowed to, unless I also release my code under the GNU FDL?
And another point,
wiki is under the GNU FDL so the licenses are not necessarily
compatible.
As far as I understand, this means that if I see a sample of code on
the haskell wiki, and just want to steal it for my project, I'm not
allowed to, unless I also release my code under the GNU FDL?
This is something
This is something worth debating. Certainly you can ask the author of
the code for permission to use it but this is an extra burden. Would
be nice to have a special wiki construct to mark content as posessing
an extra license. The whole license debate should take place as
soon as possible
I believe the scenario that the FDL addresses is that someone
(probably Paul Hudak!) borrows massive amounts of stuff from the wiki,
adds his own good stuff, and then publishes a nice book or something
without having to share his additional contribution. Some people
would like to be sure that
sön 2006-01-08 klockan 21:12 -0500 skrev John Peterson:
wiki is under the GNU FDL so the licenses are not necessarily
compatible.
As far as I understand, this means that if I see a sample of code on
the haskell wiki, and just want to steal it for my project, I'm not
allowed to, unless I
In article [EMAIL PROTECTED],
Ian Lynagh [EMAIL PROTECTED] wrote:
Why not use the GPL, then?
FWIW, the GFDL is considered non-free by Debian[1], so that would mean
any documentation or anything derived from the wiki couldn't be packaged
for Debian.
Apart from the issue of code itself on
From: Chris Kuklewicz [EMAIL PROTECTED]
To: haskell-cafe@haskell.org
Subject: [Haskell-cafe] x86 code generation going wrong?
Date: Sat, 07 Jan 2006 16:18:59 +
Hello,
I need to ask for some help to test x86 code generation.
There is a factor of two runtime difference between the code
Hello Marc,
Sunday, January 08, 2006, 3:19:56 AM, you wrote:
MW list2=do { x - [1,2,3]; guard (odd x); return x} -- - provided by xerox
list3 = [ x | x - [1,2,3], odd x]
--
Best regards,
Bulatmailto:[EMAIL PROTECTED]
Hello Donald,
Sunday, January 08, 2006, 3:43:51 AM, you wrote:
and got the (de)serialization speed about 50 mb/s with my 1 ghz cpu.
DBS Excellent! How does this compare to NewBinary?
ghc's Binary performs 4-6 mb/s in the same situations. if you are asking
about features - see readme.txt, it
hello
i want to read a file encoded in utf8 and at a later time output portions of it
on the console. Is there an easy way to do this in haskell? using the standard
i/o functions i can read the file but the output gives me \1071 ... instead of
the unicode characters.
{- Disclaimer: I'm rather new to Haskell and completely new to this board.
I may not use the correct terminology in all cases, but I hope my
intention becomes clear when you have a look at the code-snippets. -}
Hey ho,
Is there any way two find out whether two variables refer to the
On Sun, Jan 08, 2006 at 12:19:40PM +0300, Bulat Ziganshin wrote:
Hello Marc,
Sunday, January 08, 2006, 3:19:56 AM, you wrote:
MW list2=do { x - [1,2,3]; guard (odd x); return x} -- - provided by xerox
list3 = [ x | x - [1,2,3], odd x]
list4= take 2 $ [2*x+1,x-[0..]] ;-)
Hi Bulat..
Thanks
On Sun, Jan 08, 2006 at 12:43:31PM +0100, Tim Walkenhorst wrote:
{- Disclaimer: I'm rather new to Haskell and completely new to this board.
I may not use the correct terminology in all cases, but I hope my
intention becomes clear when you have a look at the code-snippets. -}
Hey
Hi -
A main problem I've found with Haskell is that within a module, too many
things are put into the same scope. For example
data Tree a b = Leaf a | Node {elem::b, lhs::Tree a b, rhs::Tree a b}
puts Leaf, Node, elem, lhs, and rhs, into the module's namespace,
as well as Tree. This means
Am Sonntag, 8. Januar 2006 01:19 schrieb Marc Weber:
Here is a simple program implementing the above function in 4 different
ways.. See my comments to get to know where I have problems:
-- begin test.hs --
module Main where
import IO
import Control.Monad.List
{-
Am Samstag, 7. Januar 2006 23:56 schrieben Sie:
Daniel, i also included you in crossposting because these letters can
also help you understand how run-time compilation works. basically
it's a very simple thing: when we can compute at compile time value of
some computation, many compilers will
Daniel Fischer wrote:
Cool. So let's see if I got it.
If I have
n - readIO
...
mapM_ (func n) list
...
in my programme, the runtime system will/might build object code for
func n that is then used instead of using the general code for func and
supplying both arguments to that?
Am Sonntag, 8. Januar 2006 14:06 schrieb Brian Hulley:
Hi -
A main problem I've found with Haskell is that within a module, too many
things are put into the same scope. For example
data Tree a b = Leaf a | Node {elem::b, lhs::Tree a b, rhs::Tree a b}
puts Leaf, Node, elem, lhs, and rhs,
Hello Joel,
Thursday, January 05, 2006, 2:01:43 PM, you wrote:
JR Could you give us a bit more detail on this?
forget about this :) i forget that direct i/o on sockets will block
entire app. GHC organizez its own complex non-blocking machinery
JR How does using handles involve large
Hello Branimir,
Sunday, January 08, 2006, 1:57:06 PM, you wrote:
BM of appearance (note:OPTIONS didn't do anything I have to
BM compile -O2 -fglasgow-exts explicitely, because I've got compile error for
BM test3.hs )
use
{-# OPTIONS_GHC -O2 -fglasgow-exts #-}
--
Best regards,
Bulat
Hello Lennart,
Sunday, January 08, 2006, 5:45:16 PM, you wrote:
Cool. So let's see if I got it.
If I have
n - readIO
...
mapM_ (func n) list
...
in my programme, the runtime system will/might build object code for
not object code itslef. haskell program in compiled form is
Thanks Bulat! I'm happy with Erlang for the time being but I'll
consider your library for my next IO-intensive Haskell project.
On Jan 7, 2006, at 6:08 PM, Bulat Ziganshin wrote:
Joel, if you are interested in switchinh to my library - write me. i
have ideas about supporting your 150 records
I compiled a simple one-liner: main = print Blah.
This is the GC report:
5,620 bytes allocated in the heap
0 bytes copied during GC
0 collections in generation 0 ( 0.00s)
0 collections in generation 1 ( 0.00s)
1 Mb total memory in use
Where did
On Sun, 2006-01-08 at 17:01 +, Joel Reymont wrote:
I compiled a simple one-liner: main = print Blah.
This is the GC report:
5,620 bytes allocated in the heap
0 bytes copied during GC
0 collections in generation 0 ( 0.00s)
0 collections in
- Original Message -
From: Daniel Fischer [EMAIL PROTECTED]
To: Brian Hulley [EMAIL PROTECTED]
Cc: Haskell-cafe haskell-cafe@haskell.org
Sent: Sunday, January 08, 2006 3:47 PM
Subject: Re: [Haskell-cafe] Avoiding name collisions by using value spaces
instead of modules
Am Sonntag,
On 08/01/06, Brian Hulley [EMAIL PROTECTED] wrote:
For example, suppose I'm writing a module M that deals with grammar, where
the elements in a grammar rule are parameterised so that rules can be
written using strings but processed as if we'd used ints instead:
data Element a = Terminal a
- Original Message -
From: Cale Gibbard [EMAIL PROTECTED]
To: Brian Hulley [EMAIL PROTECTED]
Cc: Daniel Fischer [EMAIL PROTECTED]; Haskell-cafe
haskell-cafe@haskell.org
Sent: Sunday, January 08, 2006 5:54 PM
Subject: Re: [Haskell-cafe] Avoiding name collisions by using value spaces
On 08/01/06, Brian Hulley [EMAIL PROTECTED] wrote:
- Original Message -
From: Cale Gibbard [EMAIL PROTECTED]
To: Brian Hulley [EMAIL PROTECTED]
Cc: Daniel Fischer [EMAIL PROTECTED]; Haskell-cafe
haskell-cafe@haskell.org
Sent: Sunday, January 08, 2006 5:54 PM
Subject: Re:
Brian Sniffen wrote:
The first couldn't even complete on my 2.26 GHz Celeron! It's only got
512 MB of RAM, which may be part of the problem.
I should not leak memory but it may be an optimization problem.
Try explicitly using ghc -O2 -funbox-strict-fields.
Stack space overflow: current
Cale Gibbard wrote:
snip
Thanks for the illustration - I see another advantage with type classes is
that you only need to write the type signature once (in the class
declaration) instead of before each instance binding.
Secondly, if the functions are really different, and you never plan
On Sunday 08 January 2006 06:43 am, Tim Walkenhorst wrote:
{- Disclaimer: I'm rather new to Haskell and completely new to this board.
I may not use the correct terminology in all cases, but I hope my
intention becomes clear when you have a look at the code-snippets. -}
Hey ho,
Is
From: Chris Kuklewicz [EMAIL PROTECTED]
To: [EMAIL PROTECTED], Haskell Cafe haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] x86 code generation going wrong?
Date: Sun, 08 Jan 2006 20:33:57 +
Brian Sniffen wrote:
The first couldn't even complete on my 2.26 GHz Celeron! It's only got
bmaxa:
From: Chris Kuklewicz [EMAIL PROTECTED]
To: [EMAIL PROTECTED], Haskell Cafe haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] x86 code generation going wrong?
Date: Sun, 08 Jan 2006 20:33:57 +
Brian Sniffen wrote:
The first couldn't even complete on my 2.26 GHz
On 08/01/06, Brian Hulley [EMAIL PROTECTED] wrote:
Cale Gibbard wrote:
snip
Thanks for the illustration - I see another advantage with type classes is
that you only need to write the type signature once (in the class
declaration) instead of before each instance binding.
Secondly, if the
Unifying these two under a single operation is certainly trickier, and
it's a little more questionable that it should be done at all, given
that their types are so different -- below is the closest I could come
to it off-hand.
---
{-# OPTIONS_GHC -fglasgow-exts #-} -- for
From: [EMAIL PROTECTED] (Donald Bruce Stewart)
To: Branimir Maksimovic [EMAIL PROTECTED]
CC: [EMAIL PROTECTED],
[EMAIL PROTECTED],haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] x86 code generation going wrong?
Date: Mon, 9 Jan 2006 11:15:51 +1100
bmaxa:
From: Chris Kuklewicz
Cale Gibbard wrote:
Unifying these two under a single operation is certainly trickier,
and it's a little more questionable that it should be done at all,
given that their types are so different -- below is the closest I
could come to it off-hand.
---
{-# OPTIONS_GHC -fglasgow-exts #-} -- for
Hi All,
Regarding the Fannkuch Shootout Entry:
If we are willing to specialize flop in the way shown on the wiki,
another 8% can be gained by similarly specializing rotate:
rotate 2 (x1:x2:xs) = x2:x1:xs
rotate 3 (x1:x2:x3:xs) = x2:x3:x1:xs
rotate 4 (x1:x2:x3:x4:xs) = x2:x3:x4:x1:xs
rotate
d:
Regarding the Fannkuch Shootout Entry:
If we are willing to specialize flop in the way shown on the wiki,
another 8% can be gained by similarly specializing rotate:
rotate 2 (x1:x2:xs) = x2:x1:xs
rotate 3 (x1:x2:x3:xs) = x2:x3:x1:xs
...
Cheers, I've updated the proposed entry on the
Hello Joel,
Sunday, January 08, 2006, 8:01:00 PM, you wrote:
JR I compiled a simple one-liner: main = print Blah.
JR5,620 bytes allocated in the heap
again, see at the GHC.Handle and so on :) try to find print
definition and manually substitute all the code generated by this
line. btw,
49 matches
Mail list logo