@@ -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
45+ foreign import showStringImpl
46+ "function showStringImpl(s) {\
47+ \ return JSON.stringify(s);\
48+ \}" :: String -> String
45 instance showString :: Show String where
50 instance showString :: Show String where
46− show s = s
51+ show = showStringImpl
48 instance showBoolean :: Show Boolean where
53 instance showBoolean :: Show Boolean where
49 show true = "true"
54 show true = "true"