@@ -361,61 +361,40 @@ instance MetaSubst Int (Synthesized (LHsExpr GhcPs)) where
361361------------------------------------------------------------------------------
362362-- | Reasons a tactic might fail.
363363data TacticError
364- = UndefinedHypothesis OccName
364+ = OutOfGas
365365 | GoalMismatch String CType
366- | UnsolvedSubgoals [Judgement ]
367- | UnificationError CType CType
368366 | NoProgress
369367 | NoApplicableTactic
370- | IncorrectDataCon DataCon
371- | RecursionOnWrongParam OccName Int OccName
372368 | UnhelpfulRecursion
373369 | UnhelpfulDestruct OccName
374- | UnhelpfulSplit OccName
375370 | TooPolymorphic
376371 | NotInScope OccName
377372 | TacticPanic String
373+ deriving (Eq )
378374
379375instance Show TacticError where
380- show (UndefinedHypothesis name) =
381- occNameString name <> " is not available in the hypothesis."
376+ show OutOfGas = " Auto ran out of gas"
382377 show (GoalMismatch tac (CType typ)) =
383378 mconcat
384379 [ " The tactic "
385380 , tac
386381 , " doesn't apply to goal type "
387382 , unsafeRender typ
388383 ]
389- show (UnsolvedSubgoals _) =
390- " There were unsolved subgoals"
391- show (UnificationError (CType t1) (CType t2)) =
392- mconcat
393- [ " Could not unify "
394- , unsafeRender t1
395- , " and "
396- , unsafeRender t2
397- ]
398384 show NoProgress =
399385 " Unable to make progress"
400386 show NoApplicableTactic =
401387 " No tactic could be applied"
402- show (IncorrectDataCon dcon) =
403- " Data con doesn't align with goal type (" <> unsafeRender dcon <> " )"
404- show (RecursionOnWrongParam call p arg) =
405- " Recursion on wrong param (" <> show call <> " ) on arg"
406- <> show p <> " : " <> show arg
407388 show UnhelpfulRecursion =
408389 " Recursion wasn't productive"
409390 show (UnhelpfulDestruct n) =
410391 " Destructing patval " <> show n <> " leads to no new types"
411- show (UnhelpfulSplit n) =
412- " Splitting constructor " <> show n <> " leads to no new goals"
413392 show TooPolymorphic =
414393 " The tactic isn't applicable because the goal is too polymorphic"
415394 show (NotInScope name) =
416395 " Tried to do something with the out of scope name " <> show name
417396 show (TacticPanic err) =
418- " PANIC : " <> err
397+ " Tactic panic : " <> err
419398
420399
421400------------------------------------------------------------------------------
@@ -560,16 +539,18 @@ data AgdaMatch = AgdaMatch
560539
561540
562541data UserFacingMessage
563- = TacticErrors
542+ = NotEnoughGas
543+ | TacticErrors
564544 | TimedOut
565545 | NothingToDo
566546 | InfrastructureError Text
567547 deriving Eq
568548
569549instance Show UserFacingMessage where
570- show TacticErrors = " Wingman couldn't find a solution"
571- show TimedOut = " Wingman timed out while trying to find a solution"
572- show NothingToDo = " Nothing to do"
550+ show NotEnoughGas = " Wingman ran out of gas when trying to find a solution. \n Try increasing the `auto_gas` setting."
551+ show TacticErrors = " Wingman couldn't find a solution"
552+ show TimedOut = " Wingman timed out while trying to find a solution"
553+ show NothingToDo = " Nothing to do"
573554 show (InfrastructureError t) = " Internal error: " <> T. unpack t
574555
575556
0 commit comments