
15 Sep
2017
15 Sep
'17
9:37 p.m.
Thanks, that solves it. I really like `where`, though.
Francesco Ariis
On Fri, Sep 15, 2017 at 06:53:54PM -0400, Manuel Vázquez Acosta wrote:
$ ghc xoutil/dim/meta.hs [1 of 1] Compiling Meta ( xoutil/dim/meta.hs, xoutil/dim/meta.o )
xoutil/dim/meta.hs:19:3: parse error on input ‘|’
Hello Manuel, `where` scopes over several guarded equations (and this is the main difference with `let`). This should do the trick:
| a == 1 = let x = 10 in x + a | a == 2 = let x = 3 in x + a
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners