Re: [Haskell-cafe] Question on case x of g when g is a function

2005-01-27 Thread Salvador Lucas
Because both bit0 and bit1 are free *local* variables
within the case expression. So, they have nothing
to do with your defined functions bit0 and bit1.
Best regards,
Salvador.
[EMAIL PROTECTED] wrote:
Can a kind soul please enlighten me on why f bit0 and f bit1 
both return 0?

 

bit0 = False
bit1 = True
f x = case x of
   bit0 - 0
   bit1 - 1
   

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
 

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] conflicting variable definitions in pattern

2009-05-15 Thread Salvador Lucas

Dear Martin,

I think that the (practical) reason is avoiding equality checks during 
pattern matching.


For instance, how do you evaluate this:

  foo ((+1):(1+):[])?

Both expressions in the first and second entries of the list are 
semantically equivalent,
but from an operational point of view, you have to ensure the equality 
of two functions

over an infinite domain (of integer numbers).

Best regards,

Salvador.


Martin Hofmann escribió:

It is pretty clear, that the following is not a valid Haskell pattern:

foo (x:x:xs) = x:xs

My questions is _why_ this is not allowed. IMHO, the semantics should be
clear: The pattern is expected to succeed, iff 'x' is each time bound to
the same term. 


Isn't this allowed, because this would require a strict evaluation of
the 'x' variables?

Thanks,

Martin

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
  


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] haskell platform - mac lion - installation error

2012-03-10 Thread Salvador Lucas

Dear Peter,

I recently had a similar problem with the same Haskell Platform version
but on a Macmini (running Lion as well).

I learnt that you have to install the 'command line tools' by using the
'preferences' of your XCode installation. After that, everything will work.

Best regards,

Salvador.

El 10/03/12 10:15, Peter escribió:
Hello - I'm a new user, having some trouble installing the Haskell 
Platform (2011.4.0.0 64bit.pkg) on a Macbook Pro (10.7.3).  I 
installed Xcode 4.3.1 (4E1019), then the Haskell Platform. When I 
double-click on the Platform package icon, I get an installation 
dialogue with an error message reading Developer Tools Missing - 
Please install Xcode developer tools first.  Are Xcode developer 
tools something distinct from Xcode itself?  I'm mystified by this 
error message.  Any assistance would be greatly appreciated - thank you.



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Any Haskell events in Madrid next week?

2013-09-06 Thread Salvador Lucas

Hi,

There is a workshop on Functional Programming and also
a conference on programming languages

   http://babel.ls.fi.upm.es/tpf2013/cfp_english.txt

If interested, you can contact the organizers...

Regards,

Salvador.

El 06/09/13 22:59, Joachim Breitner escribió:

Hi,

I'll be visiting Madrid next week (research visit) and I'm wondering if
there are any Haskell or FP Group meeting or other events that might be
interesting? I could possibly contribute a talk. (Both preferably in
English.)

Wednesday or Thursday evening might would most convenient.

Greetings,
Joachim



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe