                return (proportion, diff, timestamp)
                     | otherwise = Nothing
 
-eventParseSeek :: Event
+eventParseSeek :: EventClass event
+               => event
                -> Maybe (Double, Format, [SeekFlags], SeekType, Int64, SeekType, Int64)
 eventParseSeek event | eventType event == EventSeek =
     Just $ unsafePerformIO $ alloca $ \ratePtr ->
         alloca $ \formatPtr -> alloca $ \flagsPtr ->
             alloca $ \startTypePtr -> alloca $ \startPtr ->
                 alloca $ \stopTypePtr -> alloca $ \stopPtr ->
-                    do {# call event_parse_seek #} event
+                    do {# call event_parse_seek #} (toEvent event)
                                                    ratePtr
                                                    formatPtr
                                                    flagsPtr

                       return (update, rate, appliedRate, format, start, stop, position)
                           | otherwise = Nothing

eventParseQOS :: Event
              -> Maybe (Double, ClockTimeDiff, ClockTime)
eventParseQOS event | eventType event == EventQOS =
    Just $ unsafePerformIO $ alloca $ \proportionPtr ->
        alloca $ \diffPtr -> alloca $ \timestampPtr ->
            do {# call event_parse_qos #} event
                                          proportionPtr
                                          diffPtr
                                          timestampPtr

                       return (rate, format, flags, startType, start, stopType, stop)
                     | otherwise = Nothing

eventParseTag :: EventClass event
              => event
              -> Maybe TagList
eventParseTag event | eventType event == EventTag =
    Just $ unsafePerformIO $ alloca $ \tagListPtr ->
        do {# call event_parse_tag #} (toEvent event) (castPtr tagListPtr)
           peek tagListPtr >>= peekTagList
                    | otherwise = Nothing

eventTypeGetName :: EventType
                 -> String
