From 880c36a666e3ee36066719a09a5294be2cfa3e93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Thu, 27 Aug 2026 21:07:20 +0200 Subject: Parse list types in type expression --- src/Parser/Expr.hs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Parser/Expr.hs b/src/Parser/Expr.hs index 4603dda..89fa208 100644 --- a/src/Parser/Expr.hs +++ b/src/Parser/Expr.hs @@ -560,5 +560,12 @@ applyFunctionArguments args sexpr@(SomeExpr (expr :: Expr a)) typeExpr :: TestParser SomeExprType typeExpr = do off <- stateOffset <$> getParserState - name <- constrName "type constructor name" - lookupType off name + choice + [ do + name <- constrName "type constructor name" + lookupType off name + , do + between (symbol "[") (symbol "]") $ do + inner <- typeExpr + return $ ExprTypeApp (ExprTypeConstr1 (Proxy :: Proxy [])) [ inner ] + ] -- cgit v1.2.3