Thanks! I have a problem though. I read about automatic derivation of an NFData instance. I have GHC version 7.10.2. I tried the code below, but I getCan't make a derived instance of Generic RawMidiEventYou need DeriveGeneric to derive an instance of this class.In the data declaration for 'RawMidiEvent'{-# LANGUAGE DeriveGeneric, DeriveAnyClass #-} import GHC.Generics (Generic) import Control.DeepSeq data RawMidiEvent = RawMidiEvent { rmeStream :: Int , rmeChan :: Int , rmeStatus :: Int , rmeData1 :: Int , rmeData2 :: Int } deriving (Show,Eq,Generic,NFData)