Movatterモバイル変換
[0]ホーム
{-# LANGUAGE MagicHash, NoImplicitPrelude, UnboxedTuples #-}moduleGHC.Event.Arr(Arr(..),new,size,read,write)whereimportGHC.Base(($))importGHC.Prim(MutableArray#,RealWorld,newArray#,readArray#,sizeofMutableArray#,writeArray#)importGHC.Types(IO(..),Int(..))dataArra=Arr(MutableArray#RealWorlda)new::a->Int->IO(Arra)newdefval(I#n#)=IO$\s0#->casenewArray#n#defvals0#of(#s1#,marr##)->(#s1#,Arrmarr##)size::Arra->Intsize(Arra)=I#(sizeofMutableArray#a)read::Arra->Int->IOaread(Arra)(I#n#)=IO$\s0#->casereadArray#an#s0#of(#s1#,val#)->(#s1#,val#)write::Arra->Int->a->IO()write(Arra)(I#n#)val=IO$\s0#->casewriteArray#an#vals0#ofs1#->(#s1#,()#)
[8]ページ先頭