module InternAtom(internAtomK, internAtomF, internAtom, atomNameK, atomNameF, atomName) where import Command import Event import Xrequest import ResourceIds internAtomK = ia xrequestK internAtomF = ia xrequestF internAtom a e = ia xrequest a e ia rq "FONT" True k = k atom_FONT ia rq atomNm ifExists k = let gotit (GotAtom atom) = Just atom gotit _ = Nothing in rq (InternAtom atomNm ifExists) gotit k atomNameK = an xrequestK atomNameF = an xrequestF atomName a = an xrequest a -- Here we need a Maybe String, so add an extra Just (the inner Just -- is stripped by the fudlogue). an k atom = let gotit (GotAtomName (Just s)) = Just (Just s) gotit _ = Nothing in k (GetAtomName atom) gotit