1 {-# OPTIONS_GHC -fno-warn-orphans #-}
2 -----------------------------------------------------------------------------
4 -- Module : Text.Show.Functions
5 -- Copyright : (c) The University of Glasgow 2001
6 -- License : BSD-style (see the file libraries/base/LICENSE)
8 -- Maintainer : libraries@haskell.org
9 -- Stability : provisional
10 -- Portability : portable
12 -- Optional instance of 'Text.Show.Show' for functions:
14 -- > instance Show (a -> b) where
15 -- > showsPrec _ _ = showString \"\<function\>\"
17 -----------------------------------------------------------------------------
19 module Text.Show.Functions () where
24 instance Show (a -> b) where
25 showsPrec _ _ = showString "<function>"
27 instance (Show a,Show b) => Show (a->b) where
28 showsPrec d a = showString "<<function>>"
30 showsType a = showChar '(' . showsType value . showString " -> " .
31 showsType result . showChar ')'
32 where (value,result) = getTypes undefined