On 04/04/2008, at 9:27 PM, John Goerzen wrote:
I can see this being a performance and ease-of-use win in some
situations. I don't think it's an actual feature difference, though.
If you can represent it as a [Word8], you can represent it as a
[Char], and it will be converted to the same underly
On Apr 4, 2008, at 23:15 , Fritz Ruehr wrote:
In any case, opinions about the behavior aside, there is a Hugs
internal error here, so I hope that much is useful.
I am not greatly surprised by that: a numeric constant like `2' is
really a polymorphic value `(fromInteger 2 :: Num a => a)' pe
Derek: yes, I caught this in the language description not long after
hitting "send": I had forgotten about that.
But then I anticipated the behavior Ryan shows below, where using a
variable that's part of a "strange" pattern will cause an error (I
didn't want to check it while driving home-
On 4/4/08, Fritz Ruehr <[EMAIL PROTECTED]> wrote:
> In fact, even this goes through without a hitch!
>
>2 = 3
This is hilarious.
Maybe bindings that don't actually bind anything should be an error?
Or at least a warning?
In ghci:
Prelude> let 2 = 3
-- no problem
Prelude> let (2,x) = (3,
On Fri, 2008-04-04 at 18:34 -0700, Fritz Ruehr wrote:
> In lab the other day I was showing pattern bindings to a student and
> broached a limiting case, one with no variables to be bound in the
> pattern. I was surprised to find that Hugs crashed when I tried a
> pattern binding at top level
In lab the other day I was showing pattern bindings to a student and
broached a limiting case, one with no variables to be bound in the
pattern. I was surprised to find that Hugs crashed when I tried a
pattern binding at top level like this:
(2,[1,4],5) = (2,[1,4],5)
It also crashe
Don Stewart wrote:
> length, take, drop and index working on machine-sized Ints by default
> are really a bit of a wart, aren't they?
Definitely. See http://cdsmith.wordpress.com/2007/07/05/find-the-bug/
for my account of this problem when I ran into it last summer.
In particular, the combinati
ndmitchell:
> Hi
>
> > We can however write function like this:
> >
> > eqLengths [] [] = True
> > eqLengths (x:xs) (y:ys) = eqLengths ys xs
> > eqLengths _ _ = False
> >
> > which looks just fine for me.
>
> I have this defined function. I also have lenEq1, lenGt1, and a few
> other variant
Hi
> We can however write function like this:
>
> eqLengths [] [] = True
> eqLengths (x:xs) (y:ys) = eqLengths ys xs
> eqLengths _ _ = False
>
> which looks just fine for me.
I have this defined function. I also have lenEq1, lenGt1, and a few
other variants. It works, but it just doesn't fee
On Fri, Apr 4, 2008 at 7:14 PM, Jake Mcarthur <[EMAIL PROTECTED]> wrote:
> On Apr 4, 2008, at 11:31 AM, Loup Vaillant wrote:
>
> > I mean, could we calculate this equality without reducing
> > length ys to weak head normal form (and then to plain normal form)?
> >
>
> Yes. Suppose equality over Na
Stefan O'Rear wrote:
On Fri, Apr 04, 2008 at 08:58:06PM +0100, PR Stanley wrote:
Hi folks
[x, y..z]
What's the role of x?
Cheers,
Paul
First number in the output; also all pairs differ as much as the first
two numbers do.
Try e.g [1, 2 .. 10] and [0, 2 .. 10]
More to the point, t
On Fri, Apr 04, 2008 at 08:58:06PM +0100, PR Stanley wrote:
> [x, y..z]
> What's the role of x?
It's the first argument passed to enumFromThenTo.
See sections 3.10 and 6.3.4 of the Haskell report.
Ciao,
Kili
--
There's a limit to how many buttons a shirt should have.
--
On Fri, Apr 04, 2008 at 08:58:06PM +0100, PR Stanley wrote:
> Hi folks
> [x, y..z]
> What's the role of x?
> Cheers,
> Paul
First number in the output; also all pairs differ as much as the first
two numbers do.
Try e.g [1, 2 .. 10] and [0, 2 .. 10]
Stefan
signature.asc
Description: Digital sig
Hi folks
[x, y..z]
What's the role of x?
Cheers,
Paul
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
"Neil Mitchell" <[EMAIL PROTECTED]> writes:
>> length, take, drop and index working on machine-sized Ints by default
>> are really a bit of a wart, aren't they?
> Yes. Also, having strict Int's by default is a bit ugly,
[..]
> (Not that it isn't a worthwhile trade off, but it is still loosing
On Apr 4, 2008, at 11:31 AM, Loup Vaillant wrote:
I mean, could we calculate this equality without reducing
length ys to weak head normal form (and then to plain normal form)?
Yes. Suppose equality over Nat is defined something like:
Z == Z = True
S x == S y = x == y
x == y
John Goerzen wrote:
> I've looked at the Data.ByteString.Internal API, and it looks like
> that ought to work. Oddly, the Data.ByteString.Lazy.Internal API does
> not seem to export enough to work with it in FFI.
It doesn't usually make sense to use lazy ByteStrings directly with the
FFI. Most
Jinwoo Lee wrote:
> I haven't used ReaderT. What are the advantages when using ReaderT
> instead of StateT in this case?
A StateT lets you replace one IORef with another, since it gives you
mutable state. A ReaderT gives you *immutable* state, so the type
system guarantees that you'll always be
Hi Magnus,
> Does the cabal file for Tagsoup require a version of Cabal newer than 1.1.6?
> In case it does it doesn't say so. I suspect this is the cause of the
> rather cryptic error message: "setup: tagsoup.cabal:20: 'Executable' stanza
> starting with field 'ghc-options'".
The version in the
Hi
> > > I meant:
> > > (\x (y :: Int) -> x + 1) 1 (1/0 :: Int) <=> _|_ ?
> >
> > Division by 0 is still an error. What I mean is:
>
> Yes, but this particular one need not be performed. Will it be?
Oh, sorry, I misread that. Even with current Haskell's Int's that is
lazy enough to work,
2008/4/4, Neil Mitchell <[EMAIL PROTECTED]>:
> > > > Also, having strict Int's by default is a bit ugly, in an
> > > > otherwise lazy-by-default language.
> >
>
> > I meant:
> > (\x (y :: Int) -> x + 1) 1 (1/0 :: Int) <=> _|_ ?
>
> Division by 0 is still an error. What I mean is:
Yes,
Neil, and others,
Does the cabal file for Tagsoup require a version of Cabal newer than
1.1.6? In case it does it doesn't say so. I suspect this is the cause of
the rather cryptic error message: "setup: tagsoup.cabal:20: 'Executable'
stanza starting with field 'ghc-options'".
I also noticed tha
> > > Also, having strict Int's by default is a bit ugly, in an
> > > otherwise lazy-by-default language.
>
> I meant:
> (\x (y :: Int) -> x + 1) 1 (1/0 :: Int) <=> _|_ ?
Division by 0 is still an error. What I mean is:
length xs == length ys
Where length xs = 1 and ys = 1000. This takes
2008/4/4, Neil Mitchell <[EMAIL PROTECTED]>:
>
> Also, having strict Int's by default is a bit ugly, in an
> otherwise lazy-by-default language.
You do mean that, for example
(\x -> x + 1) (1/0 :: Int) <=> _|_ ?
Does it bites often (and how, if you have any example)?
cheers,
Loup
_
On 2008-04-04, Peter Gammie <[EMAIL PROTECTED]> wrote:
>> through, however it is obtained, and let the programmer set the
>> encoding as desired. If this approach isn't working for people, I'd
>> like to fix it, but want to make sure it's done right.
>
> Assuming you're talking about the FFI's man
On Fri, Apr 04, 2008 at 12:34:54PM +0100, Neil Mitchell wrote:
> > length, take, drop and index working on machine-sized Ints by default
> > are really a bit of a wart, aren't they?
>
> Yes. Also, having strict Int's by default is a bit ugly, in an
> otherwise lazy-by-default language. It's a pl
At 14:37 04/04/2008, you wrote:
And how would I cross compile something for that platform with ghc?
(There seems to be no port, which is fine)
Don't look at me mate. :-)
PR Stanley schrieb:
I'm surprised you can't use the Glasgow implementation on CE.
At 13:55 04/04/2008, you wrote
I'm surprised you can't use the Glasgow implementation on CE.
At 13:55 04/04/2008, you wrote:
Is there any Haskell compiler for Windows CE on a XScale platform? I
googled around a bit and found references to a Hugs implementation
but couldn't find any place to download it.
I have the opportuni
Is there any Haskell compiler for Windows CE on a XScale platform? I
googled around a bit and found references to a Hugs implementation but
couldn't find any place to download it.
I have the opportunity to program a teledrive[1] and would very much
like to avoid something disfunctional like C.
Hi
> length, take, drop and index working on machine-sized Ints by default
> are really a bit of a wart, aren't they?
Yes. Also, having strict Int's by default is a bit ugly, in an
otherwise lazy-by-default language. It's a place where Haskell decided
to remove mathematical elegance for pragmat
Hi Andrew,
I haven't used ReaderT. What are the advantages when using ReaderT instead
of StateT in this case?
Thanks,
jinwoo
On Fri, Apr 4, 2008 at 2:07 PM, <[EMAIL PROTECTED]> wrote:
> G'day all.
>
> Quoting Jinwoo Lee <[EMAIL PROTECTED]>:
>
> Thanks everyone!
> > Now I think using IORef is t
[EMAIL PROTECTED] wrote:
> I am operating under the assumption that Idid have a broken gcc.
Your gcc is not broken, but a bit old (for a new ghc-6.8.2)
> Which we'll further canonicalise into: i386-unknown-linux
> checking for path to top of build tree... pwd: timer_create: Operation
> not suppor
32 matches
Mail list logo