On Thu, Nov 20, 2008 at 12:18 AM, Dan Doel <[EMAIL PROTECTED]> wrote:
> On Wednesday 19 November 2008 11:38:07 pm David Menendez wrote:
>> One possibility would be to add minimum and maximum to Ord with the
>> appropriate default definitions, similar to Monoid's mconcat.
>
> This is probably the mo
On Wednesday 19 November 2008 11:38:07 pm David Menendez wrote:
> One possibility would be to add minimum and maximum to Ord with the
> appropriate default definitions, similar to Monoid's mconcat.
This is probably the most sensible way. However, first seeing this, I wanted to
see if I could do i
> I've made a speculative fix. If you're able to test it, that would be very
> helpful:
>
> http://hackage.haskell.org/trac/ghc/ticket/2063
>
> Cheers,
>Simon
I had no luck installing the binary snapshot (libedit problems, which I worked
around by creating a link to the version I had) af
On Wed, Nov 19, 2008 at 8:06 PM, Dave Bayer <[EMAIL PROTECTED]> wrote:
> What I'm wondering, however, is if there is a way to code "minimum"
> efficiently in general,
>
>> minimum :: Ord a => [a] -> a
>
>
> where one knows absolutely nothing further about the type "a", but one
> believes that lazy
Compare these two lines in ghci (if you have at least 4 GB of memory):
let a = replicate (2^26) 2 in minimum [[1],a,a]
let a = replicate (2^26) 2 in minimum [a,a,[1]]
The first finishes much faster than the second.
This comes up for example in isomorphism testing of graphs embedded in
surfa
On Wed, Nov 19, 2008 at 5:24 PM, Duncan Coutts
<[EMAIL PROTECTED]> wrote:
> On Wed, 2008-11-19 at 15:01 +, Tony Finch wrote:
>> On Wed, 19 Nov 2008, Simon Marlow wrote:
>> >
>> > Tue Jan 16 16:11:00 GMT 2007 Simon Marlow <[EMAIL PROTECTED]>
>> > * Remove special lambda unicode character, it
On Wed, 2008-11-19 at 15:01 +, Tony Finch wrote:
> On Wed, 19 Nov 2008, Simon Marlow wrote:
> >
> > Tue Jan 16 16:11:00 GMT 2007 Simon Marlow <[EMAIL PROTECTED]>
> > * Remove special lambda unicode character, it didn't work anyway
> > Since lambda is a lower-case letter, it's debatable whe
On Nov 19, 2008, at 6:25 PM, Simon Peyton-Jones wrote:
Would it be worth adding this hard-won lore somewhere on a Wiki
where it can be found later?
Dear Simon, all,
I don't think logging a specific option on the Wiki is particularly
useful (maybe you would have a default editrc file), becau
Thanks all. Sorting this out for my actual code was a bit harder, but
it worked. The manual sure wasn't kidding when it said
"Read this section carefully!"
Dave
On Nov 19, 2008, at 12:12 PM, Malcolm Wallace wrote:
You need to turn on {-# ScopedTypedVariables #-}.
On Nov 19, 2008,
Dave Bayer <[EMAIL PROTECTED]> wrote in article <[EMAIL PROTECTED]> in
gmane.comp.lang.haskell.glasgow.user:
> test1 :: Box a -> a -> [a]
> test1 box x = go box x
> where
>go :: Box a -> a -> [a]
>go b y = [(val b), y]
The type signature "go :: Box a -> a -> [a]"
is equivalent to "go :
Dave Bayer wrote:
Here is an example illustrating a type problem I've having with GHC 6.10.1:
module Main where
newtype Box a = B a
make :: a -> Box a
make x = B x
val :: Box a -> a
val (B x) = x
test1 :: Box a -> a -> [a]
test1 box x = go box x
where
go :: Box a -> a -> [a]
go b y =
Would it be worth adding this hard-won lore somewhere on a Wiki where it can be
found later?
Simon
| -Original Message-
| From: [EMAIL PROTECTED] [mailto:glasgow-haskell-users-
| [EMAIL PROTECTED] On Behalf Of Duncan Coutts
| Sent: 07 November 2008 18:09
| To: GHC-users list
| Cc: Philip
> > test2 :: Box a -> a -> [a]
> > test2 box x = go x
> > where
> > -- go :: a -> [a]
> >go y = [(val box), y]
>
> > Couldn't match expected type `a1' against inferred type `a'
You need to turn on {-# ScopedTypedVariables #-}.
See
http://www.haskell.org/ghc/docs/latest/html/users_guide
Here is an example illustrating a type problem I've having with GHC
6.10.1:
module Main where
newtype Box a = B a
make :: a -> Box a
make x = B x
val :: Box a -> a
val (B x) = x
test1 :: Box a -> a -> [a]
test1 box x = go box x
where
go :: Box a -> a -> [a]
go b y = [(val b), y]
te
| I'm compiling with -O2 -Wall. After looking at the Core output, I
| think I've found the key difference. A function that is bound in a
| "where" statement is different between the monolithic and split
| sources. I have no idea why, though. I'll experiment with a few
| different things to see
On Wed, 19 Nov 2008, Simon Marlow wrote:
>
> Tue Jan 16 16:11:00 GMT 2007 Simon Marlow <[EMAIL PROTECTED]>
> * Remove special lambda unicode character, it didn't work anyway
> Since lambda is a lower-case letter, it's debatable whether we want to
> steal it to mean lambda in Haskell source.
Serge D. Mechveliani wrote:
The GHC team writes
The (Interactive) Glasgow Haskell Compiler -- version 6.10.1
[..]
There have been a number of significant changes since the last
major release, including:
* Some new language features have been implemented:
* Record syntax: wild-card patterns
Duncan Coutts wrote:
On Tue, 2008-11-18 at 11:51 +, Ross Paterson wrote:
On Tue, Nov 18, 2008 at 10:30:01AM +, Malcolm Wallace wrote:
When the -XUnicodeSyntax option is specified, GHC accepts some Unicode
characters including left/right arrows. Unfortunately, the letter
"greek lambda" c
The GHC team writes
> The (Interactive) Glasgow Haskell Compiler -- version 6.10.1
> [..]
> There have been a number of significant changes since the last
> major release, including:
>
> * Some new language features have been implemented:
> * Record syntax: wild-card patterns, punning, and fiel
Hi,
Perhaps it would be possible to convince your text editor to display '\'
as, let's say, bold lambda? Of course it would need to know which '\'
mean lambdas.
Best,
Michał
On Tue, 2008-11-18 at 18:00 +0900, Kazu Yamamoto wrote:
> Hello,
>
> When the -XUnicodeSyntax option is specified, GHC ac
Jason Dagit:
On Wed, Nov 5, 2008 at 5:36 PM, Manuel M T Chakravarty <[EMAIL PROTECTED]
> wrote:
Ian Lynagh:
On Tue, Nov 04, 2008 at 09:02:12PM -0500, Brandon S. Allbery KF8NH
wrote:
On 2008 Nov 4, at 20:26, Jason Dagit wrote:
On Tue, Nov 4, 2008 at 4:26 PM, Manuel M T Chakravarty
<[EMAIL PRO
21 matches
Mail list logo