diff --git a/src/Data/Syntax.hs b/src/Data/Syntax.hs index 68a43b086..a20424f92 100644 --- a/src/Data/Syntax.hs +++ b/src/Data/Syntax.hs @@ -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