[Haskell-cafe] Beginners Question: Problem with Data Type Declaration

2011-06-16 Thread kaffeepause73
I try to create an own data type containing Vector Double from the H-Matrix package. The code: ## data PowerSig = PowerSig Int Double Vector Double main = do let p5 = PowerSig 1 0.1 (fromList [1,2,3]) ## When compiling with ghci, I get however the following message: `Vector' is not

Re: [Haskell-cafe] Beginners Question: Problem with Data Type Declaration

2011-06-16 Thread Johan Tibell
Hi, On Thu, Jun 16, 2011 at 9:53 AM, kaffeepause73 kaffeepaus...@yahoo.de wrote: I try to create an own data type containing Vector Double from the H-Matrix package. The code: ## data PowerSig = PowerSig Int Double Vector Double You need to put parenthesis around (Vector Double). Otherwise

Re: [Haskell-cafe] Best platform for development with GHC?

2011-06-16 Thread Ketil Malde
Dmitri O.Kondratiev doko...@gmail.com writes: Let me know if you would like opinions on Emacs vs vi! I know vi, but it is just that I got used to Emacs which is my main IDE for most PL that I work with and for many years already ) No, no! Stop, it was just a joke, really. I regret it

Re: [Haskell-cafe] Best platform for development with GHC?

2011-06-16 Thread Ketil Malde
John D. Ramsdell ramsde...@gmail.com writes: Developers should be using older versions of GHC because they cannot be sure users will have an up-to-date GHC. I wonder, how hard would it be to have, say Amazon images of various Linux distributions with ghc and cabal-install available?

Re: [Haskell-cafe] Beginners Question: Problem with Data Type Declaration

2011-06-16 Thread kaffeepause73
Hi Johan, actually quite obvious. Code works now, many thanks. :-) import Data.Packed.Vector data PowerSig = PowerSig Int Double (Vector Double) -- signal Index timeStep data instance Show PowerSig where show (PowerSig idx dt vector) = PowerSignal Nr: ++ show idx ++ dt: ++ show dt

[Haskell-cafe] Win32: cabal install --prefix=$HOME --user ?

2011-06-16 Thread Dmitri O.Kondratiev
On win32 cabal install --prefix=$HOME --user fails: cabal install --prefix=$HOME --user Resolving dependencies... Configuring split-0.1.4... cabal: expected an absolute directory name for --prefix: $HOME cabal: Error: some packages failed to install: split-0.1.4 failed during the configure step.

[Haskell-cafe] Build failure on Hackage, missing syb

2011-06-16 Thread José Pedro Magalhães
Hi all, What causes the following build failure on Hackage? *** setup configure Configuring instant-generics-0.3.2... cabal-setup: At least the following dependencies are missing: syb 0.4 This is in package

Re: [Haskell-cafe] Parsing Haskell in Parsec

2011-06-16 Thread Johannes Waldmann
You may browse my source code (quite unpolished) ... updated locations: http://dfa.imn.htwk-leipzig.de/cgi-bin/gitweb.cgi?p=ws10-cb.git;a=summary git clone git://dfa.imn.htwk-leipzig.de/srv/git/ws10-cb ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Best platform for development with GHC?

2011-06-16 Thread cheater cheater
Hi, let me chime in as someone who wanted to deploy a Haskell app on a fairly popular hosting environment (Slicehost). The support of GHC on the Ubuntu server front is tragic - there's no official Haskell Platform for the currently suggested server version of Ubuntu, which is Ubuntu 10.04 LTS

[Haskell-cafe] Data Type Inheritance ala OO - Inheritence -- howto best in Haskell ?

2011-06-16 Thread kaffeepause73
Dear all, I'm created a timeSignal datatype as container around a Vector Double data type (see simple code below) and subsequently started to instanciate Num Eq to be able to perform operations on it. Additionally I want store ifno like an index, time information and eventually an inheritence

[Haskell-cafe] Data.Map: Values to keys and keys to values

2011-06-16 Thread Dmitri O.Kondratiev
Hi, Data.Map has many great functions, yet I could not find the one that allows from one map create another map where keys are values and values are keys of the first one. Something like: transMap:: (Ord k, Ord a) = Map k a - Map a k Does such function exist? Thanks!

Re: [Haskell-cafe] Data.Map: Values to keys and keys to values

2011-06-16 Thread Johan Tibell
On Thu, Jun 16, 2011 at 3:01 PM, Dmitri O.Kondratiev doko...@gmail.com wrote: Hi, Data.Map has many great functions, yet I could not find the one that allows from one map create another map where keys are values and values are keys of the first one. Something like: transMap:: (Ord k, Ord a)

