-import GHC.Real( rem, Ratio )
-import GHC.IOBase
-import GHC.ST -- So we can give Typeable instance for ST
-import GHC.Ptr -- So we can give Typeable instance for Ptr
-import GHC.Stable -- So we can give Typeable instance for StablePtr
+import GHC.Real ( rem, Ratio )
+import GHC.IOBase (IORef,newIORef,unsafePerformIO)
+
+-- These imports are so we can define Typeable instances
+-- It'd be better to give Typeable instances in the modules themselves
+-- but they all have to be compiled before Typeable
+import GHC.IOBase ( IO, MVar, Exception, ArithException, IOException,
+ ArrayException, AsyncException, Handle )
+import GHC.ST ( ST )
+import GHC.STRef ( STRef )
+import GHC.Ptr ( Ptr, FunPtr )
+import GHC.ForeignPtr ( ForeignPtr )
+import GHC.Stable ( StablePtr, newStablePtr, freeStablePtr,
+ deRefStablePtr, castStablePtrToPtr,
+ castPtrToStablePtr )
+import GHC.Exception ( block )
+import GHC.Arr ( Array, STArray )
+