Re: [Haskell-cafe] Proposed change to mime-mail

2011-11-28 Thread Michael Snoyman
On Wed, Nov 23, 2011 at 9:39 PM, Erik Hesselink hessel...@gmail.com wrote:
 Hi all,

 I've found and solved a problem with mime-mail, and Michael Snoyman
 asked me to send a request for feedback to -cafe, so here goes.

 In short, the issue is with address headers containing 'special'
 (non-ascii) characters. In mime-mail, these are automatically encoded
 according to RFC 2047. However, the email address part of an address
 header is not allowed to be encoded.

 My patch adds 'from', 'to', 'cc' and 'bcc' fields to the Mail data
 type, and creates correct headers from these fields. This does make
 the Mail type a bit larger, so I've also added a smart constructor
 with initializes these fields with empty lists (only 'from' is
 required).

 For more details, see my initial bug report [1] and my patches in the
 pull request [2].

 If you have any comments on this change, please let me know.

 Regards,

 Erik

 [1] https://github.com/snoyberg/mime-mail/issues/5
 [2] https://github.com/snoyberg/mime-mail/pull/6

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


Since there were no objections, I've merged the patches and released
mime-mail 0.4. Thanks Erik!

Michael

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


Re: [Haskell-cafe] Haskell Platform 64 bit

2011-11-28 Thread Jean-Marie Gaillourdet
Hi, 

On 26.11.2011, at 01:29, Philippe Sismondi wrote:

 I just tried to install the Haskell Platform 64-bit on OS X Snow Leopard 
 10.6.8. The install fails with an error. This is all I see in 
 /var/log/install.log:
 
 11-11-25 6:22:01 PM   Installer[53992]The Installer encountered an 
 error that caused the installation to fail. Contact the software manufacturer 
 for assistance.
 
 Is it known to be broken? I find something in haskell-cafe archives from last 
 spring about a such a problem, but I don't know where to look for anything 
 more recent. I may be blind, but I cannot see anything in the tickets under 
 known problems.
 


just for your information. Currently I am using Lion, and the Haskell Platform 
64-bit installer worked fine for me. I am pretty sure it worked on Snow Leopard 
for me as well. But I can't tell anymore, since I don't have any Snow Leopard 
machines around.

Cheers,
  Jean


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


[Haskell-cafe] PADL 2012 Call for Participation

2011-11-28 Thread Claudio Russo
Call for Participation
==

  14th International Symposium on 
  Practical Aspects of Declarative Languages (PADL 2012)

http://research.microsoft.com/~crusso/padl12

 Philadelphia, Pennsylvania, USA, January 23-24, 2012
Co-located with ACM POPL'12
 
 
You are cordially invited to PADL'12. PADL is a forum for researchers
and practitioners to present original work emphasizing novel
applications and implementation techniques for all forms of
declarative concepts, including functional, logic and
constraints. PADL'12 is sponsored by Association for Logic Programming
with cooperation of ACM SIGPLAN and support by Microsoft Research.


Registration

To register for PADL'12, please follow the instructions at:

 https://regmaster3.com/2012conf/POPL12/register.php

The early registration deadline is December 24, 2011. The registration
fee will cover a copy of the symposium proceedings, refreshments, and
an informal dinner.

Hotel Information
=

PADL will be co-located with POPL at the Sheraton Society Hill Hotel
in Philadelphia.  Please visit POPL's web site to make reservations at
the special conference rate.

Program
===

The symposium will include invited talks by Boon Thau Loo and Don
Stewart, and 19 technical papers selected from 41 submissions.

The preliminary program is as follows:

Invited Talk (9:00-10:00)

* Boon Thau Loo
  Recent Advances in Declarative Networking 

Break (10:00-10:30)
Session 1: Applications (10:30-12:00)

* Mayer Goldberg and Guy Wiener
  A Declarative Approach for Software Modeling 
* Sergio Antoy and Michael Hanus
  Contracts and Specifications for Functional Logic Programming 
* Pedro M. Martins, Julie A. McCann and Susan Eisenbach
  The Environment as an Argument 

Lunch (not provided) (12:00-13:30)
Session 2: Logic Programming (13:30-15:30)

* Yuliya Lierler, Shaden Smith, Mirek Truszczynski and Alex Westlund
  Weighted-Sequence Problem: ASP vs CASP and Declarative vs 
Problem-Oriented Solving 
* Marcello Balduccini and Yuliya Lierler
  Practical and Methodological Aspects of the Use of Cutting-Edge ASP Tools 
