Delete ghctags cabal file
[ghc.git] / testsuite / tests / simplCore / should_run / T5587.hs
1 {-# OPTIONS_GHC -fpedantic-bottoms #-}
2 -- The pedantic-bottom flag makes GHC pickier about bottoms
3 -- See the ticket #5587
4
5 module Main(main) where
6
7 hiddenError = error "hidden error"
8
9 main = print $ seq (head (map (\a -> \b -> hiddenError) (hiddenError::[] Bool))) id [1]
10
11 {- See notes in #5587
12 f a b = a
13 he = hiddenError::[Bool]
14 main = print $ seq (head (map f he)) id [1]
15
16
17 head (map f he)
18 = head (build (\cn. foldr (mapFB c f) n he))
19 = (\cn. foldr (mapFB c f) n he) (\x _ -> x) badHead
20 = foldr (mapFB (\x _ -> x) f) badHead he
21 = let go [] = badHead
22 go (y:ys) = mapFB (\x _ -> x) f y (go ys)
23 in go he
24 = let go [] = badHead
25 go (y:ys) = mapFB (\x _ -> x) f y (go ys)
26 = (\x _. x) (f y) (go ys)
27 = f y
28 = \b. y
29 in go he
30 -}