mirror of
https://github.com/github/semantic.git
synced 2024-12-11 08:45:48 +03:00
Use maybeM to evaluate identifiers.
This commit is contained in:
parent
0355d81065
commit
fe3b9730c4
@ -106,7 +106,7 @@ instance Ord1 Identifier where liftCompare = genericLiftCompare
|
||||
instance Show1 Identifier where liftShowsPrec = genericLiftShowsPrec
|
||||
|
||||
instance Evaluatable Identifier where
|
||||
eval (Identifier name) = lookupWith deref name >>= maybe (throwException $ FreeVariableError name) pure
|
||||
eval (Identifier name) = lookupWith deref name >>= maybeM (throwException (FreeVariableError name))
|
||||
|
||||
instance FreeVariables1 Identifier where
|
||||
liftFreeVariables _ (Identifier x) = pure x
|
||||
|
Loading…
Reference in New Issue
Block a user