[Haskell-cafe] Don't miss CUFP

2009-07-24 Thread Simon Peyton-Jones
Hey, guys,

This list has zillions of people who use Haskell for day-to-day work.  So you 
might want to come to the now-annual workshop for

Commercial Users of Functional Programming (CUFP)
http://cufp.galois.com
4 Sept 2009, Edinburgh

Speakers from companies including Facebook, Barclays Capital, and EDF Trading, 
using Haskell, Scala, F#, among others.

Better still, CUFP is preceded and followed by a day of developer-focused 
tutorials:

Developer Tracks on Functional Programming
http://www.defun2009.info/blog/
3 and 5 Sept, Edinburgh

Tutorials covering tools and libraries in Erlang, OCaml, Scala, PLT Scheme, and 
more.

And if that isn't enough, all this is co-located with 
International Conference on Functional Programming (ICFP)
Haskell Symposium
ML Workshop
Generic Programming Workshop
Erlang Workshop
Haskell Implementors Workshop

Such a cornucopia of delights.  It'll be fun.  But you do have to register: 
http://www.cs.nott.ac.uk/~gmh/icfp09.html

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


[Haskell-cafe] Static linking

2009-07-24 Thread Michael Oswald
Hello,


I wrote a small installer program which configures and installs some software
packages. In order to be able to let it run on a different machine, where I
possibly don't have the needed shared libraries, I tried to link it
statically, following this advice:

http://www.haskell.org/haskellwiki/Practical_web_programming_in_Haskell#Deployin
g_statically_linked_applications

However I get some linking errors:

 ghc --make Installer.hs -static -optl-static

/usr/lib/ghc-6.10.3/unix-2.3.2.0/libHSunix-2.3.2.0.a(User__143.o)(.text+0xf1):

In function `s7Tu_info':
: warning: Using 'getgrnam_r' in statically linked applications requires at 
runtime the shared libraries from the glibc version used for linking 
/usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../../libedit.a(readline.o)(.text+0x7b
2):

In function `username_completion_function': 
/home/oswald/build/libedit-20090610-3.0/src/readline.c:1467:0:
 warning: Using 'getpwent' in statically linked applications requires at
runtime the shared libraries from the glibc version used for linking

src/dlmalloc.c:2486:0:  undefined reference to `pthread_mutex_lock'
/usr/lib/ghc-6.10.3/libffi.a(closures.o)(.text+0x132):src/dlmalloc.c:2493:
undefined reference to `pthread_mutex_unlock'
/usr/lib/ghc-6.10.3/libffi.a(closures.o)(.text+0x184):src/dlmalloc.c:2490:
undefined reference to `pthread_mutex_init'
/usr/lib/ghc-6.10.3/libffi.a(closures.o)(.text+0x227): In function
`ffi_closure_free':


Because of the undefined references to pthread_mutex_lock I then 
tried various versions of 

ghc --make Installer.hs -static -optl-static -lpthread -lrt

and reordered the -l switches, but neither combination helped. I always get the
same error.

Does somebody know how to correctly specify the pthread library for this?


lg,
Michael



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


[Haskell-cafe] Re: Static linking

2009-07-24 Thread Michael Oswald
Marcin Kosiba marcin.kosiba at gmail.com writes:

   Try:
   ghc --make Installer.hs -static -optl-static -optl-pthread
 

Ah, that fixed it. Thanks a lot!


 If that doesn't work, you can always do a ghc -v, find the command it uses 
 for 
 linking, modify it and run it manually.

Peter suggested this, but I ran into other problems. But since it works now, I'm
happy with it! Thanks again!

lg,
Michael


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


Re: [Haskell-cafe] ANN: darcs 2.3.0

2009-07-24 Thread Salvatore Insalaco
Great! Just a little note: MSYS isn't required to install Darcs with
cabal on Windows, just to develop or run tests.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Static linking

2009-07-24 Thread Marcin Kosiba
On Friday 24 July 2009, Michael Oswald wrote:
 Hello,


 I wrote a small installer program which configures and installs some
 software packages. In order to be able to let it run on a different
 machine, where I possibly don't have the needed shared libraries, I tried
 to link it statically, following this advice:

 http://www.haskell.org/haskellwiki/Practical_web_programming_in_Haskell#Dep
loyin g_statically_linked_applications

 However I get some linking errors:

  ghc --make Installer.hs -static -optl-static

 /usr/lib/ghc-6.10.3/unix-2.3.2.0/libHSunix-2.3.2.0.a(User__143.o)(.text+0xf
1):

 In function `s7Tu_info':
 : warning: Using 'getgrnam_r' in statically linked applications requires at

 runtime the shared libraries from the glibc version used for linking
 /usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../../libedit.a(readline.o)(.text
+0x7b 2):

 In function `username_completion_function':
 /home/oswald/build/libedit-20090610-3.0/src/readline.c:1467:0:
  warning: Using 'getpwent' in statically linked applications requires
 at runtime the shared libraries from the glibc version used for linking

 src/dlmalloc.c:2486:0:  undefined reference to `pthread_mutex_lock'
 /usr/lib/ghc-6.10.3/libffi.a(closures.o)(.text+0x132):src/dlmalloc.c:2493:
 undefined reference to `pthread_mutex_unlock'
 /usr/lib/ghc-6.10.3/libffi.a(closures.o)(.text+0x184):src/dlmalloc.c:2490:
 undefined reference to `pthread_mutex_init'
 /usr/lib/ghc-6.10.3/libffi.a(closures.o)(.text+0x227): In function
 `ffi_closure_free':


 Because of the undefined references to pthread_mutex_lock I then
 tried various versions of

 ghc --make Installer.hs -static -optl-static -lpthread -lrt

 and reordered the -l switches, but neither combination helped. I always get
 the same error.

 Does somebody know how to correctly specify the pthread library for this?

Hi,
Try:
ghc --make Installer.hs -static -optl-static -optl-pthread

If that doesn't work, you can always do a ghc -v, find the command it uses for 
linking, modify it and run it manually.

Thanks!
Marcin Kosiba


signature.asc
Description: This is a digitally signed message part.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: ANN: darcs 2.3.0

2009-07-24 Thread Petr Rockai
Salvatore Insalaco kirb...@gmail.com writes:
 Great! Just a little note: MSYS isn't required to install Darcs with
 cabal on Windows, just to develop or run tests.
Oh, good to know. I had no idea you could use cmd.exe to run cabal and darcs
and that it would work.

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


[Haskell-cafe] ANN: Leksah 0.6

2009-07-24 Thread Hamish Mackenzie
Hi,

Just a quick note to let people know we released a new version of
Leksah this week.  Thanks for the help and feedback on the previous
version.  We have done our best to add the features we thought were
most pressing.

Please give it a go and let us know what features you would like to
see most in the future.

http://leksah.org/

__ What's New __
  * Integrated GHCi based debugging
  * Multi-window support (View - Detach)
  * Improved layout control (drag  drop and nesting)
  * Regular expression find and replace
  * Grep files in the current package
  * Improved Mac OS X integration

__ Known Bugs and Problems __
  * The package editor works only for cabal files without configurations.
  * MS Windows: The check for external modifications of source files
does not work.
  * MS Windows: Interruption of a background build does not work.
  * Navigation in Trace history does not work.

Mac OSX users can install using Mac Ports as usual or use the provided
Intel binary (tested on Leopard only).
http://leksah.org/Leksah-0.6.1.0.dmg

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


Re: [Haskell-cafe] ANN: Leksah 0.6

2009-07-24 Thread Thomas Davie


On 24 Jul 2009, at 15:52, Hamish Mackenzie wrote:


Hi,

Just a quick note to let people know we released a new version of
Leksah this week.  Thanks for the help and feedback on the previous
version.  We have done our best to add the features we thought were
most pressing.

Please give it a go and let us know what features you would like to
see most in the future.

http://leksah.org/

__ What's New __
 * Integrated GHCi based debugging
 * Multi-window support (View - Detach)
 * Improved layout control (drag  drop and nesting)
 * Regular expression find and replace
 * Grep files in the current package
 * Improved Mac OS X integration

__ Known Bugs and Problems __
 * The package editor works only for cabal files without  
configurations.

 * MS Windows: The check for external modifications of source files
does not work.
 * MS Windows: Interruption of a background build does not work.
 * Navigation in Trace history does not work.

Mac OSX users can install using Mac Ports as usual or use the provided
Intel binary (tested on Leopard only).
http://leksah.org/Leksah-0.6.1.0.dmg


The new detach feature is great, it makes it much more usable for OS X  
users, but there's a small problem – if you detach the main source  
window (from the default config), you end up with a window containing  
just the package management/documentation stuff, which is great, but  
I'd like to be able to shrink it down.  You can't unfortunately  
because of the toolbar.  Would it be possible to move the toolbar onto  
the document windows rather than the package window.___

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


Re: [Haskell-cafe] ANN: Leksah 0.6

2009-07-24 Thread David Leimbach
The Mac Binary is a great addition! :-)  Thanks!

On Fri, Jul 24, 2009 at 6:52 AM, Hamish Mackenzie
ham...@firestream.co.ukwrote:

 Hi,

 Just a quick note to let people know we released a new version of
 Leksah this week.  Thanks for the help and feedback on the previous
 version.  We have done our best to add the features we thought were
 most pressing.

 Please give it a go and let us know what features you would like to
 see most in the future.

 http://leksah.org/

 __ What's New __
  * Integrated GHCi based debugging
  * Multi-window support (View - Detach)
  * Improved layout control (drag  drop and nesting)
  * Regular expression find and replace
  * Grep files in the current package
  * Improved Mac OS X integration

 __ Known Bugs and Problems __
  * The package editor works only for cabal files without configurations.
  * MS Windows: The check for external modifications of source files
 does not work.
  * MS Windows: Interruption of a background build does not work.
  * Navigation in Trace history does not work.

 Mac OSX users can install using Mac Ports as usual or use the provided
 Intel binary (tested on Leopard only).
 http://leksah.org/Leksah-0.6.1.0.dmg

 Hamish
 ___
 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


[Haskell-cafe] Re: System.Mem.performGC leaks?

2009-07-24 Thread Simon Marlow

On 23/07/2009 11:53, Simon Marlow wrote:

On 22/07/2009 02:51, Neal Alexander wrote:

Neal Alexander wrote:

Compiled with ghc -O2 -fvia-C -optc-O2 -funbox-strict-fields
-threaded btw.


GHC 6.10.3 on 64bit windows7.


Interesting. It's completely flat on Linux, but gobbles up about 1MB/s
on Windows. I'm investigating.


Found it - there was a CriticalSection being re-initialised at each GC.

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


[Haskell-cafe] Re: [Haskell] ANN: yices 0.0.0.1 - Haskell programming interface to Yices SMT solver

2009-07-24 Thread Aaron Tomb

You may want to take a look at this, as well:

http://www.sivity.net/projects/smt-yices

Aaron

On Jul 23, 2009, at 5:32 PM, Ahn, Ki Yung wrote:


http://hackage.haskell.org/package/yices

Incomplete (no bitvectors) syntax, parser, and inter
process communication to Yices from Haskell through pipe.
Purpose for building and using this library was to generate
test cases from constraints that SMT solvers can solve.  I
only used it for that particular purpose, so the code in
general is not yet fully tested.  Use at your own risk and
error reports are welcomed. See http://yices.csl.sri.com/
for further information on Yices.

Note: this package does not include Yices.  You should get it from the
Yices homepage and install it before using this library.

@ If you already have a better API for Yices or other SMT solvers, and
if you can open the source please upload it to hacakage.  That would  
be

great help for some people.

--
 Ahn, Ki Yung

___
Haskell mailing list
hask...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell



--
Aaron Tomb
Galois, Inc. (http://www.galois.com)
at...@galois.com
Phone: (503) 626-6616 ext. 156
Fax: (503) 350-0833




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


Re: [Haskell-cafe] ANN: Leksah 0.6

2009-07-24 Thread Hamish Mackenzie
2009/7/25 Thomas Davie tom.da...@gmail.com:
 The new detach feature is great, it makes it much more usable for OS X
 users, but there's a small problem – if you detach the main source window
 (from the default config), you end up with a window containing just the
 package management/documentation stuff, which is great, but I'd like to be
 able to shrink it down.  You can't unfortunately because of the toolbar.
  Would it be possible to move the toolbar onto the document windows rather
 than the package window.

Try this...
start with the default layout (rm ~/.leksah/Current.session)
click on the Modules tab (make sure it says Modules in the status bar)
View - Collapse (this will combine the two panes on the right into one)
View - Detach (this will detach them leaving the main toolbar behind)

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


Re: [Haskell-cafe] ANN: Leksah 0.6

2009-07-24 Thread Thomas DuBuisson
Now updating metadata ...
Why does it need more than 3GB of RAM at this point (I have 4GB and
see 70% going to Leksah before I kill it)?  I didn't point it at
_that_ much Haskell code to parse though.  Does it read everything
into some bloated internal format before parsing?

Thomas


On Fri, Jul 24, 2009 at 6:52 AM, Hamish
Mackenzieham...@firestream.co.uk wrote:
 Hi,

 Just a quick note to let people know we released a new version of
 Leksah this week.  Thanks for the help and feedback on the previous
 version.  We have done our best to add the features we thought were
 most pressing.

 Please give it a go and let us know what features you would like to
 see most in the future.

 http://leksah.org/

 __ What's New __
  * Integrated GHCi based debugging
  * Multi-window support (View - Detach)
  * Improved layout control (drag  drop and nesting)
  * Regular expression find and replace
  * Grep files in the current package
  * Improved Mac OS X integration

 __ Known Bugs and Problems __
  * The package editor works only for cabal files without configurations.
  * MS Windows: The check for external modifications of source files
 does not work.
  * MS Windows: Interruption of a background build does not work.
  * Navigation in Trace history does not work.

 Mac OSX users can install using Mac Ports as usual or use the provided
 Intel binary (tested on Leopard only).
 http://leksah.org/Leksah-0.6.1.0.dmg

 Hamish
 ___
 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] ANN: Leksah 0.6

