-- | Patterns of function declarations
match :: Match NodeInfo -> Printer t ()
match (Match _ name pats rhs mbinds) =
  do orig <- gets psIndentLevel
     dependBind
       (do (short,st) <- isShort name
           put st
           space
           return short)
       (\headIsShort ->
          do let flats = map isFlatPat pats
                 flatish =
                   length (filter not flats) <
                   2
             if (headIsShort && flatish) ||
                all id flats
                then do ((singleLiner,overflow),st) <- sandboxNonOverflowing pats
                        if singleLiner && not overflow
                           then put st
                           else multi orig pats headIsShort
                else multi orig pats headIsShort)
     withCaseContext False (pretty rhs)
     case mbinds of
       Nothing -> return ()
       Just binds ->
         do newline
            indentSpaces <- getIndentSpaces
            indented indentSpaces
                     (depend (write "where ")
                             (pretty binds))
match :: Match NodeInfo -> Printer t ()
match (Match _ name pats rhs mbinds) =
  do orig <- gets psIndentLevel
     dependBind
       (do (short,st) <- isShort name
           put st
           space
           return short)
       (\headIsShort ->
          do let flats = map isFlatPat pats
                 flatish =
                   length (filter not flats) <
                   2
             if (headIsShort && flatish) ||
                all id flats
                then do ((singleLiner,overflow),st) <- sandboxNonOverflowing pats
                        if singleLiner && not overflow
                           then put st
                           else multi orig pats headIsShort
                else multi orig pats headIsShort)
     withCaseContext False (pretty rhs)
     case mbinds of
       Nothing -> return ()
       Just binds ->
         do newline
            indentSpaces <- getIndentSpaces
            indented indentSpaces
                     (depend (write "where ")
                             (pretty binds))
match (Match _ name pats rhs mbinds) =
  do orig <- gets psIndentLevel
     dependBind
       (do (short,st) <- isShort name
           put st
           space
           return short)
       (\headIsShort ->
          do let flats = map isFlatPat pats
                 flatish =
                   length (filter not flats) <
                   2
             if (headIsShort && flatish) ||
                all id flats
                then do ((singleLiner,overflow),st) <- sandboxNonOverflowing pats
                        if singleLiner && not overflow
                           then put st
                           else multi orig pats headIsShort
                else multi orig pats headIsShort)
     withCaseContext False (pretty rhs)
     case mbinds of
       Nothing -> return ()
       Just binds ->
         do newline
            indentSpaces <- getIndentSpaces
            indented indentSpaces
                     (depend (write "where ")
                             (pretty binds))