1
1
mirror of https://github.com/github/semantic.git synced 2024-12-18 04:11:48 +03:00

appease linter

This commit is contained in:
Charlie Somerville 2018-06-07 17:04:23 +10:00
parent 320060749b
commit 521d139ec8
4 changed files with 6 additions and 6 deletions

View File

@ -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 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))

View File

@ -256,4 +256,4 @@ subtermAddress = address <=< subtermRef
rvalBox :: Member (Allocator address value) effects
=> value
-> Evaluator address value effects (ValueRef address value)
rvalBox val = Rval <$> (box val)
rvalBox val = Rval <$> box val

View File

@ -88,7 +88,7 @@ evaluatePackageWith :: forall address term value inner inner' inner'' outer
, inner' ~ (Reader ModuleInfo ': inner'')
, 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)))
-> Package term
-> TermEvaluator term address value outer [(address, Environment address)]
@ -123,7 +123,7 @@ evaluatePackageWith analyzeModule analyzeTerm package
maybe (pure ptr) ((`call` []) <=< deref <=< variable) sym
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
withPrelude Nothing f = f emptyEnv

View File

@ -1,4 +1,4 @@
{-# LANGUAGE DeriveAnyClass, ViewPatterns #-}
{-# LANGUAGE DeriveAnyClass #-}
module Language.PHP.Syntax where
import Data.Abstract.Evaluatable
@ -213,7 +213,7 @@ instance Show1 NamespaceName where liftShowsPrec = genericLiftShowsPrec
instance Evaluatable NamespaceName where
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]
deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Mergeable, Ord, Show, ToJSONFields1, Traversable)