[Haskell-cafe] ANN: hsbencher-1.1, with Fusion Table upload

2013-05-29 Thread Ryan Newton
I'm pleased to announce a new benchmarking framework, HSBencher.  It's an
early prototype, but it's flexible, extensible and uploads benchmark data
to Google Fusion Tables.

Right now the fusion table upload depends on a pre-release version of
"handa-gdata" (0.6.2), which you can get at one of these locations:
https://code.google.com/p/hgdata/
https://github.com/rrnewton/hgdata_mirror
(It should be released soon.)

Here's a blog post explaining HSBencher's usage:

http://parfunk.blogspot.com/2013/05/towards-cloud-based-crowd-sourced.html

Hackage:
http://hackage.haskell.org/package/hsbencher

Github (see README)
https://github.com/rrnewton/hsbencher
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] ANN: prelude-safeenum

2013-05-29 Thread wren ng thornton

-- prelude-safeenum 0.1.0


The prelude-safeenum package offers a safe alternative to the Prelude's
Enum class in order to render it safe. While we're at it, we also
generalize the notion of enumeration to support types which can only be
enumerated in one direction.



-- Description


The prelude-safeenum package offers an alternative to the notion of
enumeration provided by the Prelude. For now it is just a package, but the
eventual goal is to be incorporated into haskell prime. Some salient
characteristics of the new type-class hierarchy are:


* Removes partial functions:

The Haskell Language Report defines pred, succ, fromEnum, and toEnum
to be partial functions when the type is Bounded[1], but this is
unacceptable. The new classes remove this problem by correcting the
type signatures for these functions.


* Generalizes the notion of enumeration:

Rather than requiring that the type is linearly enumerable, we
distinguish between forward enumeration (which allows for multiple
predecessors) and backward enumeration (which allows for multiple
successors).


* Adds new functions: enumDownFrom, enumDownFromTo

One of the big problems with the partiality of pred is that there is
no safe way to enumerate downwards since in the border case
(enumFromThen x (pred x)) will throw an error rather than evaluating
to [x] as desired. These new functions remove this problem.


* Removes the requirement that the enumeration order coincides with the
Ord ordering (if one exists). Though, of course, it's advisable to keep
them in sync if possible, for your sanity.


* Ensures that the notion of enumeration is well-defined:

This much-needed rigor clarifies the meaning of enumeration. In
addition, it rules out instances for Float and Double which are highly
problematic and often confuse newcomers to Haskell. Unfortunately,
this rigor does render the instance for Ratio problematic. However,
Ratio instances /can/ be provided so long as the base type is
enumerable (and Integral, naturally); but they must be done in an
obscure order that does not coincide with Ord.


* The obscure order required for well-defined enumeration of Ratio is
provided.


[1]




-- Links


Homepage:
http://code.haskell.org/~wren/

Hackage:
http://hackage.haskell.org/package/prelude-safeenum

Darcs:
http://community.haskell.org/~wren/prelude-safeenum

Haddock (Darcs version):

http://community.haskell.org/~wren/prelude-safeenum/dist/doc/html/prelude-safeenum

-- 
Live well,
~wren


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


[Haskell-cafe] Ghent FPG meeting on 26 June, 2013

2013-05-29 Thread Jasper Van der Jeugt
Hello,

The "Functional Programming Group Ghent" (GhentFPG) [1] is a friendly group for
all people interested in functional programming, with a tendency
towards Haskell.
It is organised as part of Zeus WPI [2].

We are pleased to announce that we will hold a next meeting on Wednesday, 26th
of June, starting at 19h00! There will be three talks.

The main presentation, by Adam Bergmark from Silk [3] is about Fay [4]:

  Fay is a proper subset of Haskell that compiles to JavaScript. There is a
  compiler with the same name written in Haskell. Web browsers only speak
  JavaScript but more and more people find that they want to compile to
  JavaScript instead.

  Why do we want to compile Haskell to JavaScript, and what advantages does
  Fay have compared to other compilers?

  What are the challenges in compiling Haskell and supporting a language
  ecosystem, and how do we do it?

  What can Fay currently do, and what is planned for the future?

  This will be a broad overview about Fay for prospective users, followed by
  an in-depth look at interesting parts of the compiler internals.

