It is often useful for where clause to span several guarded right-hand sides. If the where clause fails, then presumably all the guarded rhss are abandoned. Views One very useful application of pattern guards is to abstract data types. Given an abstract data type it's quite common to have conditional selectors. Maybe String The function addressMaybe extracts a string from the abstract data type Person , but returns Nothing if the person has no address.
Type is abstract.
Thus, pattern guards can be seen as addressing a similar goal to that of views, namely reconciling pattern matching with data abstraction. It is natural to ask whether views subsume pattern guards or vice versa. However, views give a view on a single value, whereas guards allow arbitrary function calls to combine in-scope values. We do not want a view of env nor of var1 but rather of their combination by lookup . Views simply do not help with clunky .