{-# LINE 1 "src/Sound/ALSA/Sequencer/Marshal/Queue.hsc" #-}--------------------------------------------------------------------------------{-# LINE 2 "src/Sound/ALSA/Sequencer/Marshal/Queue.hsc" #-}-- |-- Module : Sound.ALSA.Sequencer.Marshal.Queue-- Copyright : (c) Henning Thielemann, 2010-- (c) Iavor S. Diatchki, 2007-- License : BSD3---- Maintainer: Henning Thielemann-- Stability : provisional---- PRIVATE MODULE.---- Here we have the various types used by the library,-- and how they are imported\/exported to C.---- We use Hsc for expanding C types to Haskell types like Word32.-- However if a C type is translated to Word32-- you should not assume that it is translated to Word32 on every platform.-- On a 64bit machine it may well be Word64.-- Thus you should use our wrapper types whereever possible.--------------------------------------------------------------------------------moduleSound.ALSA.Sequencer.Marshal.Queuewhere{-# LINE 26 "src/Sound/ALSA/Sequencer/Marshal/Queue.hsc" #-}{-# LINE 27 "src/Sound/ALSA/Sequencer/Marshal/Queue.hsc" #-}importqualifiedSound.ALSA.Sequencer.UtilityasUimportqualifiedForeign.C.TypesasCimportForeign.Storable(Storable,sizeOf,alignment,peek,peekByteOff,poke,pokeByteOff,)importData.Array(Ix,)importqualifiedData.WordasWord-- | The type of queue identifiers.newtypeT=ConsWord.Word8{-# LINE 43 "src/Sound/ALSA/Sequencer/Marshal/Queue.hsc" #-}deriving(Eq,Ord,Storable)instanceShowTwhereshowsPrecprec(Consx)=U.showsRecordprec"Queue"[U.showsFieldx]imp::C.CInt->Timpx=Cons(fromIntegralx)exp::T->C.CIntexp(Consx)=fromIntegralxdirect::Tdirect=Cons253{-# LINE 58 "src/Sound/ALSA/Sequencer/Marshal/Queue.hsc" #-}dataSkew=Skew{skewValue::!Word.Word32,{-# LINE 63 "src/Sound/ALSA/Sequencer/Marshal/Queue.hsc" #-}skewBase::!Word.Word32{-# LINE 64 "src/Sound/ALSA/Sequencer/Marshal/Queue.hsc" #-}}deriving(Show,Eq)instanceStorableSkewwheresizeOf_=(8){-# LINE 68 "src/Sound/ALSA/Sequencer/Marshal/Queue.hsc" #-}alignment_=(4){-# LINE 69 "src/Sound/ALSA/Sequencer/Marshal/Queue.hsc" #-}peekp=dov<-(\hsc_ptr->peekByteOffhsc_ptr0)p{-# LINE 70 "src/Sound/ALSA/Sequencer/Marshal/Queue.hsc" #-}b<-(\hsc_ptr->peekByteOffhsc_ptr4)p{-# LINE 71 "src/Sound/ALSA/Sequencer/Marshal/Queue.hsc" #-}returnSkew{skewValue=v,skewBase=b}pokepv=(\hsc_ptr->pokeByteOffhsc_ptr0)p(skewValuev){-# LINE 75 "src/Sound/ALSA/Sequencer/Marshal/Queue.hsc" #-}>>(\hsc_ptr->pokeByteOffhsc_ptr4)p(skewBasev){-# LINE 76 "src/Sound/ALSA/Sequencer/Marshal/Queue.hsc" #-}newtypePosition=Position{unPosition::Word.Word32}deriving(Show,Eq,Ord,Ix,Storable){-# LINE 79 "src/Sound/ALSA/Sequencer/Marshal/Queue.hsc" #-}