#1590: Libraries proposal: Add System.Info.isWindows
------------------------------+---------------------------------------------
Reporter: neil | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Not GHC
Component: libraries/base | Version:
Severity: normal | Keywords:
Difficulty: Unknown | Os: Unknown
Testcase: | Architecture: Unknown
------------------------------+---------------------------------------------
Currently the recognised way to test if your application is being run on
Windows is:
{{{
import System.Info
.... = os == "mingw"
}}}
This is wrong on so many levels!
# The return result of os is NOT an operating system
# The result mingw does not imply that mingw is installed
# String comparisons are not very safe, a typo stops this working
# In GHC this comparison will take place at runtime, even though its a
constant
Since nearly all uses of System.Info.os are to check if the operating
system is Windows, adding an explicit isWindows function would simplify
things.
Proposal:
Add System.Info.isWindows :: Bool
This value should return True on all Windows systems (Win 1.0 ... Vista),
and False on all other systems.
Deadline:
2 weeks from the end of discussion. Please discuss on the libraries@
mailing list.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1590>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs