git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Fix Show String instance
6ee0094Phil Freeman
prelude/prelude.purs+6−1
@@ -42,8 +42,13 @@ module Prelude where
42 class Show a where
42 class Show a where
43 show :: a -> String
43 show :: a -> String
44
44
45+ foreign import showStringImpl
46+ "function showStringImpl(s) {\
47+ \ return JSON.stringify(s);\
48+ \}" :: String -> String
49+
45 instance showString :: Show String where
50 instance showString :: Show String where
46− show s = s
51+ show = showStringImpl
47
52
48 instance showBoolean :: Show Boolean where
53 instance showBoolean :: Show Boolean where
49 show true = "true"
54 show true = "true"