Skip to content

Commit bc05530

Browse files
committed
test: broken scenario
1 parent 66f3981 commit bc05530

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/Spec.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
{-# LANGUAGE DataKinds #-}
44
{-# LANGUAGE FunctionalDependencies #-}
5+
{-# LANGUAGE ImpredicativeTypes #-}
56
{-# LANGUAGE MultiParamTypeClasses #-}
67
{-# LANGUAGE RankNTypes #-}
78
{-# LANGUAGE TemplateHaskell #-}
@@ -23,5 +24,10 @@ $(banInstance [t|TestClass Char Int|] "because it's really bad")
2324
instance TestClass Int Int where
2425
testFunction = const 0
2526

27+
class TestClass2 a where
28+
testFunction2 :: a
29+
30+
$(banInstance [t|forall a. TestClass2 (Maybe a)|] "no instances allowed")
31+
2632
main :: IO ()
2733
main = pure ()

0 commit comments

Comments
 (0)