From 3d9760d5d8a8e1cc826c0c4293bb880736d5ab5c Mon Sep 17 00:00:00 2001 From: Rob Rix <rob.rix@me.com> Date: Sun, 6 Aug 2017 11:57:31 -0400 Subject: [PATCH] Sort the End case of Show to the top. --- src/Data/Syntax/Assignment.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Data/Syntax/Assignment.hs b/src/Data/Syntax/Assignment.hs index 9131b7ec1..83545f040 100644 --- a/src/Data/Syntax/Assignment.hs +++ b/src/Data/Syntax/Assignment.hs @@ -392,6 +392,7 @@ instance MonadError (Error grammar) (Assignment ast grammar) where instance (Ix grammar, Show grammar) => Show1 (AssignmentF ast grammar) where liftShowsPrec sp sl d a = case a of + End -> showString "End" . showChar ' ' . sp d () Location -> showString "Location" . sp d (Info.Range 0 0 :. Info.Span (Info.Pos 1 1) (Info.Pos 1 1) :. Nil) Project projection -> showsUnaryWith (const (const (showChar '_'))) "Project" d projection Source -> showString "Source" . showChar ' ' . sp d "" @@ -401,4 +402,3 @@ instance (Ix grammar, Show grammar) => Show1 (AssignmentF ast grammar) where Alt as -> showsUnaryWith (const sl) "Alt" d (toList as) Throw e -> showsUnaryWith showsPrec "Throw" d e Catch during handler -> showsBinaryWith (liftShowsPrec sp sl) (const (const (showChar '_'))) "Catch" d during handler - End -> showString "End" . showChar ' ' . sp d ()