blob: e6f0eb25b358cb8f1d143e8239c0fab00d5f98b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
|