2009-07-24 Thread Thomas Davie


On 24 Jul 2009, at 18:01, Hamish Mackenzie wrote:


2009/7/25 Thomas Davie tom.da...@gmail.com:
The new detach feature is great, it makes it much more usable for  
OS X
users, but there's a small problem – if you detach the main source  
window
(from the default config), you end up with a window containing just  
the
package management/documentation stuff, which is great, but I'd  
like to be
able to shrink it down.  You can't unfortunately because of the  
toolbar.
 Would it be possible to move the toolbar onto the document windows  
rather

than the package window.


Try this...
start with the default layout (rm ~/.leksah/Current.session)
click on the Modules tab (make sure it says Modules in the status bar)
View - Collapse (this will combine the two panes on the right into  
one)

View - Detach (this will detach them leaving the main toolbar behind)


Perfect :)  Leksah is looking really rather impressive, I look forward  
to seeing what else you do with it.


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


Re: [Haskell-cafe] ANN: Leksah 0.6

2009-07-24 Thread Don Stewart
thomas.dubuisson:
 Now updating metadata ...

How many packages do you have installed? :-)

 Why does it need more than 3GB of RAM at this point (I have 4GB and
 see 70% going to Leksah before I kill it)?  I didn't point it at
 _that_ much Haskell code to parse though.  Does it read everything
 into some bloated internal format before parsing?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] QuickCheck behaving strange

2009-07-24 Thread Tobias Olausson
Hey Guys!
I was writing a small implementation of the earliest-end-first algorithm
for the Interval Scheduling problem just now. When I was done, I thought
it would be a nice thing to have a QuickCheck property for my code. This
is what I came up with:

-- Intervals are just triplets
type Interval a t = (a,t,t)

end :: Interval a t - t
end (_,_,t) = t

begin :: Interval a t - t
begin (_,t,_) = t

And so the property:

prop_schedule :: Ord t = [Interval a t] - Bool
prop_schedule []= True
prop_schedule [a]   = True
prop_schedule (x:y:ys)  = end x = begin y  prop_schedule (y:ys)

Essentially, it looks up wheather the given list is sorted (given
the constraints
of the problem). However, in this property I forgot to add that the
lists should have
been run through my algorithm, which I noticed only after this strange problem
appeared:

*Interval quickCheck prop_schedule
+++ OK, passed 100 tests.

How come QuickCheck passes 100 tests of random lists? One would think that
at least one of the generated lists would be unsorted. It also passes
1000 and even
1 tests.

It also seems that changing the type helps:
prop_schedule :: [Interval a Int] - Bool
...
*Interval quickCheck prop_schedule
*** Failed! Falsifiable (after 5 tests and 1 shrink):
[((),0,0),((),-1,0)]

-- 
Tobias Olausson
tob...@gmail.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] QuickCheck behaving strange

2009-07-24 Thread Felipe Lessa
On Fri, Jul 24, 2009 at 08:11:12PM +0200, Tobias Olausson wrote:
 prop_schedule :: Ord t = [Interval a t] - Bool
 prop_schedule []= True
 prop_schedule [a]   = True
 prop_schedule (x:y:ys)  = end x = begin y  prop_schedule (y:ys)
[..]
 How come QuickCheck passes 100 tests of random lists? One would think that
 at least one of the generated lists would be unsorted. It also passes
 1000 and even
 1 tests.

Probably it was defaulting to 'Interval () ()'.  Try to do

   :s -Wall

on your GHCi prompt to see when these things happen.

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


Re: [Haskell-cafe] QuickCheck behaving strange

