summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T5700a.hs
blob: 39d39b16a1b7b4397a55a2b581b8e1498de9493b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# LANGUAGE TemplateHaskell #-}
module T5700a where

import Language.Haskell.TH

class C a where
  inlinable :: a -> ()

mkC :: Name -> Q [Dec]
mkC n = return
  [InstanceD Nothing [] (AppT (ConT ''C) (ConT n))
    [ FunD 'inlinable [Clause [WildP] (NormalB (ConE '())) []],
      PragmaD (InlineP 'inlinable Inline FunLike AllPhases)    
    ] 
  ]