diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-09-14 21:27:36 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2024-09-17 20:12:58 +0200 |
commit | 31fd34766e33f8334c3fbcbfba2a0e1314b4f334 (patch) | |
tree | fe62be4dbd1bef8d77538b75b40589295a761114 /src/Parser/Statement.hs | |
parent | 1ac6198e7ceb660e1faec1f88f1a04aca6a2491e (diff) |
Type variables and simple unification
Diffstat (limited to 'src/Parser/Statement.hs')
-rw-r--r-- | src/Parser/Statement.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Parser/Statement.hs b/src/Parser/Statement.hs index b2f3cd6..94a5583 100644 --- a/src/Parser/Statement.hs +++ b/src/Parser/Statement.hs @@ -259,12 +259,12 @@ testWith = do off <- stateOffset <$> getParserState ctx@(SomeExpr (_ :: Expr ctxe)) <- someExpr let expected = - [ SomeExprType @Network Proxy - , SomeExprType @Node Proxy - , SomeExprType @Process Proxy + [ ExprTypePrim @Network Proxy + , ExprTypePrim @Node Proxy + , ExprTypePrim @Process Proxy ] notAllowed <- flip allM expected $ \case - SomeExprType (Proxy :: Proxy a) | Just (Refl :: ctxe :~: a) <- eqT -> return False + ExprTypePrim (Proxy :: Proxy a) | Just (Refl :: ctxe :~: a) <- eqT -> return False _ -> return True when notAllowed $ registerParseError $ FancyError off $ S.singleton $ ErrorFail $ T.unpack $ "expected " <> T.intercalate ", " (map (("'"<>) . (<>"'") . textSomeExprType) expected) <> ", expression has type '" <> textExprType @ctxe Proxy <> "'" |