[ ghc-Bugs-452036 ] Suspicious types when using -fext-core

noreply@sourceforge.net noreply@sourceforge.net
Mon, 20 Aug 2001 04:05:28 -0700


Bugs item #452036, was opened at 2001-08-17 05:48
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=108032&aid=452036&group_id=8032

Category: Compiler
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Suspicious types when using -fext-core

Initial Comment:
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.

----------------------------------------------------------------------

>Comment By: Simon Peyton Jones (simonpj)
Date: 2001-08-20 04:05

Message:
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".




----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=108032&aid=452036&group_id=8032