Couldn't we just use rewrite rules to rewrite *transparently*
   all uses of fromJust to safeFromJust, tagging the call site
   with a location?
..
Looks good! But that is deceiving: the assert was expanded before the rule
fired, and refers to the rewrite rule source line (line 19), not the fromJust
call site (line 12).  Now if we could just have the 'assert' token inserted
into the AST before it was expanded, we'd be home and dry. Could this be done
with TH? Or could we arrange for asserts in rewrite rules not to be expanded
till later?
..
Any ideas?

http://www.haskell.org/pipermail/glasgow-haskell-users/2006-November/011545.html

claus
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to