-fno-monomorphism-restriction

Simon Peyton-Jones simonpj at microsoft.com
Fri Nov 26 03:41:36 EST 2004


I'm not sure whether you are saying (a) or (b):

a) This is a compiler bug; even with -fno-monomorphism-restriction
	the module should compile.  Are you sure?

b) this is a feature request: you want a flag -fmonomorphism-restriction
	to restore the monomorphism restriction even if it's been turned
	off by an earlier flag?

rsvp

Simon

| -----Original Message-----
| From: glasgow-haskell-users-bounces at haskell.org
[mailto:glasgow-haskell-users-
| bounces at haskell.org] On Behalf Of Christian Maeder
| Sent: 24 November 2004 13:44
| To: GHC Users Mailing List
| Subject: -fno-monomorphism-restriction
| 
| 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
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


More information about the Glasgow-haskell-users mailing list