Question about Type Checking

Clement opabc at
Thu Oct 2 11:10:12 EDT 2003

Hi i am doing a type checker.
and how can i check if the Expn that i have is a Prim

Function = ("f",[([Arg "x"],Simple (Int 2))])

type Function = (Name, [Equation])
type Equation = ([Expn], Body)
{- (the body of) either a simple equation: f a1 .. an = e
or a conditional equation: f a1 .. an | b1 = e1
                                      | bm = em

data Body = Simple Expn
| Conditional [(Expn, Expn)]
deriving (Show, Read)
data Expn = Int Int | Char Char | Bool Bool
          | Arg Name | Prim Name | Func Name
          | Appn Expn Expn | Tuple [Expn]

and how can i group the Expn together for Appn?

Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

More information about the Haskell-Cafe mailing list