Additionally, there will be two short talks by two students who did an
Msc. Thesis
about functional programming languages:

  "Genetic Algorithms in Haskell" by Matthias Delbar
  "Automatic Detection of Recursion Patterns" by Jasper Van der Jeugt

The meeting will take place in the Jozef Plateauzaal at the following address,

Faculteit Ingenieurswetenschappen
Universiteit Gent
Plateaustraat 22
9000 Gent

As mentioned above, we aim to start at 19:00. After the meeting we can go
for drinks in a nearby pub (this latter part is, of course, completely optional)

We hope to see you all there!

Regards,
On behalf of the GhentFPG organising committee.

[1]: http://groups.google.com/group/ghent-fpg
[2]: http://zeus.ugent.be/
[3]: http://www.silkapp.com/
[4]: http://www.fay-lang.org/

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


Re: [Haskell-cafe] [haskell.org Google Summer of Code 2013] Approved Projects

2013-05-29 Thread Carter Schonwald
Ooo. Thanks Jason.

That looks like a fleshed out version of the approach I was leaning towards
at least thinking about. I'll check it out when I have time in a few days.
On May 29, 2013 1:57 PM, "Jason Dagit"  wrote:

> On Wed, May 29, 2013 at 10:47 AM, Carter Schonwald
>  wrote:
> > indeed, i'm the principal mentor for this project, though as mentioned
> > Ian-Woo will hopefully be helping out too.
> >
> > I'm going to *help* focus the project on being a tool thats not focused
> on
> > QT, though if something nice can be worked out in that direction, great!
>
> Are you folks aware of the work on this topic by Tristan Ravitch?
> https://github.com/travitch/foreign-inference
>
> Jason
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] [haskell.org Google Summer of Code 2013] Approved Projects

2013-05-29 Thread Jason Dagit
On Wed, May 29, 2013 at 10:47 AM, Carter Schonwald
 wrote:
> indeed, i'm the principal mentor for this project, though as mentioned
> Ian-Woo will hopefully be helping out too.
>
> I'm going to *help* focus the project on being a tool thats not focused on
> QT, though if something nice can be worked out in that direction, great!

Are you folks aware of the work on this topic by Tristan Ravitch?
https://github.com/travitch/foreign-inference

Jason

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


Re: [Haskell-cafe] [haskell.org Google Summer of Code 2013] Approved Projects

2013-05-29 Thread Carter Schonwald
indeed, i'm the principal mentor for this project, though as mentioned
Ian-Woo will hopefully be helping out too.

I'm going to *help* focus the project on being a tool thats not focused on
QT, though if something nice can be worked out in that direction, great!

indeed, I suspect Edward, Ian-Woo and I will spend some small amount of
time at HackPhi trying to figure out some good avenues of attack to make
this a successful project that is used by the community and as actively
maintained.

cheers
-Carter


On Wed, May 29, 2013 at 12:55 PM, Edward Kmett  wrote:

> When submissions are put in, there is a way for mentors to talk to
> students to ask for more details. Those don't show up in the published
> abstract you can see at the end.
>
> The discussion shifted towards focusing on getting things to a point where
> Haskell can meaningfully use SWIG rather than on Qt per se but it is good
> to keep such a concrete goal in mind when working on something as abstract
> as SWIG.
>
> I agree that Qt has a somewhat horrible API. =)
>
> -Edward
>
>
> On Wed, May 29, 2013 at 12:34 PM, harry  wrote:
>
>> Edward Kmett  gmail.com> writes:
>>
>> > There should be a link from the google-melange website, but one slight
>> shift in focus is on either getting SWIG bindings or possibly even using
>> Ian-Woo Kim's C++FFI tools. Carter may be able to go into more detail.
>>
>> There's almost no information in the google project abstract. My concern
>> is
>> that the problem isn't generating the bindings (as I've said, that's been
>> done twice before). It's that Qt's slots-and-signals are horrible to use
>> from the Haskell side. If the student hasn't already got a good idea of
>> how
>> to solve this, I fear that this project will be just generate another
>> unusable set of bindings.
>>
>>
>> ___
>> 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.org Google Summer of Code 2013] Approved Projects

