summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc145.hs
blob: 8ab4a563212bd42dd0a5057cdf5a81c2626453bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
{-# LANGUAGE RankNTypes, ImplicitParams, UnboxedTuples #-}

-- Test two slightly exotic things about type signatures

module ShouldCompile where

        -- The for-all hoisting should hoist the
        -- implicit parameter to give
        --      r :: (?param::a) => a
    r :: Int -> ((?param :: a) => a)
    r = error "urk"

        -- The unboxed tuple is OK because it is
        -- used on the right hand end of an arrow
    type T = (# Int, Int #)

    f :: Int -> T
    f = error "urk"