Re: [Haskell-cafe] About the parse error (possibly incorrect indentation)

2009-09-17 Thread Brandon S. Allbery KF8NH
On Sep 17, 2009, at 20:17 , xu zhang wrote: case op of And -> let a = 4 Or -> let a = 3 Implies -> let a = 2 Equiv -> let a = 1 "let" isn't an assignment command, it's a scoping command. That is, > let a = 3 in ... is equivalent to something lik

Re: [Haskell-cafe] About the parse error (possibly incorrect indentation)

2009-09-17 Thread Daniel Fischer
Am Freitag 18 September 2009 02:17:22 schrieb xu zhang: > showMinProp :: Int -> Prop -> String > showMinProp preNo (BinOp op p q) = >        case op of >          And -> let a = 4 >          Or  -> let a = 3 >          Implies -> let a = 2 >          Equiv   -> let a = 1 >        if (a > preNo) >  

[Haskell-cafe] About the parse error (possibly incorrect indentation)

2009-09-17 Thread xu zhang
Hi, I am trying to get the function showMinProp to return String, but I always get an error of parse error (possibly incorrect indentation) Who can help with this? any idea? Thank u in advance! data Prop = Var String | Negation Prop | BinOp Op Prop Prop data Op = And | Or | Implies | Equiv