summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/TH_invalid_add_top_decl.hs
blob: b13d873d9679ffd0bb30b54a05d2c27ae572358a (plain)
1
2
3
4
5
6
7
8
{-# LANGUAGE TemplateHaskell #-}
import Language.Haskell.TH
import Language.Haskell.TH.Syntax

$(do
  invalidDecl <- valD (varP (mkName "emptyDo")) (normalB (doE [])) []
  addTopDecls [invalidDecl]
  return [])