cvs commit: hugs98/src compiler.c

ross at glass.cse.ogi.edu ross at glass.cse.ogi.edu
Mon Oct 6 11:09:41 EDT 2003


ross        2003/10/06 10:09:41 PDT

  Modified files:
    src                  compiler.c 
  Log:
  When pruning variable-free parts of a pattern, don't prune inside ~pat,
  unless there are no variables at all in pat.  Formerly
  
          Prelude> let ~(1,x) = (2,3) in x
          3
          Prelude> let (1,x) = (2,3) in x
          Program error: pattern match failure
  
  when they should both fail (bug reported by Levent).
  
  The revised implementation is simple but wasteful, building a pruned
  pattern and discarding it -- it would be more efficient to test the
  pattern for variables.
  
  Revision  Changes    Path
  1.19      +1 -1      hugs98/src/compiler.c


More information about the Cvs-hugs mailing list