hs-boot types in 6.8.2

Serge D. Mechveliani mechvel at botik.ru
Mon Jan 7 10:56:13 EST 2008


Dear GHC developers,

This is about possibile bug in  ghc-6.8.2  related to types in  hs-boot.

I have a project with module import loop, in which the module  Split  
imports the source of  Reduce. 
Now, I changed the type of the function  Reduce.evaluate_c
and forgotten to change it in  Reduce.hs-boot.

When GHC `makes' this project (under Cabal), it first processes
Reduce[boot], and then gets to  Split.hs:

------------------------------------------------------------------
[16 of 45] Compiling Dumatel.Reduce[boot] 
            ( Dumatel/Reduce.hs-boot, dist/build/Dumatel/Reduce.o-boot )
[17 of 45] Compiling Split            ( Split.hs, dist/build/Split.o )

Split.hs:393:58:
    Couldn't match expected type `Term' against inferred type `[a]'
    In the third argument of `evaluate_c', namely `[]'
...
---------------------------------------------------------

-- and it only reports of several type mismatches in  Split.hs.
If the user guesses to fix the type in  Reduce.hs-boot,  the `make' 
improves.

In many situations, GHC reports first what namely is the type 
disagreement between *.hs and *.hs-boot.
But not in this situation.
And here the report is misleading: the user looks into Reduce.hs and 
Splis.hs, and wonders what is wrong with types.

Can this be fixed ?

If you ask me, I would provide the source on www.

Thank you in advance for your explanation.

-----------------
Serge Mechveliani
mechvel at botik.ru


More information about the Glasgow-haskell-bugs mailing list