|
showing Handle is impure: msg#00038lang.haskell.glasgow.bugs
The `shows` function for type `Handle` is inappropriately impure. In my opinion, showing a handle should merely identify it as a handle and distinguish it from other handles. The information currently provided by showing a handle should be provided with some other function; that function should be in the IO monad. swan(102)% ghci ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 5.04.3, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/ \____/\/ /_/\____/|_| Type :? for help. Loading package base ... linking ... done. Loading package haskell98 ... linking ... done. Prelude> :m IO Prelude IO> h <- openFile "/dev/null" ReadMode Prelude IO> h {loc=/dev/null,type=readable,binary=False,buffering=block (8192)} Prelude IO> c <- hGetContents h Prelude IO> h {closed}
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ ghc-Bugs-771633 ] GHCi removes source files!!, SourceForge.net |
|---|---|
| Next by Date: | [ ghc-Bugs-772251 ] Panic (non-exhaustive pattern in compiler), SourceForge.net |
| Previous by Thread: | [ ghc-Bugs-771633 ] GHCi removes source files!!, SourceForge.net |
| Next by Thread: | [ ghc-Bugs-772251 ] Panic (non-exhaustive pattern in compiler), SourceForge.net |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |