Look inside implications in simplifyRule
[ghc.git] / testsuite / tests / typecheck / should_compile / T14732.hs
1 {-# LANGUAGE FlexibleInstances #-}
2 {-# LANGUAGE KindSignatures #-}
3 {-# LANGUAGE MultiParamTypeClasses #-}
4 {-# OPTIONS_GHC -fdefer-type-errors -O #-}
5 -- Oddly this bug was only triggered with -fdefer-type-errors
6 -- The -O ensures that the RULE is processed
7
8 module T14732 where
9
10 import Prelude hiding (zip, zipWith)
11
12 zipWith :: (a -> b -> c)
13 -> Bundle v a
14 -> Bundle v b
15 -> Bundle v c
16 zipWith = undefined
17
18 class GVector (v :: * -> *) a
19 instance GVector Vector a
20
21 data Bundle (v :: * -> *) a
22 data Vector a
23 class Unbox a
24
25 stream :: GVector v a => v a -> Bundle v a
26 {-# INLINE [1] stream #-}
27 stream = undefined
28
29 zip :: (Unbox a, Unbox b) => Vector a -> Vector b -> Vector (a, b)
30 {-# INLINE [1] zip #-}
31 zip = undefined
32 {-# RULES "stream/zip [Vector.Unboxed]" forall as bs .
33 stream (zip as bs) = zipWith (,) (stream as)
34 (stream bs) #-}