blob: dbe316421eee272f49e9fa01558792064c61be75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
-- Test the COMPLETE pragmas for SChar, SNat, SSymbol, and TypeRep.
{-# OPTIONS_GHC -Wincomplete-patterns #-}
module CLC149 where
import Data.Kind
import GHC.TypeLits
import Type.Reflection
type Dict :: Constraint -> Type
data Dict c where
Dict :: c => Dict c
sc :: SChar c -> Dict (KnownChar c)
sc SChar = Dict
sn :: SNat n -> Dict (KnownNat n)
sn SNat = Dict
ss :: SSymbol s -> Dict (KnownSymbol s)
ss SSymbol = Dict
tr :: TypeRep a -> Dict (Typeable a)
tr TypeRep = Dict
|