Re: [Haskell-cafe] Porting ELF statifier to Haskell!

2010-07-24 Thread C K Kashyap
Looks like the crash is due to ASLR (Address Space Layout Randomization). You need to disable it for it to work. You can disable ASLR very easily - check out http://stackoverflow.com/questions/1455904/how-to-disable-address-space-randomization-for-a-binary-on-linux for instance Statifier worked for

Re: [Haskell-cafe] Re: recommendation for (best) sqlite3 bindings

2010-07-24 Thread Michael Snoyman
Sorry I didn't send it earlier, it must have slipped my mind. On Sun, Jul 25, 2010 at 3:07 AM, Dan Knapp wrote: > I am the author of direct-sqlite, and I thank you for the bug report. > I'll be fixing this as soon as I'm able. It's always nice to hear > about people using my code! > > > On Wed,

Re: [Haskell-cafe] Re: recommendation for (best) sqlite3 bindings

2010-07-24 Thread Dan Knapp
I am the author of direct-sqlite, and I thank you for the bug report. I'll be fixing this as soon as I'm able. It's always nice to hear about people using my code! On Wed, Jul 21, 2010 at 2:10 AM, Michael Snoyman wrote: > > > On Wed, Jul 21, 2010 at 8:59 AM, Gour wrote: >> >> On Wed, 21 Jul 20

Re: [Haskell-cafe] Type problems

2010-07-24 Thread Ivan Miljenovic
On 25 July 2010 05:50, Tobias Brandt wrote: > > You have to fix the type of 1 and 6, e.g. by writing > x <- randomRIO (1, 6) :: IO Int > or > x <- randomRIO (1, 6 :: Int) >  GHCi defaults integral numbers to Int, that's why it works there. The default numeric type is Integer, not Int. -- Ivan La

RE: [Haskell-cafe] build and use ghc's rts without a full unregistered ghc port?

2010-07-24 Thread Korcan Hussein
I managed to get a hello world app working on the Wii! but I had to do some hacking of the generated C code because the devkitPPC is missing 2 posix headers referenced in the generated C code from Jhc. The functions the code used from those headers didn't seem completely essential. Basically I

[Haskell-cafe] data type declaration

2010-07-24 Thread Patrick Browne
Hi, I am trying to understand the data type declaration below. What is the relation between class C3 and the data type Address below? Where is such a technique used? Thanks, Pat module A where data Person = Person String Integer deriving Show data Employee = Employee String Integer deriving Sho

Re: [Haskell-cafe] default function definitions

2010-07-24 Thread Andrew Coppin
Patrick Browne wrote: Hi, I am studying the Haskell type class system as part of a language comparison thesis. At this point I am looking at how default function definitions are handled in classes. Functions are usually defined in instances, not classes. I appreciate that the code below may not b

Re: [Haskell-cafe] Wildly off-topic: de Boor's algorithm

2010-07-24 Thread mokus
Andrew Coppin wrote: > Given a suitable definition for Vector2 (i.e., a 2D vector with the > appropriate classes), it is delightfully trivial to implement de > Casteljau's algorithm: > > de_Casteljau :: Scalar -> [Vector2] -> [[Vector2]] > de_Casteljau t [p] = [[p]] > de_Casteljau t ps = ps : de_Ca

Re: [Haskell-cafe] Type problems

2010-07-24 Thread Daniel Fischer
On Saturday 24 July 2010 21:36:14, michael rice wrote: > This works: > > Prelude System.Random> do { randomRIO (1,6) >>= (\x -> putStrLn $ "Value > = " ++ show x) } Value = 5 > > So does this: > > Prelude System.Random> do { x <- randomRIO (1,6); putStrLn $ "Value = " > ++ show x } Value = 2 > > Bu

Re: [Haskell-cafe] Type problems

2010-07-24 Thread michael rice
Thanks, Tobias. I figured it was something like that but lack the syntax expertise on where to put it. MIchael --- On Sat, 7/24/10, Tobias Brandt wrote: From: Tobias Brandt Subject: Re: [Haskell-cafe] Type problems To: "michael rice" Cc: haskell-cafe@haskell.org Date: Saturday, July 24, 2010

Re: [Haskell-cafe] Type problems

2010-07-24 Thread Tobias Brandt
You have to fix the type of 1 and 6, e.g. by writing x <- randomRIO (1, 6) :: IO Int or x <- randomRIO (1, 6 :: Int) GHCi defaults integral numbers to Int, that's why it works there. On 24 July 2010 21:36, michael rice wrote: > This works: > > Prelude System.Random> do { randomRIO (1,6) >>=

[Haskell-cafe] Type problems

