summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/tcfail158.hs
blob: f87ecbc53ab7958ebd730c37e9220b5fb4f7dd82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE ExplicitForAll #-}

-- This one actually crashed in 6.4.1
-- There's a kind error in the signature for bar, 
-- and we were recovering, and then crashing when we found
-- a scoped type variable not in scope

 data Val v sm = Val
 foo :: forall v sm. Val v sm
 foo = undefined
   where foo1 :: Val v sm
         foo1 = bar
 -- Correct type signature: bar :: forall v sm. Val v sm
 bar :: forall v. Val v
 bar = undefined foo