[project @ 1997-03-14 08:02:40 by simonpj]
[nofib.git] / GHC_ONLY / bugs / lex / Main.hs
1 module Main where
2
3 main = interact ( \ s -> shows (lex' s) "\n")
4 where lex' "" = []
5 lex' s = tok : lex' s' where -- [(tok,s')] = lex s
6 (tok,s') = case lex s of
7 [r] -> r
8 [] -> error ("Empty: " ++ s)
9 other -> error ("Multi: " ++ s)