Hi Stephen,
I wasn't aware of Data.Dynamic.
I tried:
viewEvent :: Dynamic -> IO ()
viewEvent event = do
case fromDynamic event of
Nothing -> return ()
Just (Message s) -> putStrLn $ show s
But still got the same error (Ambiguous type variable `t0' in the constraint: (Typeable t0) arising from a use of `fromDynamic')...
Best,
Corentin
Whilst dynamic typing isn't idiomatic for Haskell, it seems like
you've decided you want it. So why not use Data.Dynamic rather than
roll you're own dynamic typing with Typeable?