2013-05-29 Thread Edward Kmett
When submissions are put in, there is a way for mentors to talk to students
to ask for more details. Those don't show up in the published abstract you
can see at the end.

The discussion shifted towards focusing on getting things to a point where
Haskell can meaningfully use SWIG rather than on Qt per se but it is good
to keep such a concrete goal in mind when working on something as abstract
as SWIG.

I agree that Qt has a somewhat horrible API. =)

-Edward


On Wed, May 29, 2013 at 12:34 PM, harry  wrote:

> Edward Kmett  gmail.com> writes:
>
> > There should be a link from the google-melange website, but one slight
> shift in focus is on either getting SWIG bindings or possibly even using
> Ian-Woo Kim's C++FFI tools. Carter may be able to go into more detail.
>
> There's almost no information in the google project abstract. My concern is
> that the problem isn't generating the bindings (as I've said, that's been
> done twice before). It's that Qt's slots-and-signals are horrible to use
> from the Haskell side. If the student hasn't already got a good idea of how
> to solve this, I fear that this project will be just generate another
> unusable set of bindings.
>
>
> ___
> 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.org Google Summer of Code 2013] Approved Projects

2013-05-29 Thread harry
Edward Kmett  gmail.com> writes:

> There should be a link from the google-melange website, but one slight
shift in focus is on either getting SWIG bindings or possibly even using
Ian-Woo Kim's C++FFI tools. Carter may be able to go into more detail.

There's almost no information in the google project abstract. My concern is
that the problem isn't generating the bindings (as I've said, that's been
done twice before). It's that Qt's slots-and-signals are horrible to use
from the Haskell side. If the student hasn't already got a good idea of how
to solve this, I fear that this project will be just generate another
unusable set of bindings.


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


Re: [Haskell-cafe] [haskell.org Google Summer of Code 2013] Approved Projects

2013-05-29 Thread Tristan Ravitch
This one caught my attention as well.  I didn't see any contact
information for the participants (I didn't look too hard, I admit), but
I was wondering if they had considered basing their work off of Qt Smoke.
The smoke project (http://techbase.kde.org/Development/Languages/Smoke)
is used by a few other Qt bindings projects and provides some common
infrastructure and already went through the trouble of parsing all of the
headers in a qt-friendly way.  I think smoke would have the advantage of
sharing the burden with other language bindings (Ruby, C#, and perl, at
least).

Perhaps an argument could be made that requiring smoke might be painful,
but I imagine it could be tossed into a cabal package fairly easily.  I
started playing with generating Qt bindings for Haskell with smoke if
the GSoC project might find it useful:

  https://github.com/travitch/humidor

On Wed, May 29, 2013 at 11:51:57AM -0400, Edward Kmett wrote:
> There should be a link from the google-melange website, but one slight
> shift in focus is on either getting SWIG bindings or possibly even using
> Ian-Woo Kim's C++FFI tools. Carter may be able to go into more detail.
> 
> 
> On Wed, May 29, 2013 at 6:46 AM, harry  wrote:
> 
> > Edward Kmett  gmail.com> writes:
> >
> > > * Haskell Qt Binding Generator by Zhengliang Feng, mentored by Carter
> > Schonwald with help from Ian-Woo Kim
> >
> > Interesting, as this has been done at least twice before. Is there a public
> > write-up of what's going to be different this time?
> >
> >
> > ___
> > 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



pgpoxeI7JJ1Il.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] [haskell.org Google Summer of Code 2013] Approved Projects

2013-05-29 Thread Edward Kmett
There should be a link from the google-melange website, but one slight
shift in focus is on either getting SWIG bindings or possibly even using
Ian-Woo Kim's C++FFI tools. Carter may be able to go into more detail.


On Wed, May 29, 2013 at 6:46 AM, harry  wrote:

> Edward Kmett  gmail.com> writes:
>
> > * Haskell Qt Binding Generator by Zhengliang Feng, mentored by Carter
> Schonwald with help from Ian-Woo Kim
>
> Interesting, as this has been done at least twice before. Is there a public
> write-up of what's going to be different this time?
>
>
> ___
> 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] Lista dos aprovados em concurso Rodrigues Alves

