Re: Graduate Student

2003-10-22 Thread John Meacham
On Tue, Oct 21, 2003 at 11:19:42AM +0100, Keith Wansbrough wrote: > Someone will correct me if I'm wrong I'm sure, but I don't think this > has been used for at least a couple of years. You might find the Wiki > pages more interesting; try starting at The haskell wish list has been broken as long

Re: Enum on Float/Double

2003-10-22 Thread Hal Daume III
This works great for when x/=0...is there a good (Haskell) solution for the smallest positive float? On Tue, 21 Oct 2003, Lennart Augustsson wrote: > So this has been a while, but i think that decodeFloat, > incrementing the mantissa, encodeFloat might work. > But then again, it might not. :) >

Re: Enum on Float/Double

2003-10-22 Thread Lennart Augustsson
I think you need to be careful when you reach the smallest number that can be normalized. Let's face it, Haskell just doesn't provide the right functions for this. :) -- Lennart Hal Daume III wrote: This works great for when x/=0...is there a good (Haskell) solution for the smallest positive fl

ANNOUNCE: HToolkit 1.2 released

2003-10-22 Thread Krasimir Angelov
Dear Haskellers, I am pleased to announce HToolkit 1.2 for Haskell. The HToolkit is a platform independent package for Graphical User Interface. The package is split into two libraries GIO and Port. The Port is a low-level Haskell 98+FFI compatible API, while GIO is a high-level user friendly

ghc6 behavior with circular instance declaration

2003-10-22 Thread Kenny
Hi all, currently I got this program of Eq: module Myeq where class Myeq a where myeq :: a -> a -> Bool instance Myeq Int where myeq i j = (i==j) -- convententionally, we write: {- instance (Myeq a) => Myeq [a] where myeq (x:xs) (y:ys) = (myeq x y)&&(myeq xs ys) -} instance (Myeq

ANNOUNCE HToolkit 1.2 released

2003-10-22 Thread Krasimir Angelov
Dear Haskellers, I am pleased to announce HToolkit 1.2 for Haskell. The HToolkit is a platform independent package for Graphical User Interface. The package is split into two libraries GIO and Port. The Port is a low-level Haskell 98+FFI compatible API, while GIO is a high-level user friendly int

RE: Graduate Student

2003-10-22 Thread Simon Peyton-Jones
So far as GHC is concerned, we're now keeping our "wish list" in SourceForge ,under "Tasks" http://sourceforge.net/pm/?group_id=8032 We've not been very assiduous in maintaining these lists, though. If more people used them, we might be more so. Did you have anything in mind? What so

Re: Graduate Student

2003-10-22 Thread Carl Witty
On Tue, 2003-10-21 at 13:17, John Meacham wrote: > On Tue, Oct 21, 2003 at 11:19:42AM +0100, Keith Wansbrough wrote: > > Someone will correct me if I'm wrong I'm sure, but I don't think this > > has been used for at least a couple of years. You might find the Wiki > > pages more interesting; try s

Re: Enum on Float/Double

2003-10-22 Thread Glynn Clements
Hal Daume III wrote: > This works great for when x/=0...is there a good (Haskell) solution for > the smallest positive float? I think that the following are correct for the smallest normalised Float and Double values: Prelude> encodeFloat 1 (fst (floatRange (0 :: Float)) - 1) :: Float

Question abt Num

2003-10-22 Thread Pratik Bhadra
Hi I have a data type Expr for handling Expressions data Expr = Lit1 Int | Lit2 Bool | Var String | BinOp Op Expr Expr As you can see, I am trying to have an Expression have both Int and Bool values so that I can work with both arithmetic (+,-,*,/) and logical(and,or,<,<=,>,>=) operators. What

Re: Question abt Num

2003-10-22 Thread Artie Gold
Pratik Bhadra wrote: Hi I have a data type Expr for handling Expressions data Expr = Lit1 Int | Lit2 Bool | Var String | BinOp Op Expr Expr As you can see, I am trying to have an Expression have both Int and Bool values so that I can work with both arithmetic (+,-,*,/) and logical(and,or,<,<=,>,

Re: Question abt Num

2003-10-22 Thread Hamilton Richards
At 9:20 PM -0500 10/22/03, Pratik Bhadra wrote: Hi I have a data type Expr for handling Expressions data Expr = Lit1 Int | Lit2 Bool | Var String | BinOp Op Expr Expr As you can see, I am trying to have an Expression have both Int and Bool values so that I can work with both arithmetic (+,-,*,/)

Re: Question abt num

2003-10-22 Thread Pratik Bhadra
Thanks, Artie and thanks to Dr Richards! I figured it out. I was not correlating the Exprs properly. Now that I broke it up into Lit1 and Lit2 and am returning a Lit1 or a Lit2 which will return an Expr, it works! :) Pratik Pratik Bhadra Undergraduate Section Lea

Re: Enum on Float/Double

2003-10-22 Thread oleg
> I found a case where I really need: > f :: Float -> Float > where > f x is the least y such that x < y This seems to be the problem of finding the unnormalized epsilon: the smallest positive number one can meaningfully add to the given number x. If that x is 1.0, we're talking about the eps

Re: Question abt Num

2003-10-22 Thread Thomas L. Bevan
On Thu, 23 Oct 2003 12:20 pm, Pratik Bhadra wrote: > > data Expr = Lit1 Int | Lit2 Bool | Var String | BinOp Op Expr Expr > > My evaluate code is as follows... > > evaluate :: Expr -> Store -> Expr > > evaluate ( Lit1 n ) st = n > evaluate ( Lit2 n ) st = n A function must match its type signature

RESOLVED - Question abt num

2003-10-22 Thread Pratik Bhadra
Thanks for your attention :) The problem has been resolved. Pratik Pratik Bhadra Undergraduate Section Leader The University of Texas at Austin College of Natural Sciences Junior BS Computer Sciences - __

Re: ANNOUNCE HToolkit 1.2 released

2003-10-22 Thread Arun Kumar S Jadhav
I tried to install port (after installig haddock), but it says it can't find libs directory of haddock (specifically it says it doesn't find base.haddock). Any solution to this?, 'coz I very badly want to try out HToolkit. Regards, Arun Kumar S Jadhav, Masters Student, KReSIT, IIT-Bombay, India