|
[ ghc-Bugs-1156554 ] GHCi: No instance for (Show (IO ())): msg#00087lang.haskell.glasgow.bugs
Bugs item #1156554, was opened at 2005-03-04 10:03 Message generated for change (Settings changed) made by simonpj You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1156554&group_id=8032 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: GHCi Group: 6.4 >Status: Closed >Resolution: Fixed Priority: 4 Submitted By: Simon Marlow (simonmar) Assigned to: Nobody/Anonymous (nobody) Summary: GHCi: No instance for (Show (IO ())) Initial Comment: >From Wolfgang Thaller: This behaviour (from today's stable branch) is slightly confusing: > Prelude> print id > > Top level: > No instance for (Show (IO ())) > arising from use of `print' at Top level > Probable fix: add an instance declaration for (Show (IO ())) > In a 'do' expression: print it > > <interactive>:1:0: > No instance for (Show (a -> a)) > arising from use of `print' at <interactive>:1:0-4 > Probable fix: add an instance declaration for (Show (a -> a)) > In the definition of `it': it = print id The second message makes sense, but the first one doesn't. Also, what's the difference between "Top level" and "<interactive>:1:0"? ---------------------------------------------------------------------- >Comment By: Simon Peyton Jones (simonpj) Date: 2005-05-20 12:31 Message: Logged In: YES user_id=50165 Finally fixed. ---------------------------------------------------------------------- Comment By: Simon Marlow (simonmar) Date: 2005-04-29 09:52 Message: Logged In: YES user_id=48280 Futher to this bug report, here's another expression that gives a terrible error message: Prelude Random> randomRIO (1,2) Top level: No instance for (Show (IO a)) arising from use of `print' at Top level Probable fix: add an instance declaration for (Show (IO a)) In a 'do' expression: print it ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1156554&group_id=8032
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re[2]: Feature request: Windows ZIP Distribution, Bulat Ziganshin |
|---|---|
| Next by Date: | [ ghc-Bugs-1205210 ] :i wrongly claims "Imported from ...", SourceForge.net |
| Previous by Thread: | [ ghc-Bugs-1205210 ] :i wrongly claims "Imported from ...", SourceForge.net |
| Next by Thread: | [ ghc-Bugs-1205611 ] Too many seq's (in external core), SourceForge.net |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |