shithub: MicroHs

Download patch

ref: 32fdb8d75bd21d01616655acfbbcb3d2e66dc18c
parent: c2fcd07fb11ed785132e3d33df0e69cedc9541e7
author: Lennart Augustsson <lennart.augustsson@epicgames.com>
date: Sat Apr 13 14:39:08 EDT 2024

Better error message.

--- a/ghc/System/IO/Serialize.hs
+++ b/ghc/System/IO/Serialize.hs
@@ -9,6 +9,7 @@
   readSerialized,
   ) where
 --import System.IO
+import GHC.Stack
 
 {-
 hSerialize   :: forall a . Handle -> a -> IO ()
@@ -19,10 +20,10 @@
 writeSerialized = errghc
 -}
 
-writeSerializedCompressed :: forall a . FilePath -> a -> IO ()
+writeSerializedCompressed :: forall a . HasCallStack => FilePath -> a -> IO ()
 writeSerializedCompressed = errghc
-readSerialized :: forall a . FilePath -> IO a
+readSerialized :: forall a . HasCallStack => FilePath -> IO a
 readSerialized = errghc
 
-errghc :: a
+errghc :: HasCallStack => a
 errghc = error "System.IO.System: serialization not available with ghc"
--