Is there something fundamental about `where` clauses which would prevent them from parsing as expressions, or is this an artifact of how they are implemented in Haskell?
On Sun, Jan 1, 2017 at 9:21 PM Janis Voigtländer < [email protected]> wrote: > > > Janis, the following compiles for me: … > > > > Right, where does not work for expressions, but for right-hand sides, of > which pattern match branches are an instance. > > > The next question would be, still under the assumption that a choice has > to be made between where and let because both won’t be made available at > the same time, how well “where-only” would work if in addition one wants > to have a local binding that spans all pattern match branches, i.e., > something one would currently write in Elm like so: > > > f tree = > > let > > a = ... something ... > > in > > case tree of > > Leaf x -> let b = ... in ... using a and b ... > > Node s t -> let c = ... in ... using a and c ... > > > > > > > > > > > > > -- > > > You received this message because you are subscribed to the Google Groups > "Elm Discuss" group. > > > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > > > For more options, visit https://groups.google.com/d/optout. > > > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
