Opened 2 years ago

Last modified 17 months ago

#415 new bug

Implicit resolver gets caught in a loop if result type of fn matches a parameter.

Reported by: benl Owned by:
Priority: normal Milestone:
Component: Core Transforms Version: 0.4.2
Keywords: Cc:

Description

-- If we add the following implicit parameter then
-- the resolver goes into a loop  {Pretty (Expected t s p)}


pretty_Expected
        {Pretty s} {Pretty p} {Pretty t}
        : Pretty (Expected t s p)
 =  Pretty $ \bb
 -> case bb of
        ExBaseEnd       -> "expecting end of input"
        ExBaseNameOf s  -> "expecting name" %% show s
        ExBaseNat       -> "expecting natural number"
        ExBasePunc c    -> "expecting punctuation" %% textOfChar c
        ExBaseMsg t     -> "expecting" %% t
        ExBaseNameAny   -> "expecting name"

        ExContextDecl n es
         -> "\n" % "in declaration" %% n % "\n" % (unlines' $ map ppr $ bag_toList es)

        ExContextBind n es
         -> "\n" % "in binding"     %% n % "\n" % (unlines' $ map ppr $ bag_toList es)

Change History (4)

comment:1 Changed 2 years ago by benl

  • Summary changed from Implicit resolver gets caught in a loop if result type of fn matches a dictionary. to Implicit resolver gets caught in a loop if result type of fn matches a parameter.

comment:2 Changed 2 years ago by benl

  • Component changed from Unknown to Core Transforms

comment:3 Changed 17 months ago by benl

  • Milestone none deleted

Milestone deleted

comment:4 Changed 17 months ago by benl

  • Type changed from defect to bug
Note: See TracTickets for help on using tickets.