diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2026-04-19 10:41:11 +0200 |
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2026-04-19 11:04:52 +0200 |
| commit | db5d73811c42d640f606ede40f861e1c052f8ca5 (patch) | |
| tree | 8f15fa9c272df2872db98fbf9db1ffd3022d33b1 /src/Parser/Expr.hs | |
| parent | c824435064ea288a758687d00777804f0a2d5af3 (diff) | |
Type application in expressions
Diffstat (limited to 'src/Parser/Expr.hs')
| -rw-r--r-- | src/Parser/Expr.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Parser/Expr.hs b/src/Parser/Expr.hs index 5e27457..c57aa97 100644 --- a/src/Parser/Expr.hs +++ b/src/Parser/Expr.hs @@ -189,11 +189,10 @@ list = label "list" $ do [do symbol "]" tvar <- newTypeVar return $ SomeExpr $ - TypeQuant tvar $ - TypeLambda (ExprTypeApp (ExprTypeConstr1 (Proxy :: Proxy [])) [ ExprTypeVar tvar ]) tvar $ - \case - (ExprTypePrim (Proxy :: Proxy a)) -> HideType $ Pure ([] :: [ a ]) - _ -> Undefined "incomplete type" + TypeLambda tvar (ExprTypeApp (ExprTypeConstr1 (Proxy :: Proxy [])) [ ExprTypeVar tvar ]) $ + \case + (ExprTypePrim (Proxy :: Proxy a)) -> HideType $ Pure ([] :: [ a ]) + _ -> Undefined "incomplete type" ,do SomeExpr x <- someExpr let enumErr off = parseError $ FancyError off $ S.singleton $ ErrorFail $ T.unpack $ |