* Christian Theil Have and Henning Christiansen
  Efficient tabling of structured data using indexing and program 
transformation 
* Dario Campagna, Beata Sarna-Starosta and Tom Schrijvers
  Optimizing Inequality Joins in Datalog with Approximated Constraint 
Propagation 

Break (15:30-16:00)
Session 3: Parallelism and Concurrency (16:00-17:30)

* Elvira Albert, Puri Arenas and Miguel Gomez-Zamalloa
  Symbolic Execution of Concurrent Objects in CLP 
* Pablo Chico De Guzmán, Amadeo Casas, Manuel Carro and Manuel Hermenegildo
  A Segment-Swapping Approach for Executing Trapped Computations 
* Michael Lesniak
  Palovca: Describing and Executing Graph Algorithms in Haskell 

Informal PADL Dinner (Place: TBA)

Tuesday, January 24, 2012
Breakfast (8:00-9:00)
Invited Talk (9:00-10:00)

* Don Stewart
  Make Things Now! Pragmatic Functional Programming in Haskell 

Break (10:00-10:30)
Session 4: Domain Specific Languages I (10:30-12:00)

* Kenny Zhu, Kathleen Fisher and David Walker
  LearnPADS++: Incremental Inference of Ad Hoc Data Formats 
* Jeroen Bransen, Arie Middelkoop, Atze Dijkstra and S. Doaitse Swierstra
  The Kennedy-Warren algorithm revisited: ordering Attribute Grammars 
* Nicholas Coleman
  Distributed Policy Specification and Interpretation with Classified 
Advertisements 

Lunch (not provided) (12:00-13:30)
Session 5: Domain Specific Languages II (13:30-15:30)

* Andy Gill and Bowe Neuenschwander
  Handshaking in Kansas Lava using Patch Logic 
* Daniel Winograd-Cort, Hai Liu and Paul Hudak
  Virtualizing Real-World Objects in FRP 
* Edwin Brady and Kevin Hammond
  Resource-safe Systems Programming with Embedded Domain Specific Languages 
* David Broman and Henrik Nilsson
  Node-Based Connection Semantics for Equation-Based Object-Oriented 
Modeling Languages 

Break (15:30-16:00)
Session 6: Numerics (16:00-17:00)

* Paul Tarau
  A Declarative Specification of Tree-based Symbolic Arithmetic 
Computations 
* Vincent St-Amour, Sam Tobin-Hochstadt, Matthew Flatt and Matthias 
Felleisen
  Typing the Numeric Tower



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


Re: [Haskell-cafe] Drawing charts over a lot of data

2011-11-28 Thread Tim Docker

On 22/11/2011, at 10:55 AM, Bryan O'Sullivan wrote:

Be aware that Chart is pretty slow on large data sets.


I've noticed this too. I believe the issue is with the cairo bindings  
- hopefully a new version

of gtk2hs will fix this:

http://www.mail-archive.com/haskell-cafe@haskell.org/msg94451.html

Tim



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


[Haskell-cafe] Overloaded Strings as default

2011-11-28 Thread Daniel Díaz Casanueva
Hi Cafe,

I only feel curious about what would be the consequences of becoming the
Overloaded Strings feature (currently, an extension) to be default in
Haskell. This is not a proposal. I just want to know what pros and
cons there are.

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


Re: [Haskell-cafe] Overloaded Strings as default

2011-11-28 Thread Ivan Lazar Miljenovic
On 29 November 2011 07:28, Daniel Díaz Casanueva dhelta.d...@gmail.com wrote:
 Hi Cafe,

 I only feel curious about what would be the consequences of becoming the
 Overloaded Strings feature (currently, an extension) to be default in
 Haskell. This is not a proposal. I just want to know what pros and
 cons there are.

One cons would be that you may need some more explicit type signatures
being used: I have the situation in my graphviz library where both
Text and String have instances of some classes (e.g. Labellable, which
has a method toLabel :: (Labellable a) = a - Label) which result in
explicit String values in the source code result in the compiler not
knowing which instance to use (e.g. toLabel hi).

-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com

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


[Haskell-cafe] (no subject)

2011-11-28 Thread Willem Obbens

