Daniel Santa Cruz | 3 Feb 01:44 2011
Picon

Haskell Weekly News: Issue 167 - February 02, 2011

   Welcome to issue 167 of the HWN, a newsletter covering developments in
   the [1]Haskell community. This release covers the week of January 23 to
   29, 2011.

   This week I've added a section which compiles a list of the top answers
   given in StackOverflow during the week. These seem to be of more
   interest to more experienced Haskell users than the newbie questions
   usually posted on the site. See what you think.

Announcements

   R. Emre Basar [2]annouced the release of follower, a tool that allows
   you to follow people's tweets without having an account with Twitter.

   Alberto Ruiz [3]announced hmatrix version 0.11, a package for numerical
   computation based on LAPACK and SGL.

   Michael Snoyman [4]made some point updates for WAI and Warp. "They fix
   some documentation issues, add some status aliases, make it possible to
   handle exceptions more easily, and make things more responsive on
   Windows."

   Antoine Latter [5]announced a minor point release for Parsec 3.1.0.

   John Meacham [6]announced version 0.7.7 of jhc is out! "This release
   fixes a large number of bugs that cropped up when compiling haskell out
   in the wild as well as adds some more features. A major one being the
   garbage collector is enabled by default."

Quotes of the Week
(Continue reading)

Navin Rustagi | 3 Feb 02:49 2011
Picon

a quick question

Hi all, 

I am stuck at a piece of code and am not able to figure out the error.  


uptable::[[Char]]->[([Char],Int,Int,Int,Int)]->[([Char],Int,Int,Int,Int)]
uptable (xf:xs) main_array = map (\(x,y,z,r,t)-> do if x==xf then tupup x y z r t second xs ) main_array


here tupup and second are functions which are working .  When compiling this it gives the error 

Syntax error in expression (unexpected `)')


I am no t able to figure out where I could have gone wrong. I have tried all bracketing combinations and nothing works. 

Navin 

_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell
Ramy Abdel-Azim | 3 Feb 02:55 2011
Picon

Re: a quick question

Missing else?

On Wed, Feb 2, 2011 at 8:49 PM, Navin Rustagi <navin_kunta <at> yahoo.com> wrote:
Hi all, 

I am stuck at a piece of code and am not able to figure out the error.  


uptable::[[Char]]->[([Char],Int,Int,Int,Int)]->[([Char],Int,Int,Int,Int)]
uptable (xf:xs) main_array = map (\(x,y,z,r,t)-> do if x==xf then tupup x y z r t second xs ) main_array


here tupup and second are functions which are working .  When compiling this it gives the error 

Syntax error in expression (unexpected `)')


I am not able to figure out where I could have gone wrong. I have tried all bracketing combinations and nothing works. 

Navin 


_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell


_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell
Navin Rustagi | 3 Feb 03:07 2011
Picon

Re: a quick question

Sorry, dumb of me  doesn't give this error anymore. 
thanks, 
Navin
From: Ramy Abdel-Azim <ramy.abdelazim <at> gmail.com>
To: Navin Rustagi <navin_kunta <at> yahoo.com>
Cc: b> Haskell <at> haskell.org
Sent: Wed, February 2, 2011 7:55:09 PM
Subject: Re: [Haskell] a quick question

Missing else?

On Wed, Feb 2, 2011 at 8:49 PM, Navin Rustagi <navin_kunta <at> yahoo.com> wrote:
Hi all, 

I am stuck at a piece of code and am not able to figure out the error.  


uptable::[[Char]]->[([Char],Int,Int,Int,Int)]->[([Char],Int,Int,Int,Int)]
uptable (xf:xs) main_array = map (\(x,y,z,r,t)-> do if x==xf then tupup x y z r t second xs ) main_array


here tupup and second are functions which are working .  When compiling this it gives the error 

Syntax error in expression (unexpected `)')


I am not able to figure out where I could have gone wrong. I have tried all bracketing combinations and nothing works. 

Navin 


_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell



_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell
Ramy Abdel-Azim | 3 Feb 04:01 2011
Picon

Re: a quick question

No need to apologize. Not dumb of you. The mandatory else is unusual. I don't personally know of any other language that requires an else for every if.

On Wed, Feb 2, 2011 at 9:07 PM, Navin Rustagi <navin_kunta <at> yahoo.com> wrote:
Sorry, dumb of me  doesn't give this error anymore. 
thanks, 
Navin
From: Ramy Abdel-Azim <ramy.abdelazim <at> gmail.com>
To: Navin Rustagi <navin_kunta <at> yahoo.com>
Cc: Haskell <at> haskell.org
Sent: Wed, February 2, 2011 7:55:09 PM
Subject: Re: [Haskell] a quick question

Missing else?

On Wed, Feb 2, 2011 at 8:49 PM, Navin Rustagi <navin_kunta <at> yahoo.com> wrote:
Hi all, 

I am stuck at a piece of code and am not able to figure out the error.  


uptable::[[Char]]->[([Char],Int,Int,Int,Int)]->[([Char],Int,Int,Int,Int)]
uptable (xf:xs) main_array = map (\(x,y,z,r,t)-> do if x==xf then tupup x y z r t second xs ) main_array


here tupup and second are functions which are working .  When compiling this it gives the error 

Syntax error in expression (unexpected `)')


I am not able to figure out where I could have gone wrong. I have tried all bracketing combinations and nothing works. 

Navin 


_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell




_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell
Ashley Yakeley | 3 Feb 07:15 2011

ANNOUNCE: time-1.2.0.4

A small update, time-1.2.0.4 fixes a bug in parseTime reported to me by 
Michael Gurlitz:

 > import Data.Time
 > import Data.Time.Clock
 > import System.Locale
 >
 > main = print (parseTime defaultTimeLocale "%e %B %Y" "April 2000" :: 
 > Maybe Day)
 > -- Just *** Exception: Prelude.read: no parse

Specifically:

 > parseTime defaultTimeLocale "%e" "" :: Maybe Day
 > -- Just *** Exception: Prelude.read: no parse

In time-1.2.0.4, they now correctly evaluate to Nothing. I've updated 
the unit tests to catch this too.

--

-- 
Ashley Yakeley
Julian Gilbey | 3 Feb 08:57 2011
Picon

Re: a quick question

On Wed, Feb 02, 2011 at 10:01:08PM -0500, Ramy Abdel-Azim wrote:
> No need to apologize. Not dumb of you. The mandatory else is unusual. I
> don't personally know of any other language that requires an else for every
> if.

Indeed.  Haskell's if ... then ... else ... is akin to C's ... ? ... :
... ternary operator rather than standard if/then/else clauses.

Remember that if ... then ... else ... is an _expression_, so must
have a value irrespective of whether the condition is true or false;
therefore, there must be an else clause.

   Julian
Matthias Görgens | 3 Feb 10:33 2011

Re: a quick question

> uptable::[[Char]]->[([Char],Int,Int,Int,Int)]->[([Char],Int,Int,Int,Int)]
> uptable (xf:xs) main_array = map (\(x,y,z,r,t)-> do if x==xf then tupup x y
> z r t second xs ) main_array

Why do you have a `do' in that snippet?
malcolm.wallace | 3 Feb 10:38 2011

Re: a quick question

Can I suggest you take this discussion to either the haskell-beginners list, or haskell-cafe?
This list (haskell <at> haskell.org) is intended primarily for announcements.
Regards, Malcolm

On 03 Feb, 2011,at 09:33 AM, Matthias Görgens <matthias.goergens <at> googlemail.com> wrote:

> uptable::[[Char]]->[([Char],Int,Int,Int,Int)]->[([Char],Int,Int,Int,Int)]
> uptable (xf:xs) main_array = map (\(x,y,z,r,t)-> do if x==xf then tupup x y
> z r t second xs ) main_array

Why do you have a `do' in that snippet?

_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell
_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell
George Giorgidze | 3 Feb 17:45 2011
Picon

ANNOUNCE: Database Supported Haskell (DSH)

I am pleased to announce that Database Supported Haskell (DSH) has been
released on Hackage [1].

DSH is a Haskell library for database-supported program execution. Using this
library a relational database management system (RDBMS) can be used as a
coprocessor for the Haskell programming language, especially for those program
fragments that carry out data-intensive and data-parallel computation.

Database executable program fragments can be written using the list
comprehension notation (with modest syntax changes due to quasiquoting) and
list processing combinators from the Haskell list prelude. Note that rather
than embedding a relational language into Haskell, we turn idiomatic Haskell
programs into SQL queries.

DSH faithfully represents list order and nesting, and compiles the list
processing combinators into relational queries. The implementation avoids
unnecessary data transfer and context switching between the database
coprocessor and the Haskell runtime by ensuring that the number of generated
relational queries is only determined by the program fragment's type and not
by the database size.

DSH can be used to allow existing Haskell programs to operate on large scale
data (e.g., larger than the available heap) or query existing database
resident data with Haskell.

Note that this package is flagged experimental and therefore not suited for
production use. This is a proof of concept implementation only. To learn more
about DSH, our paper entitled as "Haskell boards the Ferry: Database-supported
program execution for Haskell" is a recommended reading [2]. The package
includes a couple of examples that demonstrate how to use DSH.

[1] http://hackage.haskell.org/package/DSH

[2] http://www-db.informatik.uni-tuebingen.de/files/publications/ferryhaskell.pdf

Gmane