Opened 3 years ago

Last modified 3 years ago

#376 closed defect

Check variable elaboration in Applicative. — at Version 1

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 (1)

comment:1 Changed 3 years ago by benl

  • Description modified (diff)
Note: See TracTickets for help on using tickets.