mirror of
https://github.com/github/semantic.git
synced 2024-12-26 16:33:03 +03:00
Write a custom Show instance for JSString.
This commit is contained in:
parent
47c71a0acf
commit
466d7d3611
@ -10,7 +10,10 @@ data JSValue
|
||||
deriving (Eq, Show)
|
||||
|
||||
newtype JSString = JSONString { fromJSString :: String }
|
||||
deriving (Eq, Show)
|
||||
deriving (Eq)
|
||||
|
||||
instance Show JSString where
|
||||
show (JSONString s) = "\"" ++ s ++ "\""
|
||||
|
||||
toJSString :: String -> JSString
|
||||
toJSString = JSONString
|
||||
|
Loading…
Reference in New Issue
Block a user