There's nothing wrong with the use of your example, I'm guessing it's something in your ... that's leading to the parse error. This compiles just fine:
f a b | c > 1 = 1 | c < 1 = 2 | otherwise = 3 where c = a+b Nick On Wed, Jul 21, 2010 at 8:01 AM, Eitan Goldshtrom <[email protected]> wrote: > I'm trying to fit a where clause to some guards I'm using. I have the > following > > f a b > | c > 1 = ... > | c < 1 = ... > | otherwise = ... > where c = a+b > > yet I'm getting a parsing error. Is this not the correct way to combine > "where" with "guards"? > > -Eitan > _______________________________________________ > Haskell-Cafe mailing list > [email protected] > http://www.haskell.org/mailman/listinfo/haskell-cafe > _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