Re: [Haskell-cafe] Data.Map: Values to keys and keys to values

2011-06-16 Thread Daniel Peebles
Why not make it unlossy and have: trans :: (Ord k, Ord a) = Map k a - Map a (Set k) On Thu, Jun 16, 2011 at 9:10 AM, Johan Tibell johan.tib...@gmail.comwrote: On Thu, Jun 16, 2011 at 3:01 PM, Dmitri O.Kondratiev doko...@gmail.com wrote: Hi, Data.Map has many great functions, yet I could

Re: [Haskell-cafe] Data.Map: Values to keys and keys to values

2011-06-16 Thread Francesco Mazzoli
On 16/06/11 15:01, Dmitri O.Kondratiev wrote: Hi, Data.Map has many great functions, yet I could not find the one that allows from one map create another map where keys are values and values are keys of the first one. Something like: transMap:: (Ord k, Ord a) = Map k a - Map a k Does such

Re: [Haskell-cafe] Data.Map: Values to keys and keys to values

2011-06-16 Thread Johan Tibell
On Thu, Jun 16, 2011 at 3:01 PM, Dmitri O.Kondratiev doko...@gmail.com wrote: Hi, Data.Map has many great functions, yet I could not find the one that allows from one map create another map where keys are values and values are keys of the first one. Something like: transMap:: (Ord k, Ord a)

Re: [Haskell-cafe] Data.Map: Values to keys and keys to values

2011-06-16 Thread Dmitri O.Kondratiev
On Thu, Jun 16, 2011 at 5:38 PM, Johan Tibell johan.tib...@gmail.comwrote: On Thu, Jun 16, 2011 at 3:01 PM, Dmitri O.Kondratiev doko...@gmail.com wrote: Hi, Data.Map has many great functions, yet I could not find the one that allows from one map create another map where keys are values

Re: [Haskell-cafe] Win32: cabal install --prefix=$HOME --user ?

2011-06-16 Thread Ryan Yates
There is a nice table in the cabal docs that explains how prefix gets used: http://www.haskell.org/ghc/docs/7.0.4/html/Cabal/builders.html#simple-paths For Vista and above C:\Documents and settings\myusername\ is C:\Users\myusername. The equivalent to $HOME on Windows would be $USERPROFILE but

Re: [Haskell-cafe] Win32: cabal install --prefix=$HOME --user ?

2011-06-16 Thread Dmitri O.Kondratiev
On Thu, Jun 16, 2011 at 6:18 PM, Ryan Yates fryguy...@gmail.com wrote: There is a nice table in the cabal docs that explains how prefix gets used: http://www.haskell.org/ghc/docs/7.0.4/html/Cabal/builders.html#simple-paths For Vista and above C:\Documents and settings\myusername\ is

Re: [Haskell-cafe] Win32: cabal install --prefix=$HOME --user ?

2011-06-16 Thread Ryan Yates
I never set the prefix manually and just use the default. The default for Windows is $APPDATA/Cabal. Where that ends up depends on your version of Windows. On Windows --user is also the default. On Thu, Jun 16, 2011 at 10:47 AM, Dmitri O.Kondratiev doko...@gmail.com wrote: On Thu, Jun 16,

Re: [Haskell-cafe] Data Type Inheritance ala OO - Inheritence -- howto best in Haskell ?

2011-06-16 Thread David Barbour
Look into Oleg's HList (heterogeneous list) and OOHaskell http://homepages.cwi.nl/~ralf/HList/ http://homepages.cwi.nl/~ralf/OOHaskell/ On Thu, Jun 16, 2011 at 5:08 AM, kaffeepause73 kaffeepaus...@yahoo.dewrote: Dear all, I'm created a timeSignal datatype as container around a Vector Double

Re: [Haskell-cafe] Data.Map: Values to keys and keys to values

2011-06-16 Thread Brent Yorgey
On Thu, Jun 16, 2011 at 04:17:55PM +0200, Francesco Mazzoli wrote: On 16/06/11 15:01, Dmitri O.Kondratiev wrote: Hi, Data.Map has many great functions, yet I could not find the one that allows from one map create another map where keys are values and values are keys of the first one.

[Haskell-cafe] Haskell Parallel Digest 3

2011-06-16 Thread Nicolas Wu
Parallel Haskell Digest === Edition 3 2011-06-16 http://www.well-typed.com/blog/55 Hello Haskellers! Welcome to the third edition of the Parallel Haskell Digest, bringing you news, discussions and tasters of parallelism and concurrency in Haskell. The digest is made possible

