1
0
forked from GitHub/gf-core

fix in the typechecking of one and default

This commit is contained in:
Krasimir Angelov
2025-05-09 19:15:28 +02:00
parent d54fab0bbf
commit 03421f6bc7

View File

@@ -383,17 +383,17 @@ tcRho scope c (Reset ctl mb_ct t qid) mb_ty
| ctl == cOne = do
let (c1,c2) = split c
(t,ty) <- tcRho scope c1 t mb_ty
mb_ct <- case mb_ct of
(mb_ct,ty) <- case mb_ct of
Just ct -> do (ct,ty) <- tcRho scope c2 ct (Just ty)
return (Just ct)
Nothing -> return Nothing
return (Just ct,ty)
Nothing -> return (Nothing,ty)
return (Reset ctl mb_ct t qid,ty)
| ctl == cDefault = do
let (c1,c2) = split c
(t,ty) <- tcRho scope c1 t mb_ty
mb_ct <- case mb_ct of
(mb_ct,ty) <- case mb_ct of
Just ct -> do (ct,ty) <- tcRho scope c2 ct (Just ty)
return (Just ct)
return (Just ct,ty)
Nothing -> evalError (pp "[list: .. | ..] requires an argument")
return (Reset ctl mb_ct t qid,ty)
| ctl == cList = do