Commit 83484a68 authored by Benjamin Hodgson's avatar Benjamin Hodgson Committed by Ben Gamari
Browse files

Fix two typos in the ImpredicativeTypes user guide

parent 8f19c65c
...@@ -10596,13 +10596,13 @@ consistently, or working the same in subsequent releases. See ...@@ -10596,13 +10596,13 @@ consistently, or working the same in subsequent releases. See
:ghc-wiki:`this wiki page <ImpredicativePolymorphism>` for more details. :ghc-wiki:`this wiki page <ImpredicativePolymorphism>` for more details.
   
If you want impredicative polymorphism, the main workaround is to use a If you want impredicative polymorphism, the main workaround is to use a
newtype wrapper. The ``id runST`` example can be written using theis newtype wrapper. The ``id runST`` example can be written using this
workaround like this: :: workaround like this: ::
   
runST :: (forall s. ST s a) -> a runST :: (forall s. ST s a) -> a
id :: forall b. b -> b id :: forall b. b -> b
   
nwetype Wrap a = Wrap { unWrap :: (forall s. ST s a) -> a } newtype Wrap a = Wrap { unWrap :: (forall s. ST s a) -> a }
   
foo :: (forall s. ST s a) -> a foo :: (forall s. ST s a) -> a
foo = unWrap (id (Wrap runST)) foo = unWrap (id (Wrap runST))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment