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: 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

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: 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 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,<,<=,>,

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