From cc61cdc000481f9dc88253342c328bdb99d048a4 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sun, 17 Mar 2024 23:08:38 +0100 Subject: Typecheck work; solver is incorrect --- src/HSVIS/Parser.hs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/HSVIS/Parser.hs') diff --git a/src/HSVIS/Parser.hs b/src/HSVIS/Parser.hs index 0df4aa8..b4d8754 100644 --- a/src/HSVIS/Parser.hs +++ b/src/HSVIS/Parser.hs @@ -672,9 +672,13 @@ pType = do return (TFun (Range pos1 pos2) ty1 ty2) pTypeApp :: FParser PType -pTypeApp = fasome pTypeAtom >>= \case - t :| [] -> return t - t :| ts -> return (TApp (foldMapne extOf (t :| ts)) t ts) +pTypeApp = do + pos1 <- gets psCur + ts <- fasome pTypeAtom + pos2 <- gets psCur + case ts of + t :| [] -> return t + t :| ts' -> return (TApp (Range pos1 pos2) t ts') pTypeAtom :: FParser PType pTypeAtom = faasum' [pTypeParens, pTypeList, pTypeName] -- cgit v1.2.3-70-g09d2