Skip to content

Commit 03421f6

Browse files
committed
fix in the typechecking of one and default
1 parent d54fab0 commit 03421f6

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/compiler/api/GF/Compile/TypeCheck/ConcreteNew.hs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -382,19 +382,19 @@ tcRho scope c (Reset ctl mb_ct t qid) mb_ty
382382
instSigma scope c2 (Reset ctl mb_ct t qid) vtypeMarkup mb_ty
383383
| ctl == cOne = do
384384
let (c1,c2) = split c
385-
(t,ty) <- tcRho scope c1 t mb_ty
386-
mb_ct <- case mb_ct of
387-
Just ct -> do (ct,ty) <- tcRho scope c2 ct (Just ty)
388-
return (Just ct)
389-
Nothing -> return Nothing
385+
(t,ty) <- tcRho scope c1 t mb_ty
386+
(mb_ct,ty) <- case mb_ct of
387+
Just ct -> do (ct,ty) <- tcRho scope c2 ct (Just ty)
388+
return (Just ct,ty)
389+
Nothing -> return (Nothing,ty)
390390
return (Reset ctl mb_ct t qid,ty)
391391
| ctl == cDefault = do
392392
let (c1,c2) = split c
393-
(t,ty) <- tcRho scope c1 t mb_ty
394-
mb_ct <- case mb_ct of
395-
Just ct -> do (ct,ty) <- tcRho scope c2 ct (Just ty)
396-
return (Just ct)
397-
Nothing -> evalError (pp "[list: .. | ..] requires an argument")
393+
(t,ty) <- tcRho scope c1 t mb_ty
394+
(mb_ct,ty) <- case mb_ct of
395+
Just ct -> do (ct,ty) <- tcRho scope c2 ct (Just ty)
396+
return (Just ct,ty)
397+
Nothing -> evalError (pp "[list: .. | ..] requires an argument")
398398
return (Reset ctl mb_ct t qid,ty)
399399
| ctl == cList = do
400400
do let (c1,c2) = split c

0 commit comments

Comments
 (0)