Hello, 
I get this error when I try to derive an instance of the Show typeclass:
Abc.hs:21:60:Couldn't match expected type `Vector' with actual type 
`[Point]'In the first argument of `show'', namely `xs'In the second 
argument of `(++)', namely `show' xs'In the second argument of `(++)', 
namely `,  ++ show' xs'Failed, modules loaded: none.
Here's the faulty code:
newtype Point = Point Intinstance Show Point where   show (Point a) = [chr $ a 
+ 48]   data Vector = Vector [Point]instance Show Vector where   show (Vector 
ys) =  let show' (Vector [z]) = show z  show' (Vector (x:xs))  
= show x ++ ,  ++ show' xs  show' (Vector [])  = []  in  ( 
++ show' ys ++ )
What I'm trying to do, is to print out a vector like Vector [Point 1, Point 2, 
Point 3] as (1, 2, 3).My question is: what should I change in order to make 
it work?
Best regards,
William   ___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] (no subject)

2011-11-28 Thread Antoine Latter
On Mon, Nov 28, 2011 at 4:12 PM, Willem Obbens dub...@hotmail.com wrote:
 Hello,
 I get this error when I try to derive an instance of the Show typeclass:
 Abc.hs:21:60:
     Couldn't match expected type `Vector' with actual type `[Point]'
     In the first argument of `show'', namely `xs'
     In the second argument of `(++)', namely `show' xs'
     In the second argument of `(++)', namely `,  ++ show' xs'
 Failed, modules loaded: none.
 Here's the faulty code:
 newtype Point = Point Int
 instance Show Point where
    show (Point a) = [chr $ a + 48]

 data Vector = Vector [Point]
 instance Show Vector where
    show (Vector ys) =
       let show' (Vector [z])     = show z
           show' (Vector (x:xs))  = show x ++ ,  ++ show' xs
           show' (Vector [])      = []
       in  ( ++ show' ys ++ )

Here you're treating the value 'ys' as if its type was 'Vector', but
its type is '[Point]'.

Does that help?

Antoine

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


Re: [Haskell-cafe] (no subject)

2011-11-28 Thread Brent Yorgey
On Mon, Nov 28, 2011 at 04:20:54PM -0600, Antoine Latter wrote:
 On Mon, Nov 28, 2011 at 4:12 PM, Willem Obbens dub...@hotmail.com wrote:
  Hello,
  I get this error when I try to derive an instance of the Show typeclass:
  Abc.hs:21:60:
      Couldn't match expected type `Vector' with actual type `[Point]'
      In the first argument of `show'', namely `xs'
      In the second argument of `(++)', namely `show' xs'
      In the second argument of `(++)', namely `,  ++ show' xs'
  Failed, modules loaded: none.
  Here's the faulty code:
  newtype Point = Point Int
  instance Show Point where
     show (Point a) = [chr $ a + 48]
 
  data Vector = Vector [Point]
  instance Show Vector where
     show (Vector ys) =
        let show' (Vector [z])     = show z
            show' (Vector (x:xs))  = show x ++ ,  ++ show' xs
            show' (Vector [])      = []
        in  ( ++ show' ys ++ )

You've made  show' :: Vector - String, but I'm guessing you actually
want to make it  show' :: [Point] - String; i.e. get rid of the
Vector constructors in the show' patterns.

-Brent

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


Re: [Haskell-cafe] (no subject)

2011-11-28 Thread Willem O





Yes, thank you. Here's my simple fix:
newtype Point = Point Int
instance Show Point where   show (Point a) = [chr $ a + 48]
data Vector = Vector [Point]
instance Show Vector where
   show (Vector ys) =
  let show' [z] = show z
   show' (x:xs)  = show x ++ ,  ++ show' xs
   show' []  = []
  in  ( ++ show' ys ++ )
And I added this function: 
createPoint :: Int - PointcreatePoint x = Point x
When I loaded the file containing all this into ghci and executed 'Vector $ map 
createPoint [1..5]' the result was '(1, 2, 3, 4, 5)' (without the quotes).This 
was actually more or less a test question as I'm new to haskell-cafe, but I 
hope people who will read this message will learn from my mistake.
Thank you.
 From: aslat...@gmail.com
 Date: Mon, 28 Nov 2011 16:20:54 -0600
 Subject: Re: [Haskell-cafe] (no subject)
 To: dub...@hotmail.com
 CC: haskell-cafe@haskell.org
 
 On Mon, Nov 28, 2011 at 4:12 PM, Willem Obbens dub...@hotmail.com wrote:
  Hello,
  I get this error when I try to derive an instance of the Show typeclass:
  Abc.hs:21:60:
  Couldn't match expected type `Vector' with actual type `[Point]'
  In the first argument of `show'', namely `xs'
  In the second argument of `(++)', namely `show' xs'
  In the second argument of `(++)', namely `,  ++ show' xs'
  Failed, modules loaded: none.
  Here's the faulty code:
  newtype Point = Point Int
  instance Show Point where
 show (Point a) = [chr $ a + 48]
 
  data Vector = Vector [Point]
  instance Show Vector where
 show (Vector ys) =
let show' (Vector [z]) = show z
show' (Vector (x:xs))  = show x ++ ,  ++ show' xs
show' (Vector [])  = []
in  ( ++ show' ys ++ )
 
 Here you're treating the value 'ys' as if its type was 'Vector', but
 its type is '[Point]'.
 
 Does that help?
 
 Antoine

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


Re: [Haskell-cafe] Haskell Platform 64 bit

2011-11-28 Thread David Pollak
Please try the following:

raptor:~ root# rm -rf /Library/Haskell/
raptor:~ root# cd ~dpp/Library/
raptor:Library root# rm -rf Haskell/
raptor:Library root# cd ..
raptor:dpp root# rm -rf .cabal/
raptor:dpp root#


I think the issue is that the installer was trying to install on top of an
existing installation and that was causing issues.

On Fri, Nov 25, 2011 at 4:29 PM, Philippe Sismondi psismo...@arqux.comwrote:

 I just tried to install the Haskell Platform 64-bit on OS X Snow Leopard
 10.6.8. The install fails with an error. This is all I see in
 /var/log/install.log:

 11-11-25 6:22:01 PM Installer[53992]The Installer encountered
 an error that caused the installation to fail. Contact the software
 manufacturer for assistance.

 Is it known to be broken? I find something in haskell-cafe archives from
 last spring about a such a problem, but I don't know where to look for
 anything more recent. I may be blind, but I cannot see anything in the
 tickets under known problems.

 I have been successfully running the 32-bit version for quite a while, but
 have begun to run into problems with linking haskell stuff against various
 64-bit macports libraries.

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




-- 
Visi.Pro, Cloud Computing for the Rest of Us http://visi.pro
Lift, the simply functional web framework http://liftweb.net
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Built-in LLVM exception handling

2011-11-28 Thread Gregory Crosswhite
Purely out of curiosity, would it be more efficient for GHC to use the new 
built-in exception handling instructions in LLVM?

http://blog.llvm.org/2011/11/llvm-30-exception-handling-redesign.html

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


[Haskell-cafe] containers-deepseq?

2011-11-28 Thread Michael Snoyman
Hi all,

Since the release of deepseq 1.2, we've had a bit of a problem: when
using the newest versions of packages on Hackage, there is no NFData
instance available for the containers types. When GHC 7.4 comes out
with its newer version of containers, this will be addressed, but
we'll still have problems for users of older GHC releases.

I'd like to suggest a solution: a new package called
containers-deepseq. Using conditional compilation, it will provide an
orphans NFData instance for all containers types when deepseq = 1.2
and containers  0.5. Packages (e.g., aeson) would then depend on
containers-deepseq and simply import the module whenever they rely on
the NFData instances. When GHC 7.4 comes out, the package will
essentially be a no-op.

Does this make sense?

Michael

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


Re: [Haskell-cafe] containers-deepseq?

2011-11-28 Thread Michael Snoyman
On Tue, Nov 29, 2011 at 7:43 AM, Michael Snoyman mich...@snoyman.com wrote:
 Hi all,

 Since the release of deepseq 1.2, we've had a bit of a problem: when
 using the newest versions of packages on Hackage, there is no NFData
 instance available for the containers types. When GHC 7.4 comes out
 with its newer version of containers, this will be addressed, but
 we'll still have problems for users of older GHC releases.

 I'd like to suggest a solution: a new package called
 containers-deepseq. Using conditional compilation, it will provide an
 orphans NFData instance for all containers types when deepseq = 1.2
 and containers  0.5. Packages (e.g., aeson) would then depend on
 containers-deepseq and simply import the module whenever they rely on
 the NFData instances. When GHC 7.4 comes out, the package will
 essentially be a no-op.

 Does this make sense?

 Michael


Sorry, that should be containers  0.4.2.

Michael

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


Re: [Haskell-cafe] (no subject)

2011-11-28 Thread Erik Hesselink
On Mon, Nov 28, 2011 at 23:55, Willem O dub...@hotmail.com wrote:
 And I added this function:
 createPoint :: Int - Point
 createPoint x = Point x
 When I loaded the file containing all this into ghci and executed 'Vector $
 map createPoint [1..5]' the result was '(1, 2, 3, 4, 5)' (without the
 quotes).

Note that you do not need this function. You can just use the 'Point'
constructor:

map Point [1..5]

Erik

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