Re: [Haskell-cafe] ghc 7.2.1 and super simple DPH

2011-10-03 Thread Erik de Castro Lopo
Peter Braam wrote: Hi - I'm trying to compile DotP.hs from http://www.haskell.org/haskellwiki/GHC/Data_Parallel_Haskell#A_simple_example (see below) The compiler complains and says (twice in fact): DotP.hs:17:33: Not in scope: `fromPArrayP' Could someone help me out please?

Re: [Haskell-cafe] Is it possible to represent such polymorphism?

2011-10-03 Thread sdiyazg
Quoting Richard O'Keefe o...@cs.otago.ac.nz: On 3/10/2011, at 7:15 AM, Du Xi wrote: I guess this is what I want, thank you all. Although I still wonder why something so simple in C++ is actually more verbose and requires less known features in Haskell...What was the design intent to

Re: [Haskell-cafe] ghc 7.2.1 and super simple DPH

2011-10-03 Thread Erik de Castro Lopo
Erik de Castro Lopo wrote: The code you posted had some wrapping issues and was missing an import. I should have also mentioned how I figured out what the missing import was. Firstly, I tried hoogle [0] but couldn't find it. I then realised that it must be part of DPH and that I had a copy of

Re: [Haskell-cafe] How to compile this example code?

2011-10-03 Thread Roel van Dijk
{- forgot to reply to list -} This isn't Haskell syntax. Atleast not directly. It is either hsc2hs[1] or c2hs [2]. Also see [3] for the difference between the two. Soin order to compile that code you first have to run it through aspecial preprocessor. 1 -

Re: [Haskell-cafe] Is it possible to represent such polymorphism?

2011-10-03 Thread Malcolm Wallace
Although I still wonder why something so simple in C++ is actually more verbose and requires less known features in Haskell...What was the design intent to disallow simple overloading? The simple C++ overloading you want to add to Haskell, is in fact rather semantically complex, and it

Re: [Haskell-cafe] Is it possible to represent such polymorphism?

2011-10-03 Thread sdiyazg
Quoting Felipe Almeida Lessa felipe.le...@gmail.com: On Sun, Oct 2, 2011 at 4:26 PM, Edward Z. Yang ezy...@mit.edu wrote: What are you actually trying to do? This seems like a rather unusual function. If you're new to the language, most likely you're doing something wrong if you need this

Re: [Haskell-cafe] Is it possible to represent such polymorphism?

2011-10-03 Thread sdiyazg
Quoting Andrew Coppin andrewcop...@btinternet.com: On 02/10/2011 07:15 PM, Du Xi wrote: In C++, the code is inferred from the types. (I.e., if a function is overloaded, the correct implementation is selected depending on the types of the arguments.) In Haskell, the types are inferred from the

Re: [Haskell-cafe] Is it possible to represent such polymorphism?

2011-10-03 Thread Ketil Malde
sdiy...@sjtu.edu.cn writes: This has nothing to do with OOP or being imperative. It's just about types. Of course, it's not necessarily linked to OOP, but OO languages - to the extent they have types - tend towards ad-hoc polymorphism instead of parametric polymorphism. There are different

[Haskell-cafe] ANN: OpenCL 1.0.1.3 package

2011-10-03 Thread Luis Cabellos
Hello, all. I want to show you the OpenCL package. I have done this using Jeff Heard OpenCLRaw package, but I create a new one due the lack of updates of the former. # Where to get it * Hackage page (http://hackage.haskell.org/package/OpenCL) * Repository (https://github.com/zhensydow/opencl) *

Re: [Haskell-cafe] ghc 7.2.1 and super simple DPH

2011-10-03 Thread Peter Braam
Super helpful, thanks! Peter On Mon, Oct 3, 2011 at 12:54 AM, Erik de Castro Lopo mle...@mega-nerd.comwrote: Erik de Castro Lopo wrote: The code you posted had some wrapping issues and was missing an import. I should have also mentioned how I figured out what the missing import was.

[Haskell-cafe] HEADS-UP: security fix, please upgrade clientsession to = 0.7.3.1

2011-10-03 Thread Felipe Almeida Lessa
Hello! Please be advised that clientsession 0.7.3.1 is vulnerable to timing attacks [1]. We have just released a fix and it's already on Hackage [2]. We advise all users of clientsession (and, consequently, Yesod) to upgrade as soon as possible to a version = 0.7.3.1. With a timing attack a

Re: [Haskell-cafe] haskell i18n best practices

2011-10-03 Thread Yitzchak Gale
Thanks for all the great information provided in this thread. The wiki page that Paulo originally linked had Vasyl's fantastic documentation for using his hgettext package, but it did not mention any of the other methods we discussed. I moved the gettext documentation to its own linked page and

Re: [Haskell-cafe] HEADS-UP: security fix, please upgrade clientsession to = 0.7.3.1

2011-10-03 Thread Felipe Almeida Lessa
On Mon, Oct 3, 2011 at 10:01 AM, Felipe Almeida Lessa felipe.le...@gmail.com wrote: With a timing attack a malicious user may be able to construct a valid MAC for his message.  However, the attacker is not able to recover the MAC key or the encryption key.  So you don't need to change your

Re: [Haskell-cafe] haskell i18n best practices

2011-10-03 Thread Felipe Almeida Lessa
On Mon, Oct 3, 2011 at 10:05 AM, Yitzchak Gale g...@sefer.org wrote: Felipe, I put your wonderful example on its own linked page. Thanks, I'm always lazy with wikis =). I've corrected a few typos I've made on my e-mail there. Cheers, -- Felipe.

Re: [Haskell-cafe] How to compile this example code?

2011-10-03 Thread Magicloud Magiclouds
On Mon, Oct 3, 2011 at 3:50 PM, Roel van Dijk vandijk.r...@gmail.com wrote: {- forgot to reply to list -} This isn't Haskell syntax. Atleast not directly. It is either hsc2hs[1] or c2hs [2]. Also see [3] for the difference between the two. Soin order to compile that code you first have to run

[Haskell-cafe] Problem on using class as type.

2011-10-03 Thread Magicloud Magiclouds
Hi, I have a function: post :: (ToJson p, FromJson q) = String - String - String - Map.Map String p - IO q Now I'd like to call it like: r - post site token user.addMedia (Map.fromList [ (users, users :: ToJson) , (medias, medias :: ToJson) ])

Re: [Haskell-cafe] Problem on using class as type.

2011-10-03 Thread Jesse Schalken
What about users :: ToJson a = a? On Tue, Oct 4, 2011 at 12:42 AM, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Hi, I have a function: post :: (ToJson p, FromJson q) = String - String - String - Map.Map String p - IO q Now I'd like to call it like: r - post site token

Re: [Haskell-cafe] Problem on using class as type.

2011-10-03 Thread Brent Yorgey
On Mon, Oct 03, 2011 at 09:42:59PM +0800, Magicloud Magiclouds wrote: Hi, I have a function: post :: (ToJson p, FromJson q) = String - String - String - Map.Map String p - IO q Now I'd like to call it like: r - post site token user.addMedia (Map.fromList [ (users, users :: ToJson)

Re: [Haskell-cafe] Problem on using class as type.

2011-10-03 Thread Steffen Schuldenzucker
On 10/03/2011 10:42 PM, Magicloud Magiclouds wrote: Hi, I have a function: post :: (ToJson p, FromJson q) = String - String - String - Map.Map String p - IO q Now I'd like to call it like: r- post site token user.addMedia (Map.fromList [ (users, users :: ToJson)

[Haskell-cafe] ghc with -fPIC support

2011-10-03 Thread Phyx
Hi All, I'm trying to install GHC with -fPIC support in Fedora. I've grabbed a source tarball since it seems no binary one has this. In Build.mk i've changed the quick build type to ifeq $(BuildFlavour) quick SRC_HC_OPTS= -H64m -O0 -fasm -fPIC GhcStage1HcOpts= -O -fasm -fPIC

Re: [Haskell-cafe] ANN: OpenCL 1.0.1.3 package

2011-10-03 Thread Jason Dagit
On Mon, Oct 3, 2011 at 9:04 AM, Jason Dagit dag...@gmail.com wrote: We could have a different version of the function for each return type, clGetDeviceInfo_FPConfig, clGetDeviceInfo_AddressBits, etc. It's a great naming convention but it has the property that someone searching the bindings or

Re: [Haskell-cafe] ANN: OpenCL 1.0.1.3 package

2011-10-03 Thread Jason Dagit
On Mon, Oct 3, 2011 at 3:56 AM, Luis Cabellos cabel...@ifca.unican.es wrote: Hello, all. I want to show you the OpenCL package. I have done this using Jeff Heard OpenCLRaw package, but I create a new one due the lack of updates of the former. # Where to get it * Hackage page

Re: [Haskell-cafe] Installing hledger-web

2011-10-03 Thread Simon Michael
On 10/2/11 10:12 AM, Arnaud Bailly wrote: No problem ! BTW, have you ever thought of coupling hledger with git for saving a ledger ? There is ongoing work to provide a native git interface. Yes, Clint Adams has begun adapting it to use the filestore (rcs abstraction layer) lib, and this is a

[Haskell-cafe] Trying to experiment with tangible values using GuiTV

2011-10-03 Thread Martin Baldan
Hello all, I'm very new to Haskell, but still I'd like to play with tangible values, which I find really intriguing. After getting some kind help in haskell-beginners, I managed to compile and run a small example. Which is as follows: -- {-# LANGUAGE OverlappingInstances,

[Haskell-cafe] Composing a list of Enumeratees into an Enumerator using ($=)

2011-10-03 Thread Román González
Hey guys, Right now I'm facing with a type problem that is really nasty, I want to compose a list of enumeratees using the ($=) operator to create a new enumerator. Whenever I'm trying to use the foldx function in conjunction with ($=) I get this error: * :t foldr ($=)* interactive:1:7:

Re: [Haskell-cafe] Composing a list of Enumeratees into an Enumerator using ($=)

2011-10-03 Thread Conrad Parker
2011/10/4 Román González romanand...@gmail.com: Hey guys, Right now I'm facing with a type problem that is really nasty, I want to compose a list of enumeratees using the ($=) operator to create a new enumerator.  Whenever I'm trying to use the foldx function in conjunction with ($=) I get

Re: [Haskell-cafe] Installing hledger-web

2011-10-03 Thread Arnaud Bailly
Being a long time user of ledger though and a long time haskell fan, I would be more than happy to lend a hand but my free time is short. I will try to have a look to the sources and see if I can find opportunities to help. Regards, Arnaud On Mon, Oct 3, 2011 at 8:27 PM, Simon Michael

Re: [Haskell-cafe] CAL or Frege as a Haskell replacement on JVM?

2011-10-03 Thread Tom Davies
Hi Karel, I'm a (the? ;-) very keen user of CAL (ex user at the moment, as work and family doesn't leave me enough time for side projects). Pro: - Very solid and high quality, practically bug-free in my experience. - Performs some useful optimisations (self tail recursion as iteration,