2009-07-24 Thread Jason Dagit
On Fri, Jul 24, 2009 at 11:29 AM, Felipe Lessa felipe.le...@gmail.comwrote:

 On Fri, Jul 24, 2009 at 08:11:12PM +0200, Tobias Olausson wrote:
  prop_schedule :: Ord t = [Interval a t] - Bool
  prop_schedule []= True
  prop_schedule [a]   = True
  prop_schedule (x:y:ys)  = end x = begin y  prop_schedule (y:ys)
 [..]
  How come QuickCheck passes 100 tests of random lists? One would think
 that
  at least one of the generated lists would be unsorted. It also passes
  1000 and even
  1 tests.

 Probably it was defaulting to 'Interval () ()'.  Try to do


Cases like this make me feel as though the instance of Ord for () was  a
mistake.

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


Re: [Haskell-cafe] QuickCheck behaving strange

2009-07-24 Thread Tobias Olausson
It seems this was the case, thank you!

/Tobias

2009/7/24 Felipe Lessa felipe.le...@gmail.com:
 On Fri, Jul 24, 2009 at 08:11:12PM +0200, Tobias Olausson wrote:
 prop_schedule :: Ord t = [Interval a t] - Bool
 prop_schedule []        = True
 prop_schedule [a]       = True
 prop_schedule (x:y:ys)  = end x = begin y  prop_schedule (y:ys)
 [..]
 How come QuickCheck passes 100 tests of random lists? One would think that
 at least one of the generated lists would be unsorted. It also passes
 1000 and even
 1 tests.

 Probably it was defaulting to 'Interval () ()'.  Try to do

   :s -Wall

 on your GHCi prompt to see when these things happen.

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




-- 
Tobias Olausson
tob...@gmail.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANN: Leksah 0.6

2009-07-24 Thread Thomas DuBuisson
On Fri, Jul 24, 2009 at 11:08 AM, Don Stewartd...@galois.com wrote:
 thomas.dubuisson:
 Now updating metadata ...

 How many packages do you have installed? :-)


90 packages - so no more than most other devs I think.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] QuickCheck behaving strange

2009-07-24 Thread Miguel Mitrofanov
I've felt a bit stupid using instance Monoid ()... but it seemed quite  
natural.


On 24 Jul 2009, at 22:33, Jason Dagit wrote:




On Fri, Jul 24, 2009 at 11:29 AM, Felipe Lessa  
felipe.le...@gmail.com wrote:

On Fri, Jul 24, 2009 at 08:11:12PM +0200, Tobias Olausson wrote:
 prop_schedule :: Ord t = [Interval a t] - Bool
 prop_schedule []= True
 prop_schedule [a]   = True
 prop_schedule (x:y:ys)  = end x = begin y  prop_schedule (y:ys)
[..]
 How come QuickCheck passes 100 tests of random lists? One would  
think that
 at least one of the generated lists would be unsorted. It also  
passes

 1000 and even
 1 tests.

Probably it was defaulting to 'Interval () ()'.  Try to do

Cases like this make me feel as though the instance of Ord for ()  
was  a mistake.


Jason

___
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 on a VPS

2009-07-24 Thread Bit Connor
On Thu, Jul 23, 2009 at 6:12 PM, John Van Enkvane...@gmail.com wrote:
 No, I just want to know if there are any gotchas in the typical VPS
 setups that for some strange reason wouldn't like Haskell binaries. I
 couldn't think of any, but I miss details some times.

There used to be problems with ghci running under the virtualization
software Xen on x86_64 which is a common setup for VPS.

As far as I can tell these problems have been resolved.

http://hackage.haskell.org/trac/ghc/ticket/2512
http://hackage.haskell.org/trac/ghc/ticket/2063
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re:Haskell-Cafe Digest, Vol 71, Issue 30

2009-07-24 Thread Henk-Jan van Tuyl
On Tue, 21 Jul 2009 09:39:59 +0200, silent_stream silent_str...@126.com  
wrote:


When I compile curl-1.3.5 on Windows xp. I run the prompt runghc  
Setup.hs configure  I got the following error

Setup.hs: Missing dependency on a foreign library:
* Missing C library: curl
This problem can usually be solved by installing the system package that
provides this library (you may need the -dev version). If the library  
is
already installed but in a non-standard location then you can use the  
flags

--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
I don't know how to fix this problem. Who knows? Please come to help me .


This message means that the curl package depends on the curl package  
written in C;
to get the C curl package, go to http://curl.haxx.se/download.html and  
download the

proper package (for example
  http://curl.haxx.se/download/curl-7.19.5-win32-ssl-sspi.zip
) and unpack it into a directory with no space in the path name, e.g.:
  C:\temp\curl-7.19.5

If you do not have MingW/MSYS installed, do it now[1], you will need it for
other packages as well.

