summaryrefslogtreecommitdiff
path: root/testsuite/tests/pmcheck/complete_sigs/completesig13.hs
blob: e545ef8d9baefe8b009c60288ec3679cf7227401 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ViewPatterns #-}
{-# OPTIONS_GHC -Wall #-}
module Completesig13 where

class LL f where
  go :: f a -> ()

instance LL [] where
  go _ = ()

pattern T :: LL f => f a
pattern T <- (go -> ())

{-# COMPLETE T :: [] #-}

foo :: [a] -> Int
foo T = 5