summaryrefslogtreecommitdiff
path: root/tests/examples/ghc86/TH_repPatSig.hs
blob: 7a8e45077cd0a2a06b2d2d9a2bc34540534b5733 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}

module Main
where

import TH_repPatSig_asserts

assertFoo [d| foo :: Int -> Int
              foo (x :: Int) = x
            |]

assertCon [| \(x :: Either Char Int -> (Char, Int)) -> x |]

assertVar [| \(x :: Maybe a) -> case x of Just y -> (y :: a) |]

main :: IO ()
main = return ()