Movatterモバイル変換
[0]ホーム
{-# LANGUAGE Trustworthy #-}{-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples #-}{-# OPTIONS_HADDOCK hide #-}------------------------------------------------------------------------------- |-- Module : GHC.Storable-- Copyright : (c) The FFI task force, 2000-2002-- License : see libraries/base/LICENSE---- Maintainer : ffi@haskell.org-- Stability : internal-- Portability : non-portable (GHC Extensions)---- Helper functions for "Foreign.Storable"-------------------------------------------------------------------------------moduleGHC.Storable(readWideCharOffPtr,readIntOffPtr,readWordOffPtr,readPtrOffPtr,readFunPtrOffPtr,readFloatOffPtr,readDoubleOffPtr,readStablePtrOffPtr,readInt8OffPtr,readInt16OffPtr,readInt32OffPtr,readInt64OffPtr,readWord8OffPtr,readWord16OffPtr,readWord32OffPtr,readWord64OffPtr,writeWideCharOffPtr,writeIntOffPtr,writeWordOffPtr,writePtrOffPtr,writeFunPtrOffPtr,writeFloatOffPtr,writeDoubleOffPtr,writeStablePtrOffPtr,writeInt8OffPtr,writeInt16OffPtr,writeInt32OffPtr,writeInt64OffPtr,writeWord8OffPtr,writeWord16OffPtr,writeWord32OffPtr,writeWord64OffPtr)whereimportGHC.Stable(StablePtr(..))importGHC.IntimportGHC.WordimportGHC.PtrimportGHC.BasereadWideCharOffPtr::PtrChar->Int->IOCharreadIntOffPtr::PtrInt->Int->IOIntreadWordOffPtr::PtrWord->Int->IOWordreadPtrOffPtr::Ptr(Ptra)->Int->IO(Ptra)readFunPtrOffPtr::Ptr(FunPtra)->Int->IO(FunPtra)readFloatOffPtr::PtrFloat->Int->IOFloatreadDoubleOffPtr::PtrDouble->Int->IODoublereadStablePtrOffPtr::Ptr(StablePtra)->Int->IO(StablePtra)readInt8OffPtr::PtrInt8->Int->IOInt8readInt16OffPtr::PtrInt16->Int->IOInt16readInt32OffPtr::PtrInt32->Int->IOInt32readInt64OffPtr::PtrInt64->Int->IOInt64readWord8OffPtr::PtrWord8->Int->IOWord8readWord16OffPtr::PtrWord16->Int->IOWord16readWord32OffPtr::PtrWord32->Int->IOWord32readWord64OffPtr::PtrWord64->Int->IOWord64readWideCharOffPtr(Ptra)(I#i)=IO$\s->casereadWideCharOffAddr#aisof(#s2,x#)->(#s2,C#x#)readIntOffPtr(Ptra)(I#i)=IO$\s->casereadIntOffAddr#aisof(#s2,x#)->(#s2,I#x#)readWordOffPtr(Ptra)(I#i)=IO$\s->casereadWordOffAddr#aisof(#s2,x#)->(#s2,W#x#)readPtrOffPtr(Ptra)(I#i)=IO$\s->casereadAddrOffAddr#aisof(#s2,x#)->(#s2,Ptrx#)readFunPtrOffPtr(Ptra)(I#i)=IO$\s->casereadAddrOffAddr#aisof(#s2,x#)->(#s2,FunPtrx#)readFloatOffPtr(Ptra)(I#i)=IO$\s->casereadFloatOffAddr#aisof(#s2,x#)->(#s2,F#x#)readDoubleOffPtr(Ptra)(I#i)=IO$\s->casereadDoubleOffAddr#aisof(#s2,x#)->(#s2,D#x#)readStablePtrOffPtr(Ptra)(I#i)=IO$\s->casereadStablePtrOffAddr#aisof(#s2,x#)->(#s2,StablePtrx#)readInt8OffPtr(Ptra)(I#i)=IO$\s->casereadInt8OffAddr#aisof(#s2,x#)->(#s2,I8#x#)readWord8OffPtr(Ptra)(I#i)=IO$\s->casereadWord8OffAddr#aisof(#s2,x#)->(#s2,W8#x#)readInt16OffPtr(Ptra)(I#i)=IO$\s->casereadInt16OffAddr#aisof(#s2,x#)->(#s2,I16#x#)readWord16OffPtr(Ptra)(I#i)=IO$\s->casereadWord16OffAddr#aisof(#s2,x#)->(#s2,W16#x#)readInt32OffPtr(Ptra)(I#i)=IO$\s->casereadInt32OffAddr#aisof(#s2,x#)->(#s2,I32#x#)readWord32OffPtr(Ptra)(I#i)=IO$\s->casereadWord32OffAddr#aisof(#s2,x#)->(#s2,W32#x#)readInt64OffPtr(Ptra)(I#i)=IO$\s->casereadInt64OffAddr#aisof(#s2,x#)->(#s2,I64#x#)readWord64OffPtr(Ptra)(I#i)=IO$\s->casereadWord64OffAddr#aisof(#s2,x#)->(#s2,W64#x#)writeWideCharOffPtr::PtrChar->Int->Char->IO()writeIntOffPtr::PtrInt->Int->Int->IO()writeWordOffPtr::PtrWord->Int->Word->IO()writePtrOffPtr::Ptr(Ptra)->Int->Ptra->IO()writeFunPtrOffPtr::Ptr(FunPtra)->Int->FunPtra->IO()writeFloatOffPtr::PtrFloat->Int->Float->IO()writeDoubleOffPtr::PtrDouble->Int->Double->IO()writeStablePtrOffPtr::Ptr(StablePtra)->Int->StablePtra->IO()writeInt8OffPtr::PtrInt8->Int->Int8->IO()writeInt16OffPtr::PtrInt16->Int->Int16->IO()writeInt32OffPtr::PtrInt32->Int->Int32->IO()writeInt64OffPtr::PtrInt64->Int->Int64->IO()writeWord8OffPtr::PtrWord8->Int->Word8->IO()writeWord16OffPtr::PtrWord16->Int->Word16->IO()writeWord32OffPtr::PtrWord32->Int->Word32->IO()writeWord64OffPtr::PtrWord64->Int->Word64->IO()writeWideCharOffPtr(Ptra)(I#i)(C#x)=IO$\s->casewriteWideCharOffAddr#aixsofs2->(#s2,()#)writeIntOffPtr(Ptra)(I#i)(I#x)=IO$\s->casewriteIntOffAddr#aixsofs2->(#s2,()#)writeWordOffPtr(Ptra)(I#i)(W#x)=IO$\s->casewriteWordOffAddr#aixsofs2->(#s2,()#)writePtrOffPtr(Ptra)(I#i)(Ptrx)=IO$\s->casewriteAddrOffAddr#aixsofs2->(#s2,()#)writeFunPtrOffPtr(Ptra)(I#i)(FunPtrx)=IO$\s->casewriteAddrOffAddr#aixsofs2->(#s2,()#)writeFloatOffPtr(Ptra)(I#i)(F#x)=IO$\s->casewriteFloatOffAddr#aixsofs2->(#s2,()#)writeDoubleOffPtr(Ptra)(I#i)(D#x)=IO$\s->casewriteDoubleOffAddr#aixsofs2->(#s2,()#)writeStablePtrOffPtr(Ptra)(I#i)(StablePtrx)=IO$\s->casewriteStablePtrOffAddr#aixsofs2->(#s2,()#)writeInt8OffPtr(Ptra)(I#i)(I8#x)=IO$\s->casewriteInt8OffAddr#aixsofs2->(#s2,()#)writeWord8OffPtr(Ptra)(I#i)(W8#x)=IO$\s->casewriteWord8OffAddr#aixsofs2->(#s2,()#)writeInt16OffPtr(Ptra)(I#i)(I16#x)=IO$\s->casewriteInt16OffAddr#aixsofs2->(#s2,()#)writeWord16OffPtr(Ptra)(I#i)(W16#x)=IO$\s->casewriteWord16OffAddr#aixsofs2->(#s2,()#)writeInt32OffPtr(Ptra)(I#i)(I32#x)=IO$\s->casewriteInt32OffAddr#aixsofs2->(#s2,()#)writeWord32OffPtr(Ptra)(I#i)(W32#x)=IO$\s->casewriteWord32OffAddr#aixsofs2->(#s2,()#)writeInt64OffPtr(Ptra)(I#i)(I64#x)=IO$\s->casewriteInt64OffAddr#aixsofs2->(#s2,()#)writeWord64OffPtr(Ptra)(I#i)(W64#x)=IO$\s->casewriteWord64OffAddr#aixsofs2->(#s2,()#)
[8]ページ先頭