Opened 13 years ago

Closed 13 years ago

Last modified 44 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: Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

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 13 years ago by simonpj

  • Status changed from assigned to closed
Logged In: YES 
user_id=50165

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.