I'm wrinting (or at least, trying to write) an Alex lexer. Say I want to group character ranges together and specify that I want a character that is *not* in any of those ranges. Example

---

 {
module Main where
}

%wrapper "posn-bytestring"

$lowAscii = \x00-\x1f -- unprintable stuff
$lowSymbol = \x21-\x2f -- exclamation point to solidus
$space = \x20

$special = [^$lowAscii $lowSymbol]

lex :-

$special { Word }

{
data Token = Word AlexPosn ByteString.ByteString
}

When I run this through Alex, I get "Prelude.Enum.Char.pred: bad argument".

What am I doing wrong? How would I accomplish this sort of thing? Thanks. --Omari