Opened 16 years ago

Closed 16 years ago

Last modified 48 years ago

#576 closed bug (Fixed)

Suspicious types when using -fext-core

Reported by: nobody Owned by: nobody
Priority: normal Milestone:
Component: Compiler Version: None
Keywords: Cc:
Operating System: Architecture:
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


I've tried the -fext-core flag. It seems to work well
but emits types that are a bit suspicious.
When I have the following class declaration

class Vändbar a where
  vänd :: a -> a

I get the following code with the -fext-core flag:

  zCDVändbar :: %forall a . (a -> a) -> a -> a =
    %note "InlineMe"
    \ @ a10 (tpl::a10 -> a10) -> tpl;
  vänd :: %forall a . (a -> a) -> a -> a =
    \ @ a10 (tpl::a -> a) -> tpl;

Look carefully at the definition of the function vänd.
The type of it's argument tpl should really be a10 ->
a10 just as in zCDVändbar.

Change History (1)

comment:1 Changed 16 years ago by simonpj

Status: assignedclosed
Logged In: YES 

Fixed, thank you.
It turns out that an arguably-ok optimistation in type 
substitution interacted badly with the external-core 
printing stuff.  The simplest solution was to remove 
the "optimisation".

Note: See TracTickets for help on using tickets.