2013-05-29 Thread Edson
Lista dos aprovados em concurso Rodrigues Alves:

Novo São Joaquim: ANA ANGELICA PEREIRA ALVES, LETICIA BAIRLE, FRANCISCO 
ANDERSON VALE DO NASCIMENTO, PAULO DE SIQUEIRA SILVA, JOÃO CARLOS MOREIRA DE 
CARVALHO, DAMIANA PEREIRA DE OLIVERIA, MARIA DO SOCORRO DE ALBURQUERQUE ARRUDA 
BARBOSA, JAIME CUSTODIO DA SILVA FILHO. SEBASTIANA MÁRCIA GOMES DE MELO, ÉRICA 
FRANCISCA BATISTA DE MELO, MAYRES RAQUEL DA SILVA PINHEIRO, JUCIMARA VICENTE 
DOS SANTOS, WEULLER TEIXEIRA DE MAGALHAES. Governador Nunes Freire.

Rodrigues Alves, ADISSON SOUZA TAVARES, JULIO CESAR DA SILVA MOURA FILHO, 
ERIDAN FERREIRA LEITE, MICHAEL LIMA SILVA, JOÃO CARLOS MOREIRA DE CARVALHO, 
CARLOS EDNAELTON DE MELO FERREIRA, MANOEL MARQUES DA CUNHA FILHO, IEDA BENTO 
BARROSO. ROBERTO FERREIRA LOPES FILHO, DOMINGOS SAVIO VIDAL DE LIMA FILHO, 
MARIANA ISABEL E SILVA, JOSE ALDER BRAGA JUNIOR, THAYS RAQUEL DA SILVA. Brás 
Pires. 

Morpará e ANNA JESSYCA ANDRADE LACERDA, LUCAS DE PAULA OLIVEIRA, GEORGE FACUNDO 
RICARDO, RAFAEL WESLEY MENESES MAIA, JOÃO CARLOS MOREIRA DE CARVALHO, DEBORAH 
LIMA BRAGA, MARIA MARIANA RIBEIRO VIEIRA, JOÃO VICTOR RODRIGUES DE C. MEDEIROS. 
TATIANA RODRIGUES DE CASTRO MELO, CAIO URBANO CAMURCA, MAIARA FRANKLIN DE 
AZEVEDO, IAGO TELES GARCIA, RITA PAULA SEVERO PATU. Hidrolândia.


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


Re: [Haskell-cafe] using a win32 dll (Happy too soon)

2013-05-29 Thread Brandon Allbery
On Wed, May 29, 2013 at 9:40 AM, Kees Bleijenberg <
k.bleijenb...@lijbrandt.nl> wrote:

> If I compile with ghc --make testGlasPng.hs –lglasPng I get: ….\ld.exe:
> cannot find –lglasPng. Collect 2: ld returned 1 exit status.
>
> **
>
> Ld can’t find lglasPng (with the l in front, does it trim the l?). Why?
> Okay I try
>

It's reproducing the thing passed to it, rather than outputting both the
dll and implib versions that it actually looks for. Same happens on
unixlikes where it's looking for a .so/.dylib/whatever or a .a.


>
> ghc --make testGlasPng.hs –L I get:
>

Not quite right; -L identifies a *directory* to search, then you must
specify the actual filename afterward.


> 
>
> testGlasPng.o: fake: (.text + 0x82) :undefined reference to
> ‘getPngVersion@0’. I think it has found  the
>

This just means it can't find the symbol; it does not mean it necessarily
found the DLL.


> I run ghc on a 64 bits computer. The dll is 32 bits. Is that the problem?
>

That can certainly be a problem, yes, and is likely why it wasn't found
with the first one. But it's not so much what kind of machine you are on,
as what kind of ghc you are using: a 64-bit ghc cannot link 32-bit
libraries, and vice versa. But a 32-bit ghc and toolchain will work fine on
a 64-bit system, aside from not linking 64-bit DLLs.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] using a win32 dll (Happy too soon)

2013-05-29 Thread Robert Jakob
> If I compile with ghc --make testGlasPng.hs -lglasPng I
> get: ..\ld.exe: cannot find -lglasPng. Collect 2: ld returned 1 exit
> status.
> 
> Ld can't find lglasPng (with the l in front, does it trim the l?).
> Why? Okay I try
> 
> ghc --make testGlasPng.hs -L I get:
> 
> testGlasPng.o: fake: (.text + 0x82) :undefined reference to
> 'getPngVersion@0'. I think it has found  the dll, but it complains the
> function is not in the dll. But TDump and Dll export viewer say
> getPngVersion is in the dll.

I think you should use both -L and -l.
ghc --make testGlasPng.hs -L/path/to/folder/where/glasPng/is -lglasPng

-L should point to the folder, NOT the dll itself.

Hope this helps.

R.

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


[Haskell-cafe] using a win32 dll (Happy too soon)

2013-05-29 Thread Kees Bleijenberg
Unfortunatly the proposed solutions didn't work after all (It worked once, I
think, but.)

 

Here again the problem:

glasPng.dll is a Delphi dll with the function getPngVersion in it. Calling
convention  is stdCall. I want to use this dll. The code:

{-# LANGUAGE ForeignFunctionInterface #-}

module Main(

  main

)

 

where

import Control.Monad

import Foreign.C

import Foreign.Marshal.Alloc

import Foreign.Marshal.Array

import System.Win32.Types

 

foreign import stdcall "getPngVersion"  getPngDllVersion :: IO CString

 

main :: IO ()

main = do

 s <- getPngDllVersion

 putStrLn (show s)

 

glasPng.dll is in the Windows path (I've checked it). 

If I compile with ghc --make testGlasPng.hs -lglasPng I get: ..\ld.exe:
cannot find -lglasPng. Collect 2: ld returned 1 exit status.

Ld can't find lglasPng (with the l in front, does it trim the l?). Why? Okay
I try

ghc --make testGlasPng.hs -L I get:

testGlasPng.o: fake: (.text + 0x82) :undefined reference to
'getPngVersion@0'. I think it has found  the dll, but it complains the
function is not in the dll. But TDump and Dll export viewer say
getPngVersion is in the dll.

 

I run ghc on a 64 bits computer. The dll is 32 bits. Is that the problem?

 

What can I do?

Kees

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


Re: [Haskell-cafe] using a win32 dll

2013-05-29 Thread Kees Bleijenberg
Thank you Krzystof! This did the trick. Now I also have a better understanding 
what is going on. Great.

 

Kees

 

Van: Krzysztof Skrzętnicki [mailto:gte...@gmail.com] 
Verzonden: woensdag 29 mei 2013 11:58
Aan: Kees Bleijenberg
Onderwerp: Re: [Haskell-cafe] using a win32 dll

 

Oh, I didn't mean kernel32. And -L provides search path not the actual library. 
The idea was to use -l , so it would be -lpngDLL.dll, provided 
it is in library search path. If not use -Ldirectory-with-dll -lpngDLL.dll  

 

On Wed, May 29, 2013 at 11:49 AM, Kees Bleijenberg  
wrote:

I’ve tried to compile it with –l kernel32, but  nothing changed. I’ve also 
tried  -LpngDll.dll but that didn’t work either.

Kees


My first guess would be missing -l parameter. The examples you have linked read:
ghc --make compname.hs -lkernel32

Best regards,
Krzysztof Skrzętnicki

On Wed, May 29, 2013 at 9:13 AM, Kees Bleijenberg  
wrote:
I made a Delphi dll (32 bits windows). This dll exports a function named 
getPngVersion. This is a function with no arguments that returns a pointer to a 
array of chars.
If I examine the dll with a tools like tdump, I can see the function 
getPngVersion on index 1.
Now I want to use this dll in Haskell:

{-# LANGUAGE ForeignFunctionInterface #-}
module Main(
  main
)

where
import Control.Monad
import Foreign.C
import Foreign.Marshal.Alloc
import Foreign.Marshal.Array
import System.Win32.Types

foreign import stdcall "glasPng getPngVersion"  getPngDllVersion :: IO CString

main :: IO ()
main = do
 s <- getPngDllVersion
 putStrLn (show s)

Compiling this with ghc --make glasPng.hs gives:
GlasPng.o: fake: (.text +0x82): undefined reference to  ‘getPngVersion@0’ 
collect2 : Id returned 1 exit status

I wonder what went wrong. In the foreign import line I use “glasPng…. “ to tell 
ghc, it has to searh in glasPng.dll (changing glasPng to glasPng.dll doesn’t 
help). I’ve changed the name of the function in  the dll to getPngVersion@0 but 
no luck.  I’ve read and tested the last example at 
http://stackoverflow.com/questions/1027246/haskell-foreign-import-stdcall-on-dll-function
  (win32_getComputername,  this works!). I wonder how  haskell knows which dll 
to use in this example?)
Probably I’am doing something wrong with the way I tell ghc which dll to link 
or….

Any ideas?

Kees

___
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] Install wx on Windows XP

2013-05-29 Thread harry
On Tue, 26 Mar 2013 08:58:18 +0100, Eric Wong  wrote:

> The best way to do this, is to download from
>https://github.com/atzedijkstra/wxHaskell
> . (This is the most up to date repository online.) Then replace the  
> wxcore\Setup.hs file with the one attached to this e-mail (this has not  
> been tested on non-Windows platforms). Install all wxHaskell packages from  
> this repository, in the following order:
>wxdirect
>wxc
>wxcore
>wx

I tried that on the latest HP, and it insisted on downloading the old
version of wxdirect to sovle some dependency in wxcore, then rebuild wxc
against it, and got back to the old problems.

Is there going to be a new release on hackage with the fixes?


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


Re: [Haskell-cafe] [haskell.org Google Summer of Code 2013] Approved Projects

2013-05-29 Thread harry
Edward Kmett  gmail.com> writes:

> * Haskell Qt Binding Generator by Zhengliang Feng, mentored by Carter
Schonwald with help from Ian-Woo Kim

Interesting, as this has been done at least twice before. Is there a public
write-up of what's going to be different this time?


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


Re: [Haskell-cafe] using a win32 dll

2013-05-29 Thread Kees Bleijenberg
> On Wed, 29 May 2013 09:13:09 +0200
> "Kees Bleijenberg"  wrote:

> > I made a Delphi dll (32 bits windows). This dll exports a function
> > named getPngVersion. This is a function with no arguments that
> > returns a pointer to a array of chars.

> Did you annotate the exported function with stdcall? The calling
> conventions of Delphi are different to that of C. I had problems with
> that sometimes (not with Haskell, but with C)


Thanks for your answer.
Yes, I did set the calling convention to stdcall for that function in the
dll. I think, setting the calling convention wrong, leads to runtime
problems. This is a link/compile problem.

Kees


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


Re: [Haskell-cafe] mapFst and mapSnd

2013-05-29 Thread Carlo Hamalainen
On Tue, May 28, 2013 at 7:46 PM, Dominique Devriese <
dominique.devri...@cs.kuleuven.be> wrote:

> 2013/5/28 Tikhon Jelvis :
> > These are present in Control.Arrow as (***), first and second
> respectively.
>
> Right, thanks. Strange that neither Hayoo nor Hoogle turned these up..
>

HLint suggested Control.Arrow.&&& and Control.Arrow.first to me the other
day:

$ hlint Checker.hs
Checker.hs:65:5: Warning: Reduce duplication
Found:
  topdir <- ask
  md5file <- computeChecksumFilename f
  hasChecksum <- liftM not $ isChecksumMissing f
Why not:
  Combine with Checker.hs:81:5

Checker.hs:127:96: Warning: Use &&&
Found:
  \ x -> (s3Path x, s3Md5sum x)
Why not:
  s3Path Control.Arrow.&&& s3Md5sum

Checker.hs:153:42: Warning: Use first
Found:
  \ (x, y) -> (trimPathPrefix path x, y)
Why not:
  Control.Arrow.first (trimPathPrefix path)

3 suggestions


Some people that I know have HLint incorporated into their vim sessions, I
think using Syntastic.

Cheers,

-- 
Carlo Hamalainen
http://carlo-hamalainen.net
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] using a win32 dll

