[Haskell-cafe] Re[2]: [Haskell] Proposal: unification of style of function/data/type/class definitions

2006-09-10 Thread Bulat Ziganshin
Hello Taral, Sunday, September 10, 2006, 9:45:33 PM, you wrote: >> data Expr t = If (Expr Bool) (Expr t) (Expr t) >> Expr Int = Lit Int >> Expr Bool | Eq t = Eq (Expr t) (Expr t) > I find this somewhat unreadable due to the implicit "t" parameter not > showing up on t

Re: [Haskell-cafe] Re: evaluate vs seq

2006-09-10 Thread Michael Shulman
On 9/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > The GHC documentation says that (evaluate a) is not the same as (a > `seq` return a). Can someone explain the difference to me, or point > me to a place where it is explained? (evaluate a) is "weaker" than (a `seq` return a). (a `seq` r

[Haskell-cafe] Re: Nice cygwin application to be used with ghci

2006-09-10 Thread Bruno Martínez
On Tue, 15 Aug 2006 17:43:29 -0300, Maurício <[EMAIL PROTECTED]> wrote: Hi, I've just uploaded a package ('rlwrap') to cygwin that I like to use with ghci. You can use it like this: rlwrap ghcii.sh That's awesome. Thank you very much for bringing this to the list's attention.

Re: [Haskell-cafe] HaXml and ghci unresolved symbol

2006-09-10 Thread Andrea Rossato
Il Sat, Sep 09, 2006 at 02:17:36PM +0200, Andrea Rossato ebbe a scrivere: > probably it's me, but I cannot understand what I'm doing wrong. Thanks to the discussion of this thread I was able to (sort of) isolate the problem and understand why I cannot get hxml (if linked with HaXml) to work with g

Re: [Haskell-cafe] Re: map (-2) [1..5]

2006-09-10 Thread Jim Apple
See also: torsors http://math.ucr.edu/home/baez/torsors.html Jim ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: map (-2) [1..5]

2006-09-10 Thread Neil Mitchell
Hi, I think in practice this wouldn't really be an issue. When you're using natural numbers, you tend to be in a situation where you're either numbering things statically, and not doing any calculations with them, or you're using them as a monoid, whereby things only increase. take? primes? fi

Re: [Haskell-cafe] Re: [Haskell] Re: Proposal: unification of style offunction/data/type/class definitions

2006-09-10 Thread Brian Hulley
Bulat Ziganshin wrote: sequence :: [m a] -> m [a] | Monad m I think translations of higher rank signatures using this syntax could be: foo :: (forall a. a-> a) ->b -> c -> (b,c) ==> foo :: (a -> a | a) -> b -> c -> (b, c) using the rule that we just write the variable by itself to ind

[Haskell-cafe] Re[2]: [Haskell] Proposal: unification of style of function/data/type/class definitions

2006-09-10 Thread Bulat Ziganshin
Hello Neil, Sunday, September 10, 2006, 2:21:50 PM, you wrote: >> class Monad m | Functor m, Monoid m where ... > It also makes grep'ing easier. yes, i also had problems finding class declarations in base package >> sequence :: [m a] -> m [a] | Monad m > I don't like this. In the other two in

Re: [Haskell-cafe] HaXml and ghci unresolved symbol

2006-09-10 Thread Andrea Rossato
Il Sun, Sep 10, 2006 at 01:56:25PM +0200, Udo Stenzel ebbe a scrivere: > Hrm, you're accessing a symbol presumably found in a library that isn't > loaded. Either GHC cannot find the library, which shouldn't happen if > you're using the right package switch, or the .hi file you compiled > against i

Re: [Haskell-cafe] nondet function

2006-09-10 Thread Lennart Augustsson
To make it referentially transparent you might want to consider adding 'por', parallel or, instead. It's like (||), but symmetric in its treatment of bottom. -- Lennart On Sep 10, 2006, at 00:21 , Ashley Yakeley wrote: Is it possible to write nondet? nondet :: a -> a -> a no

Re: [Haskell-cafe] HaXml and ghci unresolved symbol

2006-09-10 Thread Udo Stenzel
Andrea Rossato wrote: > [12:03:[EMAIL PROTECTED]:~/devel/haskell/xml]$ ghci -package HaXml xml1.hs > [logo] > Loading package base-1.0 ... linking ... done. > Loading package haskell98-1.0 ... linking ... done. > Loading package HaXml-1.13.1 ... linking ... done. > Skipping Main ( xml1

Re: [Haskell-cafe] Re: map (-2) [1..5]

2006-09-10 Thread David House
On 10/09/06, Aaron Denney <[EMAIL PROTECTED]> wrote: I still don't like having a plus without a minus. I think in practice this wouldn't really be an issue. When you're using natural numbers, you tend to be in a situation where you're either numbering things statically, and not doing any calcul

[Haskell-cafe] Re: evaluate vs seq

2006-09-10 Thread apfelmus
Michael Shulman wrote: > The GHC documentation says that (evaluate a) is not the same as (a > `seq` return a). Can someone explain the difference to me, or point > me to a place where it is explained? (evaluate a) is "weaker" than (a `seq` return a). (a `seq` return a) is always _|_ whereas (eval

[Haskell-cafe] Re: [Haskell] Re: Proposal: unification of style of function/data/type/class definitions

2006-09-10 Thread Neil Mitchell
Hi I don't see the problem. You can read all of Bulat's examples as "'thing being declared' 'relationship' 'value' given that 'context'", so this one is ""sequence" has type "[m a] -> m [a]" given that "m" is a "Monad"". So viewed that way, they're all consistent with each other. How about nam

Re: [Haskell-cafe] HaXml and ghci unresolved symbol

2006-09-10 Thread Andrea Rossato
Il Sun, Sep 10, 2006 at 11:41:45AM +0200, Lemmih ebbe a scrivere: > It looks a bit like 'HaXml' has been updated after 'hxml' was built. > Try rebuilding 'hxml' against the 'HaXml' you've got installed. No, I installed the together, HaXml first and then hxml In hxml there where a couple of bugs,

Re: [Haskell-cafe] HaXml and ghci unresolved symbol

2006-09-10 Thread Lemmih
It looks a bit like 'HaXml' has been updated after 'hxml' was built. Try rebuilding 'hxml' against the 'HaXml' you've got installed. On 9/10/06, Andrea Rossato <[EMAIL PROTECTED]> wrote: Il Sat, Sep 09, 2006 at 05:20:55PM -0400, Mark T.B. Carroll ebbe a scrivere: > FWIW I have the same problem -

Re: [Haskell-cafe] HaXml and ghci unresolved symbol

2006-09-10 Thread Andrea Rossato
Il Sat, Sep 09, 2006 at 04:34:04AM +0100, Marco André F. de Almeida ebbe a scrivere: > I know this will not solve your problem, but just so that you > know that with Hugs, you code works without any problems. > If you don't want/need to compile the program, I guess one interpreter > (Hugs) is as g

Re: [Haskell-cafe] HaXml and ghci unresolved symbol

2006-09-10 Thread Andrea Rossato
Il Sat, Sep 09, 2006 at 05:20:55PM -0400, Mark T.B. Carroll ebbe a scrivere: > FWIW I have the same problem - I can't use HaXml with ghci. > So it's not just you. (-: Indeed! So I found my first bug in ghc... And now I'll dig into ghc bug reports to see if someone is working on the problem... T

[Haskell-cafe] Re: nondet function

2006-09-10 Thread Aaron Denney
On 2006-09-10, Ashley Yakeley <[EMAIL PROTECTED]> wrote: > Is it possible to write nondet? > > nondet :: a -> a -> a > > nondet _|_ _|_ = _|_ > nondet _|_ q = q > nondet p _|_ = p > nondet p q = p or q > > nondet evaluates its arguments in parallel, and returns the first one of > them to