Library proposal: Add System.Info.isWindows

Neil Mitchell ndmitchell at
Wed Aug 15 10:40:56 EDT 2007


By modifying your proposal ever so slightly (and probably as you
intended anyway):

> data OSFlavour = Linux | Windows | MacOS | BSD | Solaris | Other String
>                           deriving Eq

(who wants to add an Ord instance? then we can really debate whether
Windows > Linux or vice versa)

Now we have (== Windows) which is only a few additional characters
over isWindows, so is quite sufficient. Adding any further fields to
the Windows constructor would destroy this nice property.



More information about the Libraries mailing list