|
[ ghc-Bugs-1106171 ] GHCi does not find instances: msg#00070lang.haskell.glasgow.bugs
Bugs item #1106171, was opened at 2005-01-20 18:20 Message generated for change (Comment added) made by simonpj You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1106171&group_id=8032 Category: Compiler Group: 6.4 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: GHCi does not find instances Initial Comment: This report concerns GHC HEAD (6.3) as downloaded from CVS around 2PM on 20 Jan 2005. It seems GHCi does not find some instance declarations. Consider the following trivial example: module Foo where data Foo = Foo instance Show Foo where show Foo = "Foo" When loaded into GHCi, regardless of whether it is first compiled or not, GHCi claims that Foo is not an instance of Show. E.g. Prelude> :load Foo Compiling Foo ( Foo.hs, interpreted ) Ok, modules loaded: Foo. *Foo> show Foo <interactive>:1:0: No instance for (Show Foo) arising from use of `show' at <interactive>:1:0-3 Probable fix: add an instance declaration for (Show Foo) In the definition of `it': it = show Foo *Foo> :i Foo data Foo = Foo -- Defined at Foo.hs:3:5 But Foo is plainly an instance of Show. GHC itself has no problems with this (of course). Best, /Henrik e-mail: nhn@xxxxxxxxxxxxx ---------------------------------------------------------------------- >Comment By: Simon Peyton Jones (simonpj) Date: 2005-01-27 11:53 Message: Logged In: YES user_id=50165 Fixed, thank you ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1106171&group_id=8032
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ ghc-Bugs-1107398 ] internal error: getMBlock: mmap: Invalid argument, SourceForge.net |
|---|---|
| Next by Date: | ghc-6.2.2: internal error: evacuate: strange closure type 64272, Jurandy Martins S. Jr. |
| Previous by Thread: | [ ghc-Bugs-1106171 ] GHCi does not find instances, SourceForge.net |
| Next by Thread: | [ ghc-Bugs-1106211 ] GHC panic, SourceForge.net |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |