What about :
sffi :: (Integral a,Num a) => Integer -> Maybe a
sffi n = go n (fromInteger n)
where
go a b | toInteger b == a = Just b
| otherwise = Nothing
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090408/7a56d906/attachment.htm