summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T5700a.hs
blob: 31dbfa9120ebc3a74b212c2d2b6f3e738450667b (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 [] (AppT (ConT ''C) (ConT n))
    [ FunD 'inlinable [Clause [WildP] (NormalB (ConE '())) []],
      PragmaD (InlineP 'inlinable Inline FunLike AllPhases)    
    ] 
  ]