summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/TH_PromotedList.hs
blob: 1f4d48c540f464d936165a6d7f5b3af65bdd50ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}

module TH_PromotedList where

import Language.Haskell.TH

$(let ty = AppT (AppT PromotedConsT (ConT ''Int))
            (AppT (AppT PromotedConsT (ConT ''Bool)) PromotedNilT)

  in  reportWarning (pprint ty) >>
        return [])

data Proxy a = Proxy

f :: Proxy (True ': $(appT (appT promotedConsT (conT 'False)) promotedNilT))
f = Proxy :: Proxy ('[True, False] :: [Bool])