resolving Show instance

Serge D. Mechveliani mechvel at botik.ru
Thu Jun 30 07:29:28 EDT 2005


Now I see that, probably, GHC is correct. Thank you.


On  Jun 30, 2005, Simon Peyton-Jones wrote:

> path gets the inferred type
> 	path :: forall a. [a]
> 
> This polymorphic type is instantiated once when it is passed to
> 'subterm' and again, quite separately, when it is passed to 'shows'.


> | Who knows, please, why does there happen, now and then, the effects
> | of the following kind?
> | [..]
> | The  ghc-6-4-branch-June-15-2005  compiler cannot resolve the  Show
> | instances in the following program
> | (using overlapping and `undecidable' instances):
> | 
> | -------------------------------------------
> | import Dumatel
> | main = putStr (shows path $  shows (subterm path t) "\n")
> |   where
> |   [..]
> |   t = [..]
> | 
> |   path = []   -- :: SubtermPath
> | -------------------------------------------


More information about the Glasgow-haskell-users mailing list