Re: [Haskell-cafe] Safe 'chr' function?

2013-01-03 Thread Sai Hemanth K
Alternatively, is there a way to know ahead of time whether or not an Int will cause 'chr' to throw an exception? since Char is in instance of 'Bounded' as well as 'Enum' wouldn't fromEnum (maxBound :: Char) give the max value of Int for which a valid char exists? On Thu, Jan 3, 2013 at 1:20

Re: [Haskell-cafe] Safe 'chr' function?

2013-01-03 Thread Michael Snoyman
You could wrap chr with a call to spoon[1]. It's not the most elegant solution, but it works. [1] http://hackage.haskell.org/packages/archive/spoon/0.3/doc/html/Control-Spoon.html#v:spoon On Thu, Jan 3, 2013 at 9:50 AM, Myles C. Maxfield myles.maxfi...@gmail.comwrote: Hello, I'm working on a

Re: [Haskell-cafe] Safe 'chr' function?

2013-01-03 Thread Myles C. Maxfield
Thanks you two for your answers. Consider this issue closed now :-) --Myles On Thu, Jan 3, 2013 at 12:05 AM, Michael Snoyman mich...@snoyman.comwrote: You could wrap chr with a call to spoon[1]. It's not the most elegant solution, but it works. [1]

[Haskell-cafe] Lens, with ability to create a data-field when it's missing

2013-01-03 Thread Takayuki Muranushi
Dear All, I really am enjoying the lens (it is tough to learn, though :) Recently, I've been trying to implement a dynamic object --- a collection of methods that you can update at run-time --- using lens [1][2][3]. After several attempts, I think I have located the center of my problem: Lens

Re: [Haskell-cafe] Object Oriented programming for Functional Programmers

2013-01-03 Thread Alberto G. Corona
Anyway, Type checking is essentially an application of set theory : (I did no search in te literature for this, It is just my perception). When I say (+) :: Num a = a - a - a . I mean that (+) takes two elements of the set of Num typeclass and return another. This is in principle a weak

Re: [Haskell-cafe] Mancunian Haskellers out there?

2013-01-03 Thread James Jeffries
Hi there There isn't currently a haskell user groupu in Manchester, however there is a functional programming group where a lot of the member s are haskellers. http://www.lambdalounge.org.uk/ https://groups.google.com/forum/?fromgroups#!forum/lambda-lounge-manchester It is at Madlab in the

Re: [Haskell-cafe] Proving programs

2013-01-03 Thread satvik chauhan
Which book does that chapter belongs to? -Satvik On Thu, Jan 3, 2013 at 11:44 AM, Andrés Sicard-Ramírez andres.sicard.rami...@gmail.com wrote: On Wed, Jan 2, 2013 at 12:22 PM, Simon Thompson s.j.thomp...@kent.ac.uk wrote: Christopher, there's an introduction to proof for functional

Re: [Haskell-cafe] Proving programs

2013-01-03 Thread Andrés Sicard-Ramírez
On Thu, Jan 3, 2013 at 8:07 AM, satvik chauhan mystic.sat...@gmail.com wrote: Which book does that chapter belongs to? http://www-fp.dcs.st-and.ac.uk/pfpbook/ -- Andrés ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] [Haskell] Importing Repa library

2013-01-03 Thread Henning Thielemann
On Thu, 3 Jan 2013, Емануела Моллова wrote: Hello! :) I think you should better post your question to haskell-cafe@haskell.org. Then I put this script  import qualified Data.Array.Repa as R :m +Data.Array.Repa Z into the file file.hs, This is GHCi syntax, but it is not a valid Haskell

Re: [Haskell-cafe] Mancunian Haskellers out there?

2013-01-03 Thread Alfredo Di Napoli
Great news James, thanks! I've checked on the map and is near Piccadilly Gardens, in the heart of Manchester! I'll join the google group and attend the next meeting for sure :) Cheers, A. On 3 January 2013 12:59, James Jeffries jamesjeffri...@gmail.com wrote: Hi there There isn't currently a

Re: [Haskell-cafe] Object Oriented programming for Functional Programmers

2013-01-03 Thread Timon Gehr
On 01/03/2013 10:56 AM, Alberto G. Corona wrote: Anyway, Type checking is essentially an application of set theory : (I did no search in te literature for this, It is just my perception). Not exactly. Type theory is not an application of set theory, it is an alternative to set theory. When

Re: [Haskell-cafe] Object Oriented programming for Functional Programmers

2013-01-03 Thread Timon Gehr
On 01/02/2013 11:19 PM, MigMit wrote: On Jan 3, 2013, at 2:09 AM, Gershom Bazerman gersh...@gmail.com wrote: On 1/2/13 4:29 PM, MigMit wrote: BTW. Why you think that Eiffel type system is unsafe? Well, if I remember correctly, if you call some method of a certain object, and this call

[Haskell-cafe] Fwd: Foreign.Erlang help

2013-01-03 Thread Junior White
Hi Alexandar, Thanks for your help! I give up Foreign.Erlang and try usual tcp server in Haskell instead. -- Forwarded message -- From: Junior White efi...@gmail.com Date: Fri, Jan 4, 2013 at 3:18 PM Subject: Re: [Haskell-cafe] Foreign.Erlang help To: Alexander Alexeev