[Haskell-cafe] A newbie question ?

zaxis z_axis at 163.com
Tue Apr 27 20:17:55 EDT 2010


newtype TypeMap = TypeMap (Map.Map TypeRep Dynamic)

lookup :: Typeable a => TypeMap -> Maybe a
lookup (TypeMap mp) = res
    where res = liftM (fromJust . fromDynamic) $ Map.lookup (typeOf $
fromJust res) mp

It seems that the `res` in  `fromJust res`  has not been defined ?

Sincerely!

-----
fac n = let {  f = foldr (*) 1 [1..n] } in f 
-- 
View this message in context: http://old.nabble.com/A-newbie-question---tp28383563p28383563.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.



More information about the Haskell-Cafe mailing list