Permalink
Browse files

nullRendering emptyRendering = True

  • Loading branch information...
1 parent 6fc5506 commit e96dac57571f8bc7dbc6d6878085178065e5c48d @ekmett committed Jan 9, 2013
Showing with 3 additions and 3 deletions.
  1. +2 −2 src/Text/Trifecta/Parser.hs
  2. +1 −1 src/Text/Trifecta/Rendering.hs
@@ -224,8 +224,8 @@ explain r (Err mm as es)
withEx x = fromMaybe (fillSep $ text <$> words "unspecified error") mm <> x
expecting = text "expected:" <+> fillSep (punctuate (Pretty.char ',') (text <$> now))
report txt = vsep $ [prettyTerm (delta r) <> Pretty.char ':' <+> red (text "error") <> Pretty.char ':' <+> nest 4 txt]
- <|> prettyTerm r <$ guard (not (nullRendering r))
- <|> as
+ <|> prettyTerm r <$ guard (not (nullRendering r))
+ <|> as
data Result a
= Success a
@@ -152,7 +152,7 @@ nullRendering (Rendering (Columns 0 0) 0 0 _ _) = True
nullRendering _ = False
emptyRendering :: Rendering
-emptyRendering = rendered (Columns 0 0) ""
+emptyRendering = Rendering (Columns 0 0) 0 0 id (const id)
instance Semigroup Rendering where
-- an unprincipled hack

0 comments on commit e96dac5

Please sign in to comment.