Commit c6ccdbbe authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Test Trac #8518

parent fd252df6
{-# LANGUAGE TypeFamilies #-}
module T8518 where
import Data.Maybe
import Control.Applicative
class Continuation c where
type Z c
type B c
type F c
continue :: c -> (Z c) -> (B c) -> Maybe ((F c), c)
callCont :: Continuation c => c -> (Z c) -> (B c) -> Maybe (F c)
callCont c z b = rpt (4 :: Int) c z b
rpt 0 c' z' b' = fromJust (fst <$> (continue c' z' b'))
rpt i c' z' b' = let c'' = fromJust (snd <$> (continue c' z' b')) in rpt (i-1) c''
\ No newline at end of file
Could not deduce (F a1 ~ (Z a1 -> B a1 -> F a1))
from the context (Continuation c)
bound by the type signature for
callCont :: Continuation c => c -> Z c -> B c -> Maybe (F c)
at T8518.hs:13:13-64
Relevant bindings include
c'' :: a1 (bound at T8518.hs:17:30)
b' :: B a1 (bound at T8518.hs:17:21)
z' :: Z a1 (bound at T8518.hs:17:18)
c' :: a1 (bound at T8518.hs:17:15)
rpt :: a -> a1 -> Z a1 -> B a1 -> F a1 (bound at T8518.hs:16:9)
In the expression: rpt (i - 1) c''
In the expression:
let c'' = fromJust (snd <$> (continue c' z' b')) in rpt (i - 1) c''
......@@ -117,4 +117,6 @@ test('T8129',
['$MAKE -s --no-print-directory T8129'])
test('T8368', normal, compile_fail, [''])
test('T8368a', normal, compile_fail, [''])
\ No newline at end of file
test('T8368a', normal, compile_fail, [''])
test('T8518', normal, compile_fail, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment