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

thanks!


---

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.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to