mirror of
https://github.com/github/semantic.git
synced 2025-01-04 21:47:07 +03:00
Define an Eval newtype.
This commit is contained in:
parent
108068f7f8
commit
47dd98970a
@ -1,4 +1,4 @@
|
||||
{-# LANGUAGE GADTs, Rank2Types, ScopedTypeVariables, TypeOperators #-}
|
||||
{-# LANGUAGE GADTs, GeneralizedNewtypeDeriving, Rank2Types, ScopedTypeVariables, TypeOperators #-}
|
||||
module Control.Abstract.Value
|
||||
( AbstractValue(..)
|
||||
, AbstractFunction(..)
|
||||
@ -80,6 +80,10 @@ prog b = do
|
||||
identity <- lambda' variable'
|
||||
iff b unit' (call' identity [unit'])
|
||||
|
||||
newtype Eval location effects a = Eval { runEval :: Eff effects a }
|
||||
deriving (Applicative, Effectful, Functor, Monad)
|
||||
|
||||
|
||||
|
||||
builtinId :: (Effectful m, Members '[Fresh, Function (m effects) value, Variable value] effects, Monad (m effects))
|
||||
=> m effects value
|
||||
|
Loading…
Reference in New Issue
Block a user