[Haskell-cafe] how to compile this in yhc?

Thomas Hartman thomas.hartman at db.com
Thu Dec 6 22:03:12 EST 2007

Is there some way to compile the following function in yhc?

works in ghc with glasgow exts deactivated, yhc complains context for 
Prelude.read needed (in final line)

readfloat :: String -> Maybe Float
readfloat x | null parse || not (null leftover) = fail $ "myRead: "++x
            | otherwise = return v
  where parse@((v,leftover):ps) = readsPrec 0 x



This e-mail may contain confidential and/or privileged information. If you 
are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20071206/f544ee7d/attachment.htm

More information about the Haskell-Cafe mailing list