@@ -40,7 +40,7 @@ import Control.Monad(when)
4040import Control.Monad.State (State ,runState ,execState ,get ,put ,modify )
4141import Data.Array.IArray (Array ,array )
4242import Data.Char (toLower ,toUpper ,isAlpha ,ord )
43- import Data.List ( foldl' )
43+ import qualified Data.List as List
4444import Data.IntMap (IntMap )
4545import qualified Data.IntMap as IMap (toAscList ,null ,unionWith ,singleton ,fromList ,fromDistinctAscList )
4646import Data.IntMap.CharMap2 (CharMap (.. ))
@@ -139,15 +139,15 @@ listTestInfo qt s = execState (helper qt) s
139139-- processing Or.
140140applyNullViews :: NullView -> QT -> QT
141141applyNullViews [] win = win
142- applyNullViews nvs win = foldl' (dominate win) qtlose (reverse $ cleanNullView nvs) where
142+ applyNullViews nvs win = List. foldl' (dominate win) qtlose (reverse $ cleanNullView nvs)
143143
144144-- This is used to prefer to view "win" through NullView. Losing is
145145-- replaced by the plain win. This is employed by Star patterns to
146146-- express that the first iteration is allowed to match null, but
147147-- skipping the NullView occurs if the match fails.
148148preferNullViews :: NullView -> QT -> QT
149149preferNullViews [] win = win
150- preferNullViews nvs win = foldl' (dominate win) win (reverse $ cleanNullView nvs) where
150+ preferNullViews nvs win = List. foldl' (dominate win) win (reverse $ cleanNullView nvs)
151151
152152{-
153153dominate is common to applyNullViews and preferNullViews above.
0 commit comments