2013-05-29 Thread Krzysztof Skrzętnicki
My first guess would be missing -l parameter. The examples you have linked
read:

ghc --make compname.hs -lkernel32


Best regards,
Krzysztof Skrzętnicki

On Wed, May 29, 2013 at 9:13 AM, Kees Bleijenberg <
k.bleijenb...@lijbrandt.nl> wrote:

> I made a Delphi dll (32 bits windows). This dll exports a function named
> getPngVersion. This is a function with no arguments that returns a pointer
> to a array of chars.
>
> If I examine the dll with a tools like tdump, I can see the function
> getPngVersion on index 1.
>
> Now I want to use this dll in Haskell:
>
> ** **
>
> {-# LANGUAGE ForeignFunctionInterface #-}
>
> module Main(
>
> main
>
> )
>
> ** **
>
> where
>
> import Control.Monad
>
> import Foreign.C
>
> import Foreign.Marshal.Alloc
>
> import Foreign.Marshal.Array
>
> import System.Win32.Types
>
> ** **
>
> foreign import stdcall "glasPng getPngVersion"  getPngDllVersion :: IO
> CString
>
> ** **
>
> main :: IO ()
>
> main = do 
>
>  s <- getPngDllVersion
>
>  putStrLn (show s)
>
> ** **
>
> Compiling this with ghc --make glasPng.hs gives:
>
> GlasPng.o: fake: (.text +0x82): undefined reference to  ‘getPngVersion@0’
> collect2 : Id returned 1 exit status 
>
> ** **
>
> I wonder what went wrong. In the foreign import line I use “glasPng…. “ to
> tell ghc, it has to searh in glasPng.dll (changing glasPng to glasPng.dll
> doesn’t help). I’ve changed the name of the function in  the dll to
> getPngVersion@0 but no luck.  I’ve read and tested the last example at
> http://stackoverflow.com/questions/1027246/haskell-foreign-import-stdcall-on-dll-function
> (win32_getComputername,  this works!). I wonder how  haskell knows which
> dll to use in this example?)
>
> Probably I’am doing something wrong with the way I tell ghc which dll to
> link or….
>
> ** **
>
> Any ideas?
>
> ** **
>
> Kees
>
> ___
> 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] using a win32 dll

2013-05-29 Thread Robert Jakob
On Wed, 29 May 2013 09:13:09 +0200
"Kees Bleijenberg"  wrote:

> I made a Delphi dll (32 bits windows). This dll exports a function
> named getPngVersion. This is a function with no arguments that
> returns a pointer to a array of chars.
Did you annotate the exported function with stdcall? The calling
conventions of Delphi are different to that of C. I had problems with
that sometimes (not with Haskell, but with C)


R.

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


[Haskell-cafe] using a win32 dll

2013-05-29 Thread Kees Bleijenberg
I made a Delphi dll (32 bits windows). This dll exports a function named
getPngVersion. This is a function with no arguments that returns a pointer
to a array of chars.

If I examine the dll with a tools like tdump, I can see the function
getPngVersion on index 1.

Now I want to use this dll in Haskell:

 

{-# LANGUAGE ForeignFunctionInterface #-}

module Main(

main

)

 

where

import Control.Monad

import Foreign.C

import Foreign.Marshal.Alloc

import Foreign.Marshal.Array

import System.Win32.Types

 

foreign import stdcall "glasPng getPngVersion"  getPngDllVersion :: IO
CString

 

main :: IO ()

main = do 

 s <- getPngDllVersion

 putStrLn (show s)

 

Compiling this with ghc --make glasPng.hs gives:

GlasPng.o: fake: (.text +0x82): undefined reference to  'getPngVersion@0'
collect2 : Id returned 1 exit status 

 

I wonder what went wrong. In the foreign import line I use "glasPng.. " to
tell ghc, it has to searh in glasPng.dll (changing glasPng to glasPng.dll
doesn't help). I've changed the name of the function in  the dll to
getPngVersion@0 but no luck.  I've read and tested the last example at
http://stackoverflow.com/questions/1027246/haskell-foreign-import-stdcall-on
-dll-function  (win32_getComputername,  this works!). I wonder how  haskell
knows which dll to use in this example?)

Probably I'am doing something wrong with the way I tell ghc which dll to
link or..

 

Any ideas?

 

Kees

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