Skip to content

Commit

Permalink
Quote strings in Show instances (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rufflewind authored and paf31 committed Aug 6, 2017
1 parent 80238f5 commit 43d8699
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Data/String.purs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ derive instance ordPattern :: Ord Pattern
derive instance newtypePattern :: Newtype Pattern _

instance showPattern :: Show Pattern where
show (Pattern s) = "(Pattern " <> s <> ")"
show (Pattern s) = "(Pattern " <> show s <> ")"

-- | A newtype used in cases to specify a replacement for a pattern.
newtype Replacement = Replacement String
Expand All @@ -60,7 +60,7 @@ derive instance ordReplacement :: Ord Replacement
derive instance newtypeReplacement :: Newtype Replacement _

instance showReplacement :: Show Replacement where
show (Replacement s) = "(Replacement " <> s <> ")"
show (Replacement s) = "(Replacement " <> show s <> ")"

-- | Returns the character at the given index, if the index is within bounds.
charAt :: Int -> String -> Maybe Char
Expand Down
2 changes: 1 addition & 1 deletion src/Data/String/CaseInsensitiveString.purs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ instance ordCaseInsensitiveString :: Ord CaseInsensitiveString where
compare (toLower s1) (toLower s2)

instance showCaseInsensitiveString :: Show CaseInsensitiveString where
show (CaseInsensitiveString s) = "(CaseInsensitiveString " <> s <> ")"
show (CaseInsensitiveString s) = "(CaseInsensitiveString " <> show s <> ")"

derive instance newtypeCaseInsensitiveString :: Newtype CaseInsensitiveString _

0 comments on commit 43d8699

Please sign in to comment.