1 module FAcheat 2 3 ( cheat 4 ) 5 6 where 7 8 9 import Set 10 import FiniteMap 11 12 import TA 13 import FAtypes 14 15 import Stuff 16 17 18 -------------------------------------------------------------------- 19 20 -- we cheat a bit. the constructor 21 -- is acutally given as trivial automaton 22 23 cheat :: TNFA Int -> TCon 24 cheat (TNFA cons all starts moves) = 25 let prod = setToList (starts `bind` lookupset moves) 26 in if length prod /= 1 27 then error "cheat.prod" 28 else 29 let [t] = prod; tc = stcon t 30 in if tconarity tc /= 0 31 then error "timesTNFApublic.tc" 32 else tc