{-# LINE 1 "src/Sound/ALSA/Sequencer/Marshal/Sequencer.hsc" #-}
module Sound.ALSA.Sequencer.Marshal.Sequencer where
import qualified Foreign.C.Types as C
import Foreign.Ptr (Ptr, )
class OpenMode mode where expOpenMode :: mode -> C.CInt
class OpenMode mode => AllowInput mode where
class OpenMode mode => AllowOutput mode where
data OutputMode = OutputMode deriving (Int -> OutputMode -> ShowS
[OutputMode] -> ShowS
OutputMode -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OutputMode] -> ShowS
$cshowList :: [OutputMode] -> ShowS
show :: OutputMode -> String
$cshow :: OutputMode -> String
showsPrec :: Int -> OutputMode -> ShowS
$cshowsPrec :: Int -> OutputMode -> ShowS
Show)
data InputMode = InputMode deriving (Int -> InputMode -> ShowS
[InputMode] -> ShowS
InputMode -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InputMode] -> ShowS
$cshowList :: [InputMode] -> ShowS
show :: InputMode -> String
$cshow :: InputMode -> String
showsPrec :: Int -> InputMode -> ShowS
$cshowsPrec :: Int -> InputMode -> ShowS
Show)
data DuplexMode = DuplexMode deriving (Int -> DuplexMode -> ShowS
[DuplexMode] -> ShowS
DuplexMode -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DuplexMode] -> ShowS
$cshowList :: [DuplexMode] -> ShowS
show :: DuplexMode -> String
$cshow :: DuplexMode -> String
showsPrec :: Int -> DuplexMode -> ShowS
$cshowsPrec :: Int -> DuplexMode -> ShowS
Show)
instance OpenMode OutputMode where expOpenMode :: OutputMode -> CInt
expOpenMode OutputMode
_ = CInt
1
{-# LINE 37 "src/Sound/ALSA/Sequencer/Marshal/Sequencer.hsc" #-}
instance OpenMode InputMode where expOpenMode _ = 2
{-# LINE 38 "src/Sound/ALSA/Sequencer/Marshal/Sequencer.hsc" #-}
instance OpenMode DuplexMode where expOpenMode _ = 3
{-# LINE 39 "src/Sound/ALSA/Sequencer/Marshal/Sequencer.hsc" #-}
instance AllowOutput OutputMode where
instance AllowOutput DuplexMode where
instance AllowInput InputMode where
instance AllowInput DuplexMode where
data BlockMode = Block
| Nonblock
deriving (Int -> BlockMode -> ShowS
[BlockMode] -> ShowS
BlockMode -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BlockMode] -> ShowS
$cshowList :: [BlockMode] -> ShowS
show :: BlockMode -> String
$cshow :: BlockMode -> String
showsPrec :: Int -> BlockMode -> ShowS
$cshowsPrec :: Int -> BlockMode -> ShowS
Show,BlockMode -> BlockMode -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BlockMode -> BlockMode -> Bool
$c/= :: BlockMode -> BlockMode -> Bool
== :: BlockMode -> BlockMode -> Bool
$c== :: BlockMode -> BlockMode -> Bool
Eq)
expBlockMode :: BlockMode -> C.CInt
expBlockMode :: BlockMode -> CInt
expBlockMode BlockMode
x = case BlockMode
x of
BlockMode
Block -> CInt
0
BlockMode
Nonblock -> CInt
1
{-# LINE 55 "src/Sound/ALSA/Sequencer/Marshal/Sequencer.hsc" #-}
newtype T mode = Cons (Ptr Core) deriving T mode -> T mode -> Bool
forall mode. T mode -> T mode -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: T mode -> T mode -> Bool
$c/= :: forall mode. T mode -> T mode -> Bool
== :: T mode -> T mode -> Bool
$c== :: forall mode. T mode -> T mode -> Bool
Eq
data Core