Segmentation fault in fromMessage

I'm defining a LayoutModifier which handles a message:
data SLS sl a = SLS !String !(Maybe ScreenId) !sl !Bool deriving (Show,Read) data SLSSetScreen = SLSSS (Maybe String) (Maybe ScreenId) deriving (Show,Read,Typeable) instance Message SLSSetScreen instance (Read (sl a), LayoutClass sl a) => LLM.LayoutModifier (SLS (sl a)) a where -- ... handleMess (SLS t _ sl _) m | Just (SLSSS mt mns) <- fromMessage m = do io $ putStrLn (show mt) return Nothing
Sending this a message like so triggers a segmentation fault:
broadcastMessage (SLSSS (Just "foo") (Just 0))
The fault occurs within Maybe's show function, according to gdb, but beyond that I'm not sure what to test. At least this trivial round-trip gives the correct results at a GHCI prompt or when compiled:
let x :: Maybe SLSSetScreen = fromMessage $ SomeMessage (SLSSS (Just "") (Just 0)) in show x
This is using a stock Debian GHC
The Glorious Glasgow Haskell Compilation System, version 6.12.1 and a few patches to xmonad (notably, to enable the threaded runtime, but I only spawn off threads that manipulate MVars, nothing near X11 nor this particular component; the full set of patches can be seen at https://github.com/nwf/xconfig/blob/0069880d1389b6e94fa2254073a6b8fb80f9b827... and https://github.com/nwf/xconfig/blob/0069880d1389b6e94fa2254073a6b8fb80f9b827... )
Any help would be greatly appreciated. Thanks much. --nwf;

Following up to self (sorry). It appears to be an issue with hint -- I was using XMonad.Prompt.Eval to do the broadcastMessage. I'll take it over there.
participants (1)
-
Nathaniel Filardo