T16509.hs 237 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ViewPatterns #-}

module PatternPanic where

pattern TestPat :: (Int, Int)
pattern TestPat <- (isSameRef -> True, 0)

isSameRef :: Int -> Bool
isSameRef e | 0 <- e = True
isSameRef _ = False