m2ym / optima

Optimized Pattern Matching Library for Common Lisp
271 stars 19 forks source link

non-linear-pattern-error with 2 restarts. #86

Closed guicho271828 closed 8 years ago

guicho271828 commented 11 years ago

submitted again.

guicho271828 commented 9 years ago

Providing a restart for a non-linear-pattern-error is critical for implementing a unifier based on optima. When a non-linear pattern occurs, and if we can restart from that clause, we can replace that conflicting variable with gensym variables, and defer the matching to the runtime.

unification does not necesarily be done on optima side, but at least some compile-time hook is required undoubtedly.

guicho271828 commented 8 years ago

This is addressed in Trivia, but in a different form. https://github.com/guicho271828/trivia/blob/master/level1/impl.lisp#L30