Bug #59

Typing hole when using dot operator

Added by SpiceGuid - over 16 years ago. Updated about 16 years ago.

Status:NewStart date:01/29/2009
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Platform:All Triage Stage:
Resolution:

Description

There is a serious typing hole that allows for exemple to apply a binary operation to only one argument.

define Int
  add(Int a, Int b)
    =
  a + b. 

define Int -> Int
  id(Int -> Int f)
    =
  f.

define $U
   $T x .$T -> $U f
     =
   f(x). 

define Int
  bad_operation (Int n)
    =
  n . id (add).

History

#1 Updated by SpiceGuid - about 16 years ago

Certainly n . id (add) is the same as add(n), isn't it ?
So, why does it compile ?

Also available in: Atom PDF

Redmine Appliance - Powered by TurnKey Linux