simple_app should try both elaboration orders
commite0e52f1a4abfd8b0150268dda207b2cb9fa8a57e
authorEdwin Brady <eb@cs.st-andrews.ac.uk>
dateWed 16 Nov 2011, 01:05 (15 years ago)
parentf31caf5
src/Core/Elaborate.hs+6−2
@@ -323,8 +323,12 @@ simple_app fun arg =
323323 start_unify s
324324 claim s (Var a)
325325 prep_fill f [s]
326− focus s; arg -- need to work out the type of the arg, so do it first
327− focus f; fun
326+ -- try elaborating in both orders, since we might learn something useful
327+ -- either way
328+ try (do focus s; arg
329+ focus f; fun)
330+ (do focus f; fun
331+ focus s; arg)
328332 complete_fill
329333 end_unify
330334