[Xmonad] fixing warnings with stricter type?

Donald Bruce Stewart dons at cse.unsw.edu.au
Sat May 26 02:07:01 EDT 2007


droundy:
> Both reasons.
> 
> I know the existing code is safe, but in my opinion pattern match warnings
> usually (often?) show that there's a better way to do things.  In this
> case, having a type for non-empty stacks seems like a good thing, so you
> can then write functions that expicitely rely on this property, the type
> checker (rather than Catch) will ensure that they are never used unsafely.
> Plus, I like the Maybe monad and the pretty things you can do with it.
> Stack+modify looks basically like a poor reimplementation of parts of the
> Maybe module.

I agree with these points. Just working out whether to tackle this
before or after 0.2. I'm inclined to do it after the tag,rather than
risk introducing errors.

-- Don


More information about the Xmonad mailing list