Opened 3 years ago

Closed 3 years ago

#376 closed defect (fixed)

Check variable elaboration in Applicative.

Reported by: benl Owned by:
Priority: normal Milestone: 0.4.3
Component: Source Type Inferencer Version: 0.4.2
Keywords: Cc:

Description (last modified by benl)

When the return type is specified the quantifier is added to the definition:

liftA   (dapp: Applicative f) (f: a -> b) (xa: f a): f b
 = ap dapp (pure dapp f) xa

But removing the return type means the elaborator does not add the quantifier for 'f'

liftA   (dapp: Applicative f) (f: a -> b) (xa: f a)
 = ap dapp (pure dapp f) xa

* Compiling packages/ddc-code/tetra/base/Class/Applicative.ds
Error in transformed module.
  Undefined type variable: f

We also don't get the quantifier if we supply a separate signature for the function.

Change History (2)

comment:1 Changed 3 years ago by benl

  • Description modified (diff)

comment:2 Changed 3 years ago by benl

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.