[Haskell-beginners] Defining ExtensionClass (Maybe a) instance in xmonad.
allbery.b at gmail.com
Mon Jan 19 14:55:40 UTC 2015
On Mon, Jan 19, 2015 at 8:01 AM, Dmitriy Matrosov <sgf.dma at gmail.com> wrote:
> I've tried to define (Maybe a) instance for ExtensionClass from
> in such way, that extensionType value would use the same data constructor
> was used for the type a itself. But the code below typechecks only, if i
> (Show a) and (Read a) constraints to (Maybe a) instance definition, what
> such definition useless for types, which do not have these instances and do
> not want to use PersistentExtension .
ExtensionClass data is stored in the layout and therefore requires those
constraints. No, there is no magic to cause non-persistent ExtensionClass
data to be stored in some other place different from where the rest of it
I'm also wondering how much trouble you can get into by conflicting with
some other ExtensionClass that already uses Maybe.
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners