summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc236.hs
blob: c555cec38ab3bf36912da7c9d81fe2e758626b1b (plain)
1
2
3
4
5
6
7
8
9
10
11
{-# LANGUAGE Rank2Types #-}

module ShouldCompile where

-- Check that we can have a forall to the right of a double-arrow

f :: forall a. (Num a) => forall b. (Ord b) => a -> b -> b -> a
f x y z = if y>z then x+1 else x

g :: (Num a) => (Ord b) => a -> b -> b -> a
g x y z = if y>z then x+1 else x