Ticket #158 (closed defect: fixed)
if os(windows) does not work
| Reported by: | duncan | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | Cabal-1.2 |
| Component: | Cabal library | Version: | 1.2.0 |
| Severity: | normal | Keywords: | |
| Cc: | Difficulty: | easy (<4 hours) | |
| GHC Version: | 6.4.2 | Platform: | Linux |
Description
The os condition currently uses the System.Info.os :: String to check if we're on the OS specified. This is bad and wrong since in GHC at least on Windows this string is "mingw32". For configurations it's ok if this works:
if os(mingw32) blah
but it's essential that this works:
if os(windows) blah
At a bare minimum we should add an alias system, such that we can specify windows and solaris rather than the cryptic mingw32 and solaris2. I suggest that comparisons also be case insensetive.
Change History
Note: See
TracTickets for help on using
tickets.
