Document types of LitNumbers, minor refactoring in Literal.hs
[ghc.git] / testsuite / tests / partial-sigs / should_compile / Splices.hs
1 {-# LANGUAGE TemplateHaskell, NamedWildCards #-}
2
3 module Splices where
4
5 import Language.Haskell.TH
6 import Language.Haskell.TH.Lib (wildCardT)
7
8 metaType1 :: TypeQ
9 metaType1 = wildCardT
10
11 metaType2 :: TypeQ
12 metaType2 = [t| _ |]
13
14 metaType3 :: TypeQ
15 metaType3 = [t| _ -> _ -> _ |]
16
17 metaDec1 :: Q [Dec]
18 metaDec1 = [d| foo :: _ => _
19 foo x y = x == y |]
20
21 metaDec2 :: Q [Dec]
22 metaDec2 = [d| bar :: _a -> _b -> (_a, _b)
23 bar x y = (not x, y) |]
24
25 -- An expression with a partial type annotation
26 metaExp1 :: ExpQ
27 metaExp1 = [| Just True :: Maybe _ |]
28
29 metaExp2 :: ExpQ
30 metaExp2 = [| id :: _a -> _a |]