diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-08-11 10:43:36 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2024-08-11 10:55:34 +0200 |
commit | a0480b7ac0705a214136a9a5eb50454abfd67985 (patch) | |
tree | 6532616bd61bc4771a08a4b6151dad03d9eea529 /src/Parser | |
parent | e6bab9cb2aabafb27324f7d923739a8f4a96ad97 (diff) |
Remove emptyVarValue from ExprType class
Diffstat (limited to 'src/Parser')
-rw-r--r-- | src/Parser/Expr.hs | 4 |
1 files changed, 2 insertions, 2 deletions
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 |