Skip to content

Quote strings in Show instances #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Data/String.purs
Original file line number Diff line number Diff line change
@@ -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
@@ -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
2 changes: 1 addition & 1 deletion src/Data/String/CaseInsensitiveString.purs
Original file line number Diff line number Diff line change
@@ -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 _