@@ -49,7 +49,7 @@ data Attr = Attr
49 { attrStyle :: !(MaybeDefault Style)
49 { attrStyle :: !(MaybeDefault Style)
50 , attrForeColor :: !(MaybeDefault Color)
50 , attrForeColor :: !(MaybeDefault Color)
51 , attrBackColor :: !(MaybeDefault Color)
51 , attrBackColor :: !(MaybeDefault Color)
52− } deriving ( Eq, Show )
52+ } deriving ( Eq, Show, Read )
54-- This could be encoded into a single 32 bit word. The 32 bit word is first divided
54-- This could be encoded into a single 32 bit word. The 32 bit word is first divided
55-- into 4 groups of 8 bits where: The first group codes what action should be taken with regards to
55-- into 4 groups of 8 bits where: The first group codes what action should be taken with regards to
@@ -103,10 +103,11 @@ data FixedAttr = FixedAttr
103data MaybeDefault v where
103data MaybeDefault v where
104 Default :: MaybeDefault v
104 Default :: MaybeDefault v
105 KeepCurrent :: MaybeDefault v
105 KeepCurrent :: MaybeDefault v
106− SetTo :: forall v . ( Eq v, Show v ) => !v -> MaybeDefault v
106+ SetTo :: forall v . ( Eq v, Show v, Read v ) => !v -> MaybeDefault v
108deriving instance Eq v => Eq (MaybeDefault v)
108deriving instance Eq v => Eq (MaybeDefault v)
109deriving instance Eq v => Show (MaybeDefault v)
109deriving instance Eq v => Show (MaybeDefault v)
110+deriving instance (Eq v, Show v, Read v) => Read (MaybeDefault v)
111instance Eq v => Monoid ( MaybeDefault v ) where
112instance Eq v => Monoid ( MaybeDefault v ) where
112 mempty = KeepCurrent
113 mempty = KeepCurrent