mirror of
https://github.com/github/semantic.git
synced 2024-12-18 04:11:48 +03:00
appease linter
This commit is contained in:
parent
320060749b
commit
521d139ec8
@ -52,7 +52,7 @@ earlyReturn = send . Return @address @value
|
|||||||
catchReturn :: Member (Return address value) effects => Evaluator address value effects a -> (forall x . Return address value x -> Evaluator address value effects a) -> Evaluator address value effects a
|
catchReturn :: Member (Return address value) effects => Evaluator address value effects a -> (forall x . Return address value x -> Evaluator address value effects a) -> Evaluator address value effects a
|
||||||
catchReturn action handler = interpose pure (\ ret _ -> handler ret) action
|
catchReturn action handler = interpose pure (\ ret _ -> handler ret) action
|
||||||
|
|
||||||
runReturn :: Effectful (m address value) => m address value (Return address value ': effects) (address) -> m address value effects (address)
|
runReturn :: Effectful (m address value) => m address value (Return address value ': effects) address -> m address value effects address
|
||||||
runReturn = raiseHandler (relay pure (\ (Return value) _ -> pure value))
|
runReturn = raiseHandler (relay pure (\ (Return value) _ -> pure value))
|
||||||
|
|
||||||
|
|
||||||
|
@ -256,4 +256,4 @@ subtermAddress = address <=< subtermRef
|
|||||||
rvalBox :: Member (Allocator address value) effects
|
rvalBox :: Member (Allocator address value) effects
|
||||||
=> value
|
=> value
|
||||||
-> Evaluator address value effects (ValueRef address value)
|
-> Evaluator address value effects (ValueRef address value)
|
||||||
rvalBox val = Rval <$> (box val)
|
rvalBox val = Rval <$> box val
|
||||||
|
@ -88,7 +88,7 @@ evaluatePackageWith :: forall address term value inner inner' inner'' outer
|
|||||||
, inner' ~ (Reader ModuleInfo ': inner'')
|
, inner' ~ (Reader ModuleInfo ': inner'')
|
||||||
, inner'' ~ (Modules address value ': Reader Span ': Reader PackageInfo ': outer)
|
, inner'' ~ (Modules address value ': Reader Span ': Reader PackageInfo ': outer)
|
||||||
)
|
)
|
||||||
=> (SubtermAlgebra Module term (TermEvaluator term address value inner (address)) -> SubtermAlgebra Module term (TermEvaluator term address value inner (address)))
|
=> (SubtermAlgebra Module term (TermEvaluator term address value inner address) -> SubtermAlgebra Module term (TermEvaluator term address value inner address))
|
||||||
-> (SubtermAlgebra (Base term) term (TermEvaluator term address value inner (ValueRef address value)) -> SubtermAlgebra (Base term) term (TermEvaluator term address value inner (ValueRef address value)))
|
-> (SubtermAlgebra (Base term) term (TermEvaluator term address value inner (ValueRef address value)) -> SubtermAlgebra (Base term) term (TermEvaluator term address value inner (ValueRef address value)))
|
||||||
-> Package term
|
-> Package term
|
||||||
-> TermEvaluator term address value outer [(address, Environment address)]
|
-> TermEvaluator term address value outer [(address, Environment address)]
|
||||||
@ -123,7 +123,7 @@ evaluatePackageWith analyzeModule analyzeTerm package
|
|||||||
maybe (pure ptr) ((`call` []) <=< deref <=< variable) sym
|
maybe (pure ptr) ((`call` []) <=< deref <=< variable) sym
|
||||||
|
|
||||||
evalPrelude prelude = raiseHandler (runModules (runTermEvaluator . evalModule emptyEnv)) $ do
|
evalPrelude prelude = raiseHandler (runModules (runTermEvaluator . evalModule emptyEnv)) $ do
|
||||||
(_, builtinsEnv) <- runInModule emptyEnv moduleInfoFromCallStack (TermEvaluator (defineBuiltins *> (box unit)))
|
(_, builtinsEnv) <- runInModule emptyEnv moduleInfoFromCallStack (TermEvaluator (defineBuiltins *> box unit))
|
||||||
second (mergeEnvs builtinsEnv) <$> evalModule builtinsEnv prelude
|
second (mergeEnvs builtinsEnv) <$> evalModule builtinsEnv prelude
|
||||||
|
|
||||||
withPrelude Nothing f = f emptyEnv
|
withPrelude Nothing f = f emptyEnv
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{-# LANGUAGE DeriveAnyClass, ViewPatterns #-}
|
{-# LANGUAGE DeriveAnyClass #-}
|
||||||
module Language.PHP.Syntax where
|
module Language.PHP.Syntax where
|
||||||
|
|
||||||
import Data.Abstract.Evaluatable
|
import Data.Abstract.Evaluatable
|
||||||
@ -213,7 +213,7 @@ instance Show1 NamespaceName where liftShowsPrec = genericLiftShowsPrec
|
|||||||
|
|
||||||
instance Evaluatable NamespaceName where
|
instance Evaluatable NamespaceName where
|
||||||
eval (NamespaceName xs) = Rval <$> foldl1 f (fmap subtermAddress xs)
|
eval (NamespaceName xs) = Rval <$> foldl1 f (fmap subtermAddress xs)
|
||||||
where f ns id = evaluateInScopedEnv (ns >>= deref) id
|
where f ns = evaluateInScopedEnv (ns >>= deref)
|
||||||
|
|
||||||
newtype ConstDeclaration a = ConstDeclaration [a]
|
newtype ConstDeclaration a = ConstDeclaration [a]
|
||||||
deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Mergeable, Ord, Show, ToJSONFields1, Traversable)
|
deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Mergeable, Ord, Show, ToJSONFields1, Traversable)
|
||||||
|
Loading…
Reference in New Issue
Block a user