summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc145.hs
blob: 9d1ada71a60deffafbcb3966e6c74e624a7634f2 (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"