aboutsummaryrefslogtreecommitdiff
path: root/html-test/src/Bug975.hs
blob: 97ebabda9adb978762313ecda9e1c47d016ac1d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# LANGUAGE ExplicitForAll #-}
module Bug973 where

showRead
  :: forall a b. (Show a, Read b)
  => a -- ^ this gets turned into a string...
  -> b -- ^ ...from which this is read
showRead = read . show

-- | Same as 'showRead', but with type variable order flipped
showRead'
  :: forall b a. (Show a, Read b)
  => a -- ^ this gets turned into a string...
  -> b -- ^ ...from which this is read
showRead' = read . show