Skip to content

Commit

Permalink
fix a bug of seq pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
egisatoshi committed May 14, 2019
1 parent dbc58fc commit 1191804
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hs-src/Language/Egison/Core.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ processMState' (MState env loops seqs bindings (MAtom pattern target matcher:tre
LaterPatVar ->
case seqs of
[] -> throwError $ Default "cannot use # out of seq patterns"
(SeqPatContext stack pat mats tgts:seqs) -> return $ msingleton $ MState env loops (SeqPatContext stack pat (matcher:mats) (target:tgts):seqs) bindings trees
(SeqPatContext stack pat mats tgts:seqs) -> return $ msingleton $ MState env loops (SeqPatContext stack pat (mats ++ [matcher]) (tgts ++ [target]):seqs) bindings trees
AndPat patterns ->
let trees' = map (\pat -> MAtom pat target matcher) patterns ++ trees
in return $ msingleton $ MState env loops seqs bindings trees'
Expand Down

0 comments on commit 1191804

Please sign in to comment.