@@ -368,12 +368,20 @@ toPat reflect tc tms = evalState (mapM (\x -> toPat' x []) tms) []
368-- | tc = return $ PCon (UN "Integer") 6 []
368-- | tc = return $ PCon (UN "Integer") 6 []
369-- toPat' (Constant (AType (ATInt (ITFixed n)))) []
369-- toPat' (Constant (AType (ATInt (ITFixed n)))) []
370-- | tc = return $ PCon (UN (fixedN n)) (7 + fromEnum n) [] -- 7-10 inclusive
370-- | tc = return $ PCon (UN (fixedN n)) (7 + fromEnum n) [] -- 7-10 inclusive
371 toPat' (P Bound n ty) [] = -- trace (show (n, ty)) $
373 toPat' (P Bound n ty) [] = -- trace (show (n, ty)) $
372 do ns <- get
374 do ns <- get
373 if n `elem` ns
375 if n `elem` ns
374 then return PAny
376 then return PAny
375 else do put (n : ns)
377 else do put (n : ns)
376 return (PV n ty)
378 return (PV n ty)
380+ toPat' (P Bound n ty) [] = do
377 toPat' (App f a) args = toPat' f (a : args)
385 toPat' (App f a) args = toPat' f (a : args)
378 toPat' (Constant (AType _)) [] = return PTyPat
386 toPat' (Constant (AType _)) [] = return PTyPat
379 toPat' (Constant StrType) [] = return PTyPat
387 toPat' (Constant StrType) [] = return PTyPat