summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds/T7022a.hs
blob: a286fd3c1d52931a528b4b329db5a1f07b5be661 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
{-# LANGUAGE TemplateHaskell #-}

module T7022a where

import Language.Haskell.TH

makeSList :: Q [Dec]
-- makes "type SList (a :: [k]) = Sing a"
makeSList = do
   a <- newName "a"
   k <- newName "k"
   return [TySynD (mkName "SList") [KindedTV a (AppT ListT (VarT k))]
                  (AppT (ConT (mkName "Sing")) (VarT a))]