Open a DOS shell and go to the curl C package directory, give command:
  make
; it will take several minutes to build.
Copy the contents of directory
  C:\temp\curl-7.19.5\include\curl
to a directory where you collect .h files for linking, e.g.:
  C:\usr\local\include\curl
Copy the contents of directory
  C:\temp\curl-7.19.5\lib\.libs
to a directory where you collect library files for linking, e.g.:
  C:\usr\local\lib\curl

To let the compiler find the necessary files, set environment variables:
  set C_INCLUDE_PATH=C:\usr\local\include
  set LIBRARY_PATH=C:\usr\local\lib;C:\usr\local\lib\curl

Now you will be able to compile the Haskell curl package.


[1] http://www.haskell.org/haskellwiki/Windows#Tools_for_compilation


--
Met vriendelijke groet,
Henk-Jan van Tuyl


--
http://functor.bamikanarie.com
http://Van.Tuyl.eu/
--


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


Re: [Haskell-cafe] lifting restrictions on defining instances

2009-07-24 Thread wren ng thornton

David Menendez wrote:

wren ng thornton wrote:

John Lask wrote:

Can anyone explain the theoretical reason for this limitation, ie other
than it is a syntactical restriction, what would it take to lift this
restriction ?


There are a couple of theoretical concerns, mainly that full type-level
lambdas can lead down a rocky path (though simple combinators like `flip`
and `const` are fine, and that's all we'd need for most cases). But by and
large it's just a syntactic restriction.


I wouldn't say it's just a syntactic restriction. I'm pretty sure
unrestricted type lambdas are incompatible with Haskell's class
system. Otherwise, you might end up with Functor instances for /\b.
(a,b) and /\a. (a,b), at which point fmap (+1) (1,2) is ambiguous.


This is essentially the same problem as arises with overlapping 
instances. It is a new version of that problem since it introduces new 
places for overlapping (by highlighting the fact that instances on a 
*-* kind are actually instances on type-level lambdas), but the problem 
isn't exactly a new one. A tweak of the overlap detector should be able 
to catch these too; eta expand and check for overlap of the type-level 
terms. The definition of overlap is somewhat different since it must 
respect abstraction, but it's not too much different than the current 
version.


It is still possible to use type signatures to clear things up, albeit 
much uglier than usual. If we were to head down the road of type-level 
lambdas then we would want some mechanism for making it easier to deal 
with bifunctors like (,) and similar issues. The easiest thing, perhaps, 
would be to expose some of the explicit type passing that happens in the 
System F core[1], though we'd want to massage the dictionary-passing so 
that we could say things like (fmap @A) to mean the fmap of the instance 
for A.


So yes, implementing type-level lambdas is more than just changing the 
parser (so more than just syntax), but provided the right restrictions 
on what type-level lambdas are acceptable I don't think there are any 
substantial theoretical issues (so I'd say it's just syntax, rather than 
theoretical concerns). And these restrictions are the obvious ones, 
mainly blocking recursion to prevent the compiler from hanging or 
generating infinite types.




[1] In System F the capital-lambda binder is used for the term-level 
abstraction of passing type representations. So for example we have,


id :: forall a. a - a
id = /\a. \(x::a). x

Thus, the forall keyword is serving as the type-level abstraction. 
Perhaps this is suboptimal syntax, but it is the standard. We could, of 
course, have both a term-level /\ and a type-level /\ where the latter 
is the type of the former (since the namespaces are separate) though 
that's also dubious. Capital-pi is the canonical type-level abstraction, 
though that evokes the idea of dependent types which are much more complex.


--
Live well,
~wren
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANN: Leksah 0.6

2009-07-24 Thread Thomas DuBuisson
BTW, it works better when I don't give it a directory with numerous
branches of Xen and the Linux kernel - somewhat unfortunate that this
causes massive memory use.  Now to figure out how to get it to
properly configure/build projects!

Thomas

On Fri, Jul 24, 2009 at 11:44 AM, Thomas
DuBuissonthomas.dubuis...@gmail.com wrote:
 On Fri, Jul 24, 2009 at 11:08 AM, Don Stewartd...@galois.com wrote:
 thomas.dubuisson:
 Now updating metadata ...

 How many packages do you have installed? :-)


 90 packages - so no more than most other devs I think.

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


Re: [Haskell-cafe] ANN: Leksah 0.6

2009-07-24 Thread Don Stewart
Oh, so it is scanning all the files and not finalizing them?

