blob: 37e9bfc00b283b2c77ee745746404e4dac173b9b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
{-# LANGUAGE PatternSynonyms #-}
module TypeRepCon1 where
import Type.Reflection
( TypeRep, pattern Con )
-- Simple test of the 'NotApplication' custom type error
-- in Data.Typeable.Internal.
isApp :: TypeRep (f a) -> Bool
isApp (Con _) = False -- Should warn about redundant pattern (insoluble Given)
isApp _ = True
|