diff options
Diffstat (limited to 'testsuite/tests/gadt/T7205.hs')
-rw-r--r-- | testsuite/tests/gadt/T7205.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/gadt/T7205.hs b/testsuite/tests/gadt/T7205.hs new file mode 100644 index 0000000000..e8c555972f --- /dev/null +++ b/testsuite/tests/gadt/T7205.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE GADTs, MultiParamTypeClasses, FlexibleInstances, FlexibleContexts #-} +module T7205 where + +data Abs env g v where + Abs :: g (a, env) h v -> Abs env (g (a, env) h v) (a -> v) + +class Eval g env h v where + eval :: env -> g env h v -> v + +evalAbs :: Eval g2 (a2, env) h2 v2 + => env + -> Abs env (g2 (a2, env) h2 v2) (a2->v2) + -> (a2->v2) +evalAbs env (Abs e) x + = eval (x, env) e -- e :: g (a,env) h v |