I'm trying to run the BinaryDerive.hs script as per the instructions in the Data.Binary doc, which states:
To derive the instance for a type, load this script into GHCi, and bring your type into scope. Your type can then have its Binary instances derived as follows:
$ ghci -fglasgow-exts BinaryDerive.hs
*BinaryDerive> :l Example.hs
*Main> deriveM (undefined :: Drinks)
However when I try to follow those instructions I get:
c:\Scripts\Haskell>$ ghci -fglasgow-exts BinaryDerive.hs
*BinaryDerive> :l TemperatureRecord.hs
[1 of 1] Compiling TemperatureRecord (TemperatureRecord.hs, interpreted )Ok, modules loaded:TemperatureRecord.
*TemperatureRecord> deriveM (undefined :: TemperatureRecord)
(interactive):1:0: Not in scope: 'deriveM'
I am assuming that there is an additional step that was not specified that a beginner, like myself would not be aware of. It seems the root of the problem is that loading the TemperatureRecord takes BinaryDerive out of scope. Anyone have any ideas?