module Sound.ALSA.Sequencer.Marshal.QuerySubscribe where #include import Foreign.C.Types (CInt, ) data Type = Read | Write deriving (Show, Eq, Ord, Enum) expType :: Type -> CInt expType t = case t of Read -> #{const SND_SEQ_QUERY_SUBS_READ} Write -> #{const SND_SEQ_QUERY_SUBS_WRITE} impType :: CInt -> Type impType t = case t of #{const SND_SEQ_QUERY_SUBS_READ} -> Read #{const SND_SEQ_QUERY_SUBS_WRITE} -> Write _ -> error ("QuerySubscribe.impType: unknown subscription type (" ++ show t ++ ")")