2010-07-24 Thread michael rice
This works: Prelude System.Random> do { randomRIO (1,6) >>= (\x -> putStrLn $ "Value = " ++ show x) } Value = 5 So does this: Prelude System.Random> do { x <- randomRIO (1,6); putStrLn $ "Value = " ++ show x } Value = 2 But not this: 1 import Control.Monad 2 import System.Random 3 4 foo :: I

Re: [Haskell-cafe] Porting ELF statifier to Haskell!

2010-07-24 Thread Henning Thielemann
C K Kashyap schrieb: > Hi, > At my work we ran into a situation where we started wishing there was a > way to take a dynamically linked executable and create a statically > linked bundle out of it. Little bit of googling got me to statifier - > http://statifier.sourceforge.net/statifier/main.html.

Re: [Haskell-cafe] default function definitions

2010-07-24 Thread Alexander Solla
On Jul 24, 2010, at 10:59 AM, Patrick Browne wrote: class C1 c1 where age :: c1 -> Integer -- add default impl, can this be defined only once at class level? -- Can this function be redefined in a *class* lower down the heirarchy? age(c1) = 1 Yes, but keep in mind that the hierarchy is o

Re: [Haskell-cafe] default function definitions

2010-07-24 Thread Daniel Fischer
On Saturday 24 July 2010 19:59:26, Patrick Browne wrote: > > module A where > data Person = Person String Integer deriving Show > data Employee = Employee String Integer deriving Show > > class C1 c1 where > age :: c1 -> Integer > -- add default impl, can this be defined only once at class level

RE: [Haskell-cafe] build and use ghc's rts without a full unregistered ghc port?

2010-07-24 Thread Korcan Hussein
I did initially thought about it and had reservations but you convinced me so I've been trying out jhc. Seems a lot more promising but unfortunately I had problems, here's my targets.ini: [wii] cc=powerpc-eabi-gcc byteorder=be gc=static cflags+=-DGEKKO -mrvl -mcpu=750 -meabi -mhard-float execut

[Haskell-cafe] default function definitions

2010-07-24 Thread Patrick Browne
Hi, I am studying the Haskell type class system as part of a language comparison thesis. At this point I am looking at how default function definitions are handled in classes. Functions are usually defined in instances, not classes. I appreciate that the code below may not be an appropriate way to

Re: [Haskell-cafe] Heavy lift-ing

2010-07-24 Thread michael rice
Prelude Control.Monad> liftM2 (\a b -> a : b : []) "abc" "123" ["a1","a2","a3","b1","b2","b3","c1","c2","c3"] Prelude Control.Monad> Got it! Thanks to all. Michael --- On Sat, 7/24/10, aditya siram wrote: From: aditya siram Subject: Re: [Haskell-cafe] Heavy lift-ing To: "Max Rabkin" Cc: "h

[Haskell-cafe] Re: "New FGL" naming survey

2010-07-24 Thread Ivan Lazar Miljenovic
For those interested, the overall results are in: http://ivanmiljenovic.wordpress.com/2010/07/25/results-of-fgl-naming-survey/ Ivan Miljenovic writes: > Thank you for all the people who have voted; we so far have 42 results > in about 12 hours. > > Some indication of the results so far: > > * 62

Re: [Haskell-cafe] Heavy lift-ing

2010-07-24 Thread aditya siram
Perhaps I'm being unclear again. All I was trying to say was that: liftM2 (-) [0,1] [2,3] /= liftM2 (-) [2,3] [0,1] -deech On Sat, Jul 24, 2010 at 9:30 AM, Max Rabkin wrote: > On Sat, Jul 24, 2010 at 4:08 PM, aditya siram wrote: >> I wouldn't-it was a bad example. My only point was that because

Re: [Haskell-cafe] Heavy lift-ing

2010-07-24 Thread Max Rabkin
On Sat, Jul 24, 2010 at 4:08 PM, aditya siram wrote: > I wouldn't-it was a bad example. My only point was that because of the > way (>>=) is implemented for lists the order of the arguments 'a' and > 'b' in 'liftM2 f a b' matters. > > -deech No, it's not. The type of liftM2 makes this clear: lif

Re: [Haskell-cafe] Heavy lift-ing

2010-07-24 Thread aditya siram
I wouldn't-it was a bad example. My only point was that because of the way (>>=) is implemented for lists the order of the arguments 'a' and 'b' in 'liftM2 f a b' matters. -deech On Sat, Jul 24, 2010 at 1:37 AM, Lennart Augustsson wrote: > Why would you expect swapped operands to (-) ? > > > Sen

Re: [Haskell-cafe] FGL problem: cannot acces data constructor NodeMap

2010-07-24 Thread Immanuel Normann
2010/7/24 Ivan Lazar Miljenovic > Once again cc-ing -cafe; Immanuel, can you please do "reply to all" > rather than just "reply" in GMail? :p > Oh, yes I forgot - sorry! Thanks for all the valuable infos :-) Immanuel > > Immanuel Normann writes: > > > 2010/7/24 Ivan Lazar Miljenovic > > > >

Re: [Haskell-cafe] FGL problem: cannot acces data constructor NodeMap

2010-07-24 Thread Ivan Lazar Miljenovic
Once again cc-ing -cafe; Immanuel, can you please do "reply to all" rather than just "reply" in GMail? :p Immanuel Normann writes: > 2010/7/24 Ivan Lazar Miljenovic > >> CC-ing haskell-cafe again: >> >> Immanuel Normann writes: >> >> > 2010/7/24 Ivan Lazar Miljenovic >> >> > Some of my lnodes

Re: [Haskell-cafe] FGL problem: cannot acces data constructor NodeMap

2010-07-24 Thread Ivan Lazar Miljenovic
CC-ing haskell-cafe again: Immanuel Normann writes: > 2010/7/24 Ivan Lazar Miljenovic > >> Immanuel Normann writes: >> > Afterall, my purpose is to get access to the map in a NodeMap and finally >> to >> > apply lookup to it. But I don't know how to access the map from a NodeMap >> > (the map

Re: [Haskell-cafe] FGL problem: cannot acces data constructor NodeMap

2010-07-24 Thread Ivan Lazar Miljenovic
Immanuel Normann writes: > Hi, > > I have a problem with the data constructor NodeMap > Data.Graph.Inductive.NodeMap > of the graph library fgl-5.4.2.3 (also fgl-5.4.2.2): > > I cannot access the data constructor NodeMap, as the ghci session shows: > > Prelude> :m Data.Graph.Inductive.NodeMap > P

[Haskell-cafe] FGL problem: cannot acces data constructor NodeMap

2010-07-24 Thread Immanuel Normann
Hi, I have a problem with the data constructor NodeMap Data.Graph.Inductive.NodeMap of the graph library fgl-5.4.2.3 (also fgl-5.4.2.2): I cannot access the data constructor NodeMap, as the ghci session shows: Prelude> :m Data.Graph.Inductive.NodeMap Prelude Data.Graph.Inductive.NodeMap> :t Node

Re: [Haskell-cafe] Weird behavior with arrow commands

2010-07-24 Thread Ross Paterson
On Sat, Jul 24, 2010 at 01:10:56PM +0200, Jürgen Doser wrote: > This seems to be a bug in ghc. First, let's fix bar to give the full > three arguments (Int, Float, Double) to g: > > bar f g = proc x -> do > (f -< x) `foo` (\n m k -> g -< (n,m,k)) > > ghc infers the type: > > bar :: (t -> Str

Re: [Haskell-cafe] Weird behavior with arrow commands

2010-07-24 Thread Jürgen Doser
El vie, 23-07-2010 a las 23:27 -0400, Ronald Guida escribió: > I am trying to figure out how to use GHC's arrow commands, and I found > some extremely weird behavior. CC'ed to ghc-users, because this may be a ghc bug. > In GHC's manual, there is a description of arrow commands, which I > don't re

Re: [Haskell-cafe] build and use ghc's rts without a full unregistered ghc port?

2010-07-24 Thread Mark Wotton
can't speak as to how difficult it is to get GHC built unregisterised, but you might want to consider JHC if you don't need to use a lot of Hackage. It compiles to C without a special RTS needed, which might make it a lot easier. mark On Sat, Jul 24, 2010 at 8:45 PM, Korcan Hussein wrote: > > Hi

[Haskell-cafe] build and use ghc's rts without a full unregistered ghc port?

2010-07-24 Thread Korcan Hussein
Hi, I was just wondering if this is possible, I would like to use a gcc port which cross compiles to the PPC architecture (Wii DevkitPPC to be specifically: http://wiibrew.org/wiki/DevkitPPC) for a platform that is not POSIX compatible I believe (at least not fully or maybe I'm wrong entirely). I

[Haskell-cafe] Re: ANNOUNCE: Haskell Platform 2010.2.0.0

2010-07-24 Thread Benjamin L. Russell
Don Stewart writes: > We're pleased to announce the fifth release of the Haskell Platform: a > single, standard Haskell distribution for everyone. > > Download the Haskell Platform 2010.2.0.0: > > http://hackage.haskell.org.nyud.net/platform/ > > (Caching server). > > The specification, along

Re: [Haskell-cafe] Anyone here from New Zealand?

2010-07-24 Thread Hamish Mackenzie
On 24 Jul 2010, at 02:15, Tim Matthews wrote: > Any of the haskellers here from NZ? I am in Wellington, Stephen is near Palmerston North. There are a few others elsewhere I think. > Are you using haskell in production, internally within your company or just > outside of work in your own time?