summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/T11342/T11342d.hs
blob: 9c973d8c8c5cfd950ebcb81c8d4d330e5deae81a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE StandaloneKindSignatures #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}

module T11342d where

import GHC.TypeLits
import Data.Type.Equality

f1 :: CmpChar 'x' 'x' :~: EQ
f1 = Refl

f2 :: CmpChar 'x' 'y' :~: LT
f2 = Refl

f3 :: forall (a :: Char). CmpChar a a :~: EQ
f3 = Refl

testConsSymbol
  :: '[ConsSymbol 'a' "bcd", ConsSymbol ' ' "hi mark"] :~: '["abcd", " hi mark"]
testConsSymbol = Refl

testUnconsSymbol
  :: '[UnconsSymbol "abc", UnconsSymbol "a", UnconsSymbol ""] :~: [Just '( 'a', "bc" ), Just '( 'a', ""), Nothing]
testUnconsSymbol = Refl

testUncons :: ConsSymbol '\xD800' "foo" :~: "\55296foo"
testUncons = Refl