Permalink
Browse files

Use packedStringToString from UHC.Base

  • Loading branch information...
1 parent 3470947 commit 8445915b05dbbb3c1fc06a29702eb9f6c8cd5c1f @norm2782 norm2782 committed Dec 31, 2011
Showing with 2 additions and 4 deletions.
  1. +2 −4 uhc-jscript/src/Language/UHC/JScript/ECMA/String.hs
@@ -3,6 +3,7 @@
module Language.UHC.JScript.ECMA.String where
import Language.UHC.JScript.Types
+import UHC.Base (packedStringToString)
type JSString = PackedString
@@ -17,10 +18,7 @@ instance FromJS JSString String where
jsStringToString :: JSString -> String
-jsStringToString str
- | primPackedStringNull str = []
- | otherwise = primPackedStringHead str
- : jsStringToString (primPackedStringTail str)
+jsStringToString = packedStringToString
foreign import jscript "primPackedStringNull"
primPackedStringNull :: JSString -> Bool

0 comments on commit 8445915

Please sign in to comment.