[Haskell-cafe] Typeable and Dynamic

Luke Palmer lrpalmer at gmail.com
Tue Nov 4 03:27:18 EST 2008

On Mon, Nov 3, 2008 at 7:55 PM, minh thu <noteed at gmail.com> wrote:
> Well, it seems you can't really write
> (fromJust . fromDynamic) someDynamic
> without giving the type of what you expect.

Well not by itself.  But context will usually determine the type.  For example:

   putStrLn . fromJust . fromDynamic $ someDynamic

Will happily infer that it should cast to a String.


More information about the Haskell-Cafe mailing list