on master help sign in
Use _ if all alternatives are unmatchable
8a2804dEdwin Brady
src/Idris/AbsSyntax.hs+3−1
@@ -1295,7 +1295,9 @@ stripUnmatchable i (PApp fc fn args) = PApp fc fn (fmap (fmap su) args) where
1295 su (PApp fc fn args)
1295 su (PApp fc fn args)
1296 = PApp fc fn (fmap (fmap su) args)
1296 = PApp fc fn (fmap (fmap su) args)
1297 su (PAlternative b alts)
1297 su (PAlternative b alts)
1298− = PAlternative b (filter (/= Placeholder) (map su alts))
1298+ = let alts' = filter (/= Placeholder) (map su alts) in
1299+ if null alts' then Placeholder
1300+ else PAlternative b alts'
1299 su (PPair fc l r) = PPair fc (su l) (su r)
1301 su (PPair fc l r) = PPair fc (su l) (su r)
1300 su (PDPair fc l t r) = PDPair fc (su l) (su t) (su r)
1302 su (PDPair fc l t r) = PDPair fc (su l) (su t) (su r)
1301 su t = t
1303 su t = t