<div dir="ltr"><br>​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 get<div><br></div><div>Can't make a derived instance of Generic RawMidiEvent</div><div>  You need DeriveGeneric to derive an instance of this class. </div><div>In the data declaration for 'RawMidiEvent'<br><div><br></div><div><br></div><div><pre style="margin-top:0.8em;margin-bottom:0.8em;padding:0.25em;overflow:auto;border-bottom-width:0.25em;border-bottom-style:solid;border-bottom-color:white;background:rgb(229,237,244)"><font color="#000000"><span style="font-size:13px;line-height:16.12px">{-# 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)
<br></span></font></pre><pre style="margin-top:0.8em;margin-bottom:0.8em;padding:0.25em;line-height:16.12px;overflow:auto;border-bottom-width:0.25em;border-bottom-style:solid;border-bottom-color:white;color:rgb(0,0,0);font-size:13px;background:rgb(229,237,244)"><br></pre></div></div></div>