summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T18412.hs
blob: 67fc5cc1dbcd54589e3c92aa64acbf38b03d0488 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{-# LANGUAGE RankNTypes #-}

module T18412 where

hr :: (forall a. a -> a) -> ()
hr _ = ()

foo x = case x of () -> hr

-- This did not use to be allowed, because the
-- multiple branches have (the same) polytypes
-- Enhancement July 2020
bar x = case x of True -> hr
                  False -> hr