Changeset 4803 for src/Pugs/Internals.hs

Show
Ignore:
Timestamp:
06/18/05 18:16:54 (4 years ago)
Author:
autrijus
svk:copy_cache_prev:
6617
Message:

* make all our monomorphic function types explicitly Show'able,

to ease debugging and enforce thorough Typeableness..

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Internals.hs

    r4153 r4803  
    127127instance Show Unique where 
    128128    show = show . hashUnique 
    129 instance Show (a -> b) where 
    130     show _ = "(->)" 
     129instance (Typeable a, Typeable b) => Show (a -> b) where 
     130    show _ = "(" ++ typA ++ " -> " ++ typB ++ ")" 
     131        where 
     132        typA = show $ typeOf (undefined :: a) 
     133        typB = show $ typeOf (undefined :: b) 
    131134instance Eq (a -> b) where 
    132135    _ == _ = False