[Haskell-cafe] Stupid error, probably

2009-10-12 Thread b1g3ar5
I can't get the following to work in Leksah - but it works OK in GHC. Can anyone spot the error? I wondered if it was becasue the libraries loaded are different - but I'm just a Haskell beginner ... I have: myGroupBy :: Int→ [a]→ [[a]] myGroupBy = takeWhile not . null . (unfoldr (Just .

[Haskell-cafe] Newcomers question

2009-10-31 Thread b1g3ar5
I'm trying: instance Num b = Num (a - b) where fromInteger = pure . Prelude.fromInteger negate = fmap Prelude.negate (+) = liftA2 (Prelude.+) (*) = liftA2 (Prelude.*) abs = fmap Prelude.abs signum = fmap Prelude.signum but the compiler rejects it with: src\Main.hs:24:9: Could not deduce

[Haskell-cafe] Re: Newcomers question

2009-11-01 Thread b1g3ar5
with it for the foreseeable future. On Sat, Oct 31, 2009 at 7:31 PM, b1g3ar5 nick.st...@gmail.com wrote: I'm trying: instance Num b = Num (a - b) where fromInteger = pure . Prelude.fromInteger negate = fmap Prelude.negate (+) = liftA2 (Prelude.+) (*) = liftA2 (Prelude.*) abs

[Haskell-cafe] Re: Haskell list on Twitter?

2010-10-01 Thread b1g3ar5
I have a list of people not on their own list. I can't decide whether I should be on it or not. On Oct 1, 6:38 pm, Daniel Peebles pumpkin...@gmail.com wrote: I try to keep my list up to date with new haskellers I find on twitter, and it should include everyone on the haskell wiki list. Yes,

[Haskell-cafe] Newbie type question for wxHaskell learner

2011-01-07 Thread b1g3ar5
I've tried to solve this but I am failing. I can do this: p0-panel nb [] e0-textCtrl p [text:=my_list!!0] but I want to do this on all of my_list, so I tried: let es = map (\x- textCtrl (panel nb []) [text:=x]) my_list Now, this won't work because the panel nb [] is IO (Panel()) and the

Re: [Haskell-cafe] Newbie type question for wxHaskell learner

2011-01-07 Thread b1g3ar5
:21 pm, Daniel Fischer daniel.is.fisc...@googlemail.com wrote: On Friday 07 January 2011 17:09:11, b1g3ar5 wrote: I've tried to solve this but I am failing. I can do this: p0-panel nb [] e0-textCtrl p [text:=my_list!!0] but I want to do this on all of my_list, so I tried: let es

Re: [Haskell-cafe] Newbie type question for wxHaskell learner

2011-01-07 Thread b1g3ar5
...@googlemail.com wrote: On Friday 07 January 2011 19:01:43, b1g3ar5 wrote: Thanks for your reply but it doesn't quite solve the problem. This: plist - mapM (\x- (panel nb [])) my_list returns [Panel()] and works as you say, but: elist - mapM (\x- (textCtrl (panel nb []) [text

Re: [Haskell-cafe] Newbie type question for wxHaskell learner

2011-01-07 Thread b1g3ar5
2011 19:45:26, b1g3ar5 wrote: Nearly - the first suggestion doesn't work because each es needs a new panel I can't use the same one each time. The second suggestion doesn't quite work because the x in [text := contents x] is not in scope of the \p function. Hmm, Prelude Graphics.UI.WX