[Haskell-beginners] strict evaluation and MIDI playback
Dennis Raddle
dennis.raddle at gmail.com
Fri Nov 6 23:27:42 UTC 2015
Never mind, I realized that I use the pragma incorrectly -- it wasn't at
the top of the module.
On Fri, Nov 6, 2015 at 3:26 PM, Dennis Raddle <dennis.raddle at gmail.com>
wrote:
>
> 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
>
> Can't make a derived instance of Generic RawMidiEvent
> You 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)
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20151106/0da39b15/attachment-0001.html>
More information about the Beginners
mailing list