[Xmonad] xmonad is a zipper
Donald Bruce Stewart
dons at cse.unsw.edu.au
Fri May 18 00:34:58 EDT 2007
ndmitchell:
> Hi
>
> >> * new relies on the Integral type having sensible semantics, if you
> >> pass Int or Integer its fine (machine checked), but if you create a
> >> crazy type, make it an instance of Integral then [0..n-1] may generate
> >> no elements, and your (h:t) match will fail.
> >
> >Tricky.
>
> You can fix this with:
>
> where (h:ts) = Workspace 0 Empty : [ Workspace i Empty | i <- [1 ..n-1]]
Yep. I was referring more to the fact that funny instances can lead to
funny enumFromTos. instances can be evil!
-- Don
More information about the Xmonad
mailing list