Re: [Haskell-cafe] Acquiring a random set of a specific size (w/o dups) from a range of Ints

2011-06-16 Thread michael rice
I seem to still be missing some things. I found mt19937 in GSL.Random.Gen, but there are two evalMCs, one in Control.Monad.MC and another in Control.Monad.MC.GSL. Which? Michael - Registering monte-carlo-0.4.1...Installing library in

Re: [Haskell-cafe] Acquiring a random set of a specific size (w/o dups) from a range of Ints

2011-06-16 Thread Felipe Almeida Lessa
On Thu, Jun 16, 2011 at 3:04 PM, michael rice nowg...@yahoo.com wrote: I seem to still be missing some things. I found mt19937 in GSL.Random.Gen, but there are two evalMCs, one in Control.Monad.MC and another in Control.Monad.MC.GSL. Which? Both are actually the same, because

[Haskell-cafe] ANNOUNCE: doctest-0.3.0

2011-06-16 Thread Simon Hengel
I just uploaded a new version of doctest[1] to Hackage. WHAT IS doctest? doctest is a port of Python's doctest[2] to Haskell. It can be used to verify, that examples in Haddock comments[3] do still work. This also provides you with a simple mechanism to write unit test,

Re: [Haskell-cafe] Data Type Inheritance ala OO - Inheritence -- howto best in Haskell ?

2011-06-16 Thread gutti
Hi David, thanks for the links. I had a lok at the OO-paper some time ago already, heard however that its quite unusual and rather tricky to do OO-style programming in Haskell. So I'm looking for suggestions how to tackle this problem in a functional way. Cheers Phil -- View this message in

[Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Dmitri O.Kondratiev
Hi, This time I am looking for a simple CSV parser that supports commas and quotes. I have no time now to learn Parsec, so I hope to find something simple and easy to use. Thanks! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Daniel Patterson
Do any of the ones on hackage work for you? http://hackage.haskell.org/package/csv-0.1.2 http://hackage.haskell.org/package/bytestring-csv http://hackage.haskell.org/package/csv-enumerator (note: hackage supports search via google it works reasonably well) On Jun 16, 2011, at 5:21 PM,

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Felipe Almeida Lessa
On Thu, Jun 16, 2011 at 6:21 PM, Dmitri O.Kondratiev doko...@gmail.com wrote: This time I am looking for a simple CSV parser that supports commas and quotes. I have no time now to learn Parsec, so I hope to find something simple and easy to use. 1. Go to

[Haskell-cafe] 8th Ghent Functional Programming Group Meeting on Thursday, the 30th of June, 2011

2011-06-16 Thread Jeroen Janssen
(apologies if you receive multiple postings) Dear All, We are pleased to announce the 8th Ghent Functional Programming Group (GhentFPG) meeting, which takes place on Thursday, the 30th of June, 2011 at 19:30 in the Technicum building of Ghent University (Sint-Pietersnieuwstraat 41, 9000

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Henning Thielemann
On Thu, 16 Jun 2011, Daniel Patterson wrote: Do any of the ones on hackage work for you? http://hackage.haskell.org/package/csv-0.1.2 http://hackage.haskell.org/package/bytestring-csv http://hackage.haskell.org/package/csv-enumerator (note: hackage supports search via google it works

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Daniel Patterson
That was my (lazy) fault. I saw the name and (faultily) assumed that it provided functionality on top of another CSV parser. On Jun 16, 2011, at 5:33 PM, Henning Thielemann wrote: On Thu, 16 Jun 2011, Daniel Patterson wrote: Do any of the ones on hackage work for you?

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Dmitri O.Kondratiev
On Fri, Jun 17, 2011 at 1:27 AM, Felipe Almeida Lessa felipe.le...@gmail.com wrote: On Thu, Jun 16, 2011 at 6:21 PM, Dmitri O.Kondratiev doko...@gmail.com wrote: This time I am looking for a simple CSV parser that supports commas and quotes. I have no time now to learn Parsec, so I hope to

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Dmitri O.Kondratiev
On Fri, Jun 17, 2011 at 1:33 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: How could it miss my lovely package named spreadsheet? It provides a lazy parser. Installing spreadsheet: cabal install Resolving dependencies... cabal: cannot configure explicit-exception-0.1.6. It

[Haskell-cafe] Haskell on NUMA

2011-06-16 Thread Michael Lesniak
Hi, what ist the current state of Haskell's parallel performance on NUMA machines? I've (probably) run into some performance problems using a 2x8 cores machine and am unsure how to fix them (if it's possible at all at the moment). I've only found two (helpful?) resources on the web, namely - an

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Henning Thielemann
On Fri, 17 Jun 2011, Dmitri O.Kondratiev wrote: How to make cabal install all the dependencies? I couldn't find this in the docs at: http://www.haskell.org/haskellwiki/Cabal-Install Usually, 'cabal install' automatically installs all imported packages. But it will certainly not do, if a

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Jason Dagit
On Thu, Jun 16, 2011 at 3:05 PM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Fri, 17 Jun 2011, Dmitri O.Kondratiev wrote: How to make cabal install all the dependencies? I couldn't find this in the docs at: http://www.haskell.org/haskellwiki/Cabal-Install Usually, 'cabal

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Dmitri O.Kondratiev
On Fri, Jun 17, 2011 at 2:05 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Fri, 17 Jun 2011, Dmitri O.Kondratiev wrote: How to make cabal install all the dependencies? I couldn't find this in the docs at: http://www.haskell.org/haskellwiki/Cabal-Install Usually, 'cabal

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Dmitri O.Kondratiev
On Fri, Jun 17, 2011 at 2:13 AM, Dmitri O.Kondratiev doko...@gmail.comwrote: On Fri, Jun 17, 2011 at 2:05 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Fri, 17 Jun 2011, Dmitri O.Kondratiev wrote: How to make cabal install all the dependencies? I couldn't find this in

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Henning Thielemann
On Fri, 17 Jun 2011, Dmitri O.Kondratiev wrote: cabal install spreadsheet --constraint=transformers==0.2.2.0 Resolving dependencies... cabal: cannot configure spreadsheet-0.1. It requires transformers ==0.0.* For the dependency on transformers ==0.0.* there are these packages:

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Dmitri O.Kondratiev
On Fri, Jun 17, 2011 at 2:27 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: I see. I had fixed the problem locally long time ago, but somehow missed upload to Hackage. Try the updated package, please. Ok great! Installed (with some warnings, see below), thank you! I'll try it

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Henning Thielemann
On Thu, 16 Jun 2011, Felipe Almeida Lessa wrote: [1] http://hackage.haskell.org/package/bytestring-csv [2] http://hackage.haskell.org/package/csv-enumerator [3] http://hackage.haskell.org/package/spreadsheet [4] http://hackage.haskell.org/package/csv [5] http://hackage.haskell.org/package/ssv

[Haskell-cafe] Can one drop GHC 7.0.4 into the Haskell Platform or does the platform need to be updated?

2011-06-16 Thread KC
-- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Data Type Inheritance ala OO - Inheritence -- howto best in Haskell ?

2011-06-16 Thread Evan Laforge
I've done something perhaps similar in that I have a couple of signal types, backed by (X, Y) vectors with Y values of different types, but the same X type. So they can share a fair amount of implementation that depends only on X. Still more could be shared if I could know a zero value for each

[Haskell-cafe] Haskell: The Craft of Functional Programming 3rd ed is out.

2011-06-16 Thread KC
http://www.haskellcraft.com/craft3e/Home.html -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] ANNOUNCE: doctest-0.3.0

2011-06-16 Thread Luke Palmer
On Thu, Jun 16, 2011 at 12:22 PM, Simon Hengel simon.hen...@wiktory.orgwrote: I just uploaded a new version of doctest[1] to Hackage. Sweet! I think using all lower-case package names is a good thing. I'm just curious -- why? Luke ___

Re: [Haskell-cafe] ANNOUNCE: doctest-0.3.0

2011-06-16 Thread Ivan Lazar Miljenovic
On 17 June 2011 14:36, Luke Palmer lrpal...@gmail.com wrote: On Thu, Jun 16, 2011 at 12:22 PM, Simon Hengel simon.hen...@wiktory.org wrote: I just uploaded a new version of doctest[1] to Hackage. Sweet! I think using all lower-case package names is a good thing. I'm just curious -- why?

[Haskell-cafe] type signature of parsec functions and how to warp them up.

2011-06-16 Thread 吴兴博
I have some different parsers of Parsec to use in a project, and I want to make a warp function to make the testing easy. here is some of my body of parser : they all has type of parsecT *** stringSet :: ParsecT String u Identity [String] intSet :: ParsecT String u Identity

Re: [Haskell-cafe] type signature of parsec functions and how to warp them up.

2011-06-16 Thread 吴兴博
It seems weird: first ghci failed to load this file: file: RunParse.hs --- module RunParse where import System.IO import Data.Functor.Identity (Identity) import Text.Parsec first, no this line---what about this line ??? import Text.Parsec.Prim