aboutsummaryrefslogblamecommitdiff
path: root/html-test/src/Bug975.hs
blob: e55385c542a56a5734c999f4c0b80faae313a523 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
                            













                                                             
{-# LANGUAGE Haskell2010 #-}
{-# 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