thomas.dubuisson:
 BTW, it works better when I don't give it a directory with numerous
 branches of Xen and the Linux kernel - somewhat unfortunate that this
 causes massive memory use.  Now to figure out how to get it to
 properly configure/build projects!
 
 Thomas
 
 On Fri, Jul 24, 2009 at 11:44 AM, Thomas
 DuBuissonthomas.dubuis...@gmail.com wrote:
  On Fri, Jul 24, 2009 at 11:08 AM, Don Stewartd...@galois.com wrote:
  thomas.dubuisson:
  Now updating metadata ...
 
  How many packages do you have installed? :-)
 
 
  90 packages - so no more than most other devs I think.
 
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANN: Leksah 0.6

2009-07-24 Thread Thomas DuBuisson
Don Stewartd...@galois.com wrote:
 Oh, so it is scanning all the files and not finalizing them?

That's the implication, but I can't seem to trigger the case short of
[re]moving the .leksah directory and redoing the config that way...
when I do that...

A brief black-box view of it shows that it opens and closes all the
files quite quickly (observed via lsof) then the CPU is pegged for a
while (and I notice it's single threaded - any plans to process this
stuff in parallel?).  It remains pegged as the memory use gradually
climbs up in steps of ~ 6% it looks like.  Eventually I kill it before
it becomes all knowing and breaks into our nuclear command and control
under the name of 'SkyNet'.

Thomas


 thomas.dubuisson:
 BTW, it works better when I don't give it a directory with numerous
 branches of Xen and the Linux kernel - somewhat unfortunate that this
 causes massive memory use.  Now to figure out how to get it to
 properly configure/build projects!

 Thomas

 On Fri, Jul 24, 2009 at 11:44 AM, Thomas
 DuBuissonthomas.dubuis...@gmail.com wrote:
  On Fri, Jul 24, 2009 at 11:08 AM, Don Stewartd...@galois.com wrote:
  thomas.dubuisson:
  Now updating metadata ...
 
  How many packages do you have installed? :-)
 
 
  90 packages - so no more than most other devs I think.
 

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


Re: [Haskell-cafe] ANN: Leksah 0.6

2009-07-24 Thread Don Stewart
thomas.dubuisson:
 Don Stewartd...@galois.com wrote:
  Oh, so it is scanning all the files and not finalizing them?
 
 That's the implication, but I can't seem to trigger the case short of
 [re]moving the .leksah directory and redoing the config that way...
 when I do that...
 
 A brief black-box view of it shows that it opens and closes all the
 files quite quickly (observed via lsof) then the CPU is pegged for a
 while (and I notice it's single threaded - any plans to process this
 stuff in parallel?).  It remains pegged as the memory use gradually
 climbs up in steps of ~ 6% it looks like.  Eventually I kill it before
 it becomes all knowing and breaks into our nuclear command and control
 under the name of 'SkyNet'.

Yeah, I've had similar issues (but I have upwards of 500 packages installed).
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Curl error message

2009-07-24 Thread Henk-Jan van Tuyl
On Fri, 24 Jul 2009 21:16:15 +0200, Henk-Jan van Tuyl hjgt...@chello.nl  
wrote:


On Tue, 21 Jul 2009 09:39:59 +0200, silent_stream  
silent_str...@126.com wrote:


When I compile curl-1.3.5 on Windows xp. I run the prompt runghc  
Setup.hs configure  I got the following error

Setup.hs: Missing dependency on a foreign library:
* Missing C library: curl
This problem can usually be solved by installing the system package that
provides this library (you may need the -dev version). If the library  
is
already installed but in a non-standard location then you can use the  
flags

--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
I don't know how to fix this problem. Who knows? Please come to help me  
.


This message means that the curl package depends on the curl package  
written in C;
to get the C curl package, go to http://curl.haxx.se/download.html and  
download the

proper package (for example
   http://curl.haxx.se/download/curl-7.19.5-win32-ssl-sspi.zip
) and unpack it into a directory with no space in the path name, e.g.:
   C:\temp\curl-7.19.5

If you do not have MingW/MSYS installed, do it now[1], you will need it  
for

other packages as well.

Open a DOS shell and go to the curl C package directory, give command:
   make
; it will take several minutes to build.
Copy the contents of directory
   C:\temp\curl-7.19.5\include\curl
to a directory where you collect .h files for linking, e.g.:
   C:\usr\local\include\curl
Copy the contents of directory
   C:\temp\curl-7.19.5\lib\.libs
to a directory where you collect library files for linking, e.g.:
   C:\usr\local\lib\curl

To let the compiler find the necessary files, set environment variables:
   set C_INCLUDE_PATH=C:\usr\local\include
   set LIBRARY_PATH=C:\usr\local\lib;C:\usr\local\lib\curl

Now you will be able to compile the Haskell curl package.


[1] http://www.haskell.org/haskellwiki/Windows#Tools_for_compilation




The Haskell curl package must also be in a directory without spaces in the  
name; the script used for installation cannot handle spaces in path. After  
moving the package to C:\temp, the package installs.


--
Met vriendelijke groet,
Henk-Jan van Tuyl


--
http://functor.bamikanarie.com
http://Van.Tuyl.eu/
--


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


Re: [Haskell-cafe] generalize RecordPuns and RecordWildCards to work with qualified names?

2009-07-24 Thread Iavor Diatchki
Hello,
I think that Even refers to an example like this:

module A where
  data A = A { a :: Int }

The following works:

{-# LANGUAGE NamedFieldPuns #-}
module B where
  import A

  f (A { a }) = a


However, if we import A qualified, then punning does not seem to work:

{-# LANGUAGE NamedFieldPuns #-}
module B where
  import qualified A

  f (A.A { a }) = a

This results in: Not in scope: `a'



{-# LANGUAGE NamedFieldPuns #-}
module B where
  import qualified A

  f (A.A { A.a }) = a

This results in: Qualified variable in pattern: A.a

Even is suggesting that instead of reporting an error, in the second
case we could use the translation:

  f (A.A { A.a }) = a
--
  f (A.A { A.a = a })

(i.e., when punning occurs with a qualified name, use just the
unqualified part of the name in the pattern)

Hope that this helps,
-Iavor




On Thu, Jul 23, 2009 at 12:51 PM, Simon
Peyton-Jonessimo...@microsoft.com wrote:
 Can you give a concrete program to illustrate your point, please?  I'm not 
 getting it.

 Simon

 | -Original Message-
 | From: haskell-cafe-boun...@haskell.org 
 [mailto:haskell-cafe-boun...@haskell.org] On
 | Behalf Of Evan Laforge
 | Sent: 17 July 2009 23:57
 | To: haskell
 | Subject: [Haskell-cafe] generalize RecordPuns and RecordWildCards to work 
 with
 | qualified names?
 |
 | Record punning is not all that useful with qualified module names.  If
 | I write '(M.Record { M.rec_x })' it says  Qualified variable in
 | pattern and if I write '(M.Record { rec_x })' it says 'Not in scope:
 | `rec_x''.  Could it be this extension be further extended slightly so
 | that 'f (M.Record { M.rec_x })' will desugar to 'f (M.Record { M.rec_x
 | = rec_x })'?
 |
 | Similarly, RecordWildCards could support this too.
 |
 | It seems simple and useful to me... am I missing anything fatally
 | problematic about this?  Would anyone else use it?
 | ___
 | 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

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


Re: [Haskell-cafe] Haskell on a VPS

2009-07-24 Thread Jeremy Shaw
At Thu, 23 Jul 2009 10:53:40 -0400,
John Van Enk wrote:
 
 Has any one used a service similar to (or equivelant to) Slicehost or
 Linode to run Haskell network applications?

Ok, I discovered an issue with some VPSes. There are two
virtualization technologies in common use, OpenVZ and Xen. With Xen
you can have swap, but with OpenVZ you don't.

In my experience, apps compiled with GHC like to allocate a lot of
virtual memory that they don't really seem to use. With Xen that is
not a big deal, if you allocate memory, but don't actually use it,
that's ok, because in theory it could be swapped out if you actually
did use it.

But with OpenVZ, just allocating the memory counts against your memory
quota, even if you aren't actually using it for anything.

So, in practice, I think you will get a lot more milege out of your
VPS memory if you use Xen instead of OpenVZ, even if you never
*actually* swap to disk on the Xen platform.

There is some more information here:

http://hostingfu.com/article/xen-or-openvz

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


[Haskell-cafe] Re: System.Mem.performGC leaks?

2009-07-24 Thread Neal Alexander

Simon Marlow wrote:

On 23/07/2009 11:53, Simon Marlow wrote:

On 22/07/2009 02:51, Neal Alexander wrote:

Neal Alexander wrote:

Compiled with ghc -O2 -fvia-C -optc-O2 -funbox-strict-fields
-threaded btw.


GHC 6.10.3 on 64bit windows7.


Interesting. It's completely flat on Linux, but gobbles up about 1MB/s
on Windows. I'm investigating.


Found it - there was a CriticalSection being re-initialised at each GC.

Cheers,
Simon


Cool, thanks for checking it out.

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