X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fdocs%2Fusers_guide%2Fghci.sgml;h=3e900c4b33a25f27c002c1f96cf14c0edd5f9ddb;hb=accc1381a865f51ad866e6b7c4bc927f1b7aacb7;hp=6c65538105b9cad2474cf64261477279492b9f4f;hpb=de3d76441c7f1366692c33027059b1a3f7999bc2;p=ghc-hetmet.git diff --git a/ghc/docs/users_guide/ghci.sgml b/ghc/docs/users_guide/ghci.sgml index 6c65538..3e900c4 100644 --- a/ghc/docs/users_guide/ghci.sgml +++ b/ghc/docs/users_guide/ghci.sgml @@ -525,7 +525,7 @@ Wed Mar 14 12:23:13 GMT 2001 - + Invoking GHCi invokingGHCi @@ -1109,8 +1109,31 @@ Prelude> :set -fno-glasgow-exts properly with GHC's concurrency model. - + + After using getContents, I can't use + stdin again until I do + :load or :reload. + + + This is the defined behaviour of + getContents: it puts the stdin Handle in + a state known as semi-closed, wherein + any further I/O operations on it are forbidden. Because I/O + state is retained between computations, the semi-closed + state persists until the next :load or + :reload command. + + You can make stdin reset itself + after every evaluation by giving GHCi the command + :set +r. This works because + stdin is just a top-level expression that + can be reverted to its unevaluated state in the same way as + any other top-level expression (CAF). + + + +