Library proposal: Add System.Info.isWindows
Duncan Coutts
duncan.coutts at worc.ox.ac.uk
Wed Aug 15 12:57:38 EDT 2007
On Wed, 2007-08-15 at 16:49 +0100, Ian Lynagh wrote:
> On Wed, Aug 15, 2007 at 03:40:56PM +0100, Neil Mitchell wrote:
> >
> > 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)
>
> We probably ought to have one, because sooner or later someone is bound
> to want to use OSFlavour as a map key or something.
> And Show, Read, Data and Typeable too.
Yes, Eq, Ord, Show and Read.
I'm not sure it's possible to make it an instance of Data or Typeable is
it? Doesn't that require a dependency on the generics package but
System.Info is in the base package.
Is everyone ok with the type name? OSFlavour, OSKind, OSType ? We can't
use OSName since it's not that specific.
Duncan
More information about the Libraries
mailing list