Commit 64a61516 authored by ian@well-typed.com's avatar ian@well-typed.com
Browse files

Merge branch 'master' of darcs.haskell.org:/srv/darcs//packages/base

parents 23517dea 2cd51383
......@@ -191,7 +191,7 @@ unsafeDupablePerformIO (IO m) = lazy (case m realWorld# of (# _, r #) -> r)
-- case writeIORef v r s of (# s1, _ #) ->
-- (# s1, r #)
-- The strictness analyser will find that the binding for r is strict,
-- (becuase of uPIO's strictness sig), and so it'll evaluate it before
-- (because of uPIO's strictness sig), and so it'll evaluate it before
-- doing the writeIORef. This actually makes tests/lib/should_run/memo002
-- get a deadlock!
--
......
......@@ -275,7 +275,7 @@ fdToHandle fdint = do
-- on Windows we're guessing this is not a socket (XXX)
False{-is_nonblock-}
-- file descriptors that we get from external sources are
-- not put into non-blocking mode, becuase that would affect
-- not put into non-blocking mode, because that would affect
-- other users of the file descriptor
let fd_str = "<file descriptor: " ++ show fd ++ ">"
mkHandleFromFD fd fd_type fd_str iomode False{-non-block-}
......
......@@ -366,7 +366,7 @@ showLitChar '\t' s = showString "\\t" s
showLitChar '\v' s = showString "\\v" s
showLitChar '\SO' s = protectEsc (== 'H') (showString "\\SO") s
showLitChar c s = showString ('\\' : asciiTab!!ord c) s
-- I've done manual eta-expansion here, becuase otherwise it's
-- I've done manual eta-expansion here, because otherwise it's
-- impossible to stop (asciiTab!!ord) getting floated out as an MFE
showLitString :: String -> ShowS
......
......@@ -41,12 +41,12 @@ local_id x = x -- See Note [Mega-hack for coerce]
{- Note [Meta-hack for coerce]
If we just say
unsafeCoerce x = unsafeCoercs# x
unsafeCoerce x = unsafeCoerce# x
then the simple-optimiser that the desugarer runs will eta-reduce to
unsafeCoerce :: forall (a:*) (b:*). a -> b
unsafeCoercs = unsafeCoerce#
And that, sadly, is ill-typed because unsafeCoercs# has OpenKind type variables
And rightly so, becuase we shouldn't be calling unsafeCoerce# in a higher
And rightly so, because we shouldn't be calling unsafeCoerce# in a higher
order way; it has a compulsory unfolding
unsafeCoerce# a b x = x |> UnsafeCo a b
and we really rely on it being inlined pronto. But the simple-optimiser doesn't.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment