6.12.1. Switching off the Monomorphism Restriction

MonomorphismRestriction
Status:

Enabled by default.

Since:

6.8.1

Apply the monomorphism restriction to bindings lacking explicit type signatures.

Haskell’s monomorphism restriction (see Section 4.5.5 of the Haskell Report) can be completely switched off by NoMonomorphismRestriction. Since GHC 7.8.1, the monomorphism restriction is switched off by default in GHCi’s interactive options (see Setting options for interactive evaluation only).

© 2002–2007 The University Court of the University of Glasgow. All rights reserved.
Licensed under the Glasgow Haskell Compiler License.
https://downloads.haskell.org/~ghc/9.12.1/docs/users_guide/exts/monomorphism.html