a857ef44b0ee5c0a82fadf12d867f454d9df66fe
[ghc.git] / testsuite / tests / deSugar / should_compile / ds022.hs
1 -- !!! ds022 -- literal patterns (wimp version)
2 --
3 {-# OPTIONS_GHC -fwarn-overlapping-patterns #-}
4
5 module ShouldCompile where
6
7 f 1 1.1 = []
8 f 2 2.2 = []
9 f 3 3.3 = []
10 f 4 4.4 = []
11
12 g 11111111111111111111111 1.11111111111111111 = []
13 g 22222222222222222222222 2.22222222222222222 = []
14 g 33333333333333333333333 3.33333333333333333 = []
15 g 44444444444444444444444 4.44444444444444444 = []
16
17 h 'a' "" = []
18 h '\'' "foo" = []
19 h '"' ('b':'a':'r':[]) = []
20 h '\o250' blob = []
21
22 i 1 1.1 = []
23 i 2 2.2 = []
24 i 1 0.011e2 = []
25 i 2 2.20000 = []
26
27 {-
28 j one@1 oneone@1.1
29 | ((fromFloat oneone) - (fromIntegral (fromInt one)))
30 /= (fromIntegral (fromInt 0)) = []
31 j two@2 twotwo@2.2
32 | ((fromFloat twotwo) * (fromIntegral (fromInt 2)))
33 == (fromIntegral (fromInt 4.4)) = []
34 -}