
15 Sep
2017
15 Sep
'17
7:49 p.m.
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