+ -- my words is mainly copied from Data.List.
+ -- difference abc::def is split into three words instead of one.
+ -- We should really be lexing Haskell properly here rather
+ -- than using hacks like this. In the future we expect hasktags
+ -- to be replaced by something using the GHC API.
+ mywords :: String -> [String]
+ mywords (':':':':xs) = "::" : mywords xs
+ mywords s = case dropWhile isSpace s of
+ "" -> []
+ s' -> w : mywords s''
+ where (w, s'') = myBreak s'
+ myBreak [] = ([],[])
+ myBreak (':':':':xs) = ([], "::"++xs)
+ myBreak (' ':xs) = ([],xs);
+ myBreak (x:xs) = let (a,b) = myBreak xs
+ in (x:a,b)