2 -- This module deliberately declares orphan instances:
3 {-# OPTIONS_GHC -fno-warn-orphans #-}
5 -----------------------------------------------------------------------------
7 -- Module : Text.Show.Functions
8 -- Copyright : (c) The University of Glasgow 2001
9 -- License : BSD-style (see the file libraries/base/LICENSE)
11 -- Maintainer : libraries@haskell.org
12 -- Stability : provisional
13 -- Portability : portable
15 -- Optional instance of 'Text.Show.Show' for functions:
17 -- > instance Show (a -> b) where
18 -- > showsPrec _ _ = showString \"\<function\>\"
20 -----------------------------------------------------------------------------
22 module Text.Show.Functions () where
27 instance Show (a -> b) where
28 showsPrec _ _ = showString "<function>"
30 instance (Show a,Show b) => Show (a->b) where
31 showsPrec d a = showString "<<function>>"
33 showsType a = showChar '(' . showsType value . showString " -> " .
34 showsType result . showChar ')'
35 where (value,result) = getTypes undefined