Change some uses of CString functions to CAString instead
[ghc-base.git] / GHC / IO / Encoding / UTF16.hs
index c3b3847..5cc55f5 100644 (file)
@@ -57,7 +57,8 @@ import GHC.Show
 import GHC.Ptr
 
 puts :: String -> IO ()
-puts s = do withCStringLen (s++"\n") $ \(p,len) -> 
+ -- In reality should be withCString, but assume ASCII to avoid possible loop
+puts s = do withCAStringLen (s++"\n") $ \(p,len) ->
                 c_write 1 (castPtr p) (fromIntegral len)
             return ()
 #endif