diff options
Diffstat (limited to 'testsuite/tests/patsyn/should_compile/T17775-singleton.hs')
-rw-r--r-- | testsuite/tests/patsyn/should_compile/T17775-singleton.hs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/patsyn/should_compile/T17775-singleton.hs b/testsuite/tests/patsyn/should_compile/T17775-singleton.hs new file mode 100644 index 0000000000..651dff583a --- /dev/null +++ b/testsuite/tests/patsyn/should_compile/T17775-singleton.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE PatternSynonyms #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE ViewPatterns #-} +module Bug where + +-- Ryan Scott (on MR !2600) said this failed + +type T = forall a. a -> () + +toT :: () -> T +toT x _ = x + +pattern ToT :: T -> () +pattern ToT{x} <- (toT -> x) + +-- f (toT -> (x::T)) = True + |