Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC

Commits:

1 changed file:

Changes:

  • compiler/GHC/StgToJS/Object.hs
    ... ... @@ -406,12 +406,10 @@ readObjectBlocks file bids = do
    406 406
     --------------------------------------------------------------------------------
    
    407 407
     
    
    408 408
     putEnum :: Enum a => WriteBinHandle -> a -> IO ()
    
    409
    -putEnum bh x | n > 65535 = error ("putEnum: out of range: " ++ show n)
    
    410
    -             | otherwise = put_ bh n
    
    411
    -  where n = fromIntegral $ fromEnum x :: Word16
    
    409
    +putEnum bh x = put_ bh (fromEnum x)
    
    412 410
     
    
    413 411
     getEnum :: Enum a => ReadBinHandle -> IO a
    
    414
    -getEnum bh = toEnum . fromIntegral <$> (get bh :: IO Word16)
    
    412
    +getEnum bh = toEnum <$> (get bh)
    
    415 413
     
    
    416 414
     -- | Helper to convert Int to Int32
    
    417 415
     toI32 :: Int -> Int32