From a0480b7ac0705a214136a9a5eb50454abfd67985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sun, 11 Aug 2024 10:43:36 +0200 Subject: Remove emptyVarValue from ExprType class --- src/Parser/Expr.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Parser') diff --git a/src/Parser/Expr.hs b/src/Parser/Expr.hs index 9c0a1de..8ea3ace 100644 --- a/src/Parser/Expr.hs +++ b/src/Parser/Expr.hs @@ -72,7 +72,7 @@ stringExpansion tname conv = do let err = do registerParseError $ FancyError off $ S.singleton $ ErrorFail $ T.unpack $ T.concat [ tname, T.pack " expansion not defined for '", textExprType e, T.pack "'" ] - return $ Pure emptyVarValue + return $ Undefined "expansion not defined for type" maybe err return $ listToMaybe $ catMaybes $ conv e @@ -326,5 +326,5 @@ typedExpr = do let err = do registerParseError $ FancyError off $ S.singleton $ ErrorFail $ T.unpack $ T.concat [ T.pack "expected '", textExprType @a Proxy, T.pack "', expression has type '", textExprType e, T.pack "'" ] - return $ Pure emptyVarValue + return $ Undefined "unexpected type" maybe err return $ cast e -- cgit v1.2.3