-fno-monomorphism-restriction

Christian Maeder maeder at tzi.de
Wed Nov 24 08:44:07 EST 2004


Hi,

I've a file ATC/Sml_cats.hs that does not compile (see below) with the 
flag -fno-monomorphism-restriction (ghc 6.2.2), whereas it compiles fine 
without that option. Since I want to use -fno-monomorphism-restriction 
for other files (from programatica) I've a problem, because there is no 
option -fmonomorphism-restriction that I could place inside of 
ATC/Sml_cats.hs.

If someone wants to reproduce the error, do the following:
1) check out HetCATS repository with:
cvs -d pserver:cvsread at cvs-agbkb.informatik.uni-bremen.de:/repository co 
HetCATS
2) comment out variable HC_PACKAGE in the Makefile (to avoid dependency 
from uni)
3) add the flag -fno-monomorphism-restriction to the variable HC_FLAGS
4) call (GNU) make

Cheers Christian

Compiling ATC.Sml_cats     ( ./ATC/Sml_cats.hs, ./ATC/Sml_cats.o )

./ATC/Sml_cats.hs:23:
     Ambiguous type variable `a' in the top-level constraint:
       `ATermConvertibleSML a'
         arising from use of `ad'' at ./ATC/Sml_cats.hs:2068

./ATC/Sml_cats.hs:23:
     Ambiguous type variable `a1' in the top-level constraint:
       `ATermConvertibleSML a1'
         arising from use of `aa'' at ./ATC/Sml_cats.hs:1501

./ATC/Sml_cats.hs:23:
     Ambiguous type variable `a2' in the top-level constraint:
       `ATermConvertibleSML a2'
         arising from use of `aa'' at ./ATC/Sml_cats.hs:1479

./ATC/Sml_cats.hs:23:
     Ambiguous type variable `a3' in the top-level constraint:
       `ATermConvertibleSML a3'
         arising from use of `las' at ./ATC/Sml_cats.hs:421


More information about the Glasgow-haskell-users mailing list