15

This page usages

$ ghci -XNoMonomorphismRestriction

to start the haskell interpreter.

What does XNoMonomorphismRestriction switch mean?

Josh Lee
  • 171,072
  • 38
  • 269
  • 275
Pratik Deoghare
  • 35,497
  • 30
  • 100
  • 146

1 Answers1

20

It turns off the Monomorphism restriction, which restricts values which are not defined using "function notation"¹ to have a non-polymorphic type.


¹ By "not using function notation" I mean that they're defined as foo = something and not foo bar = something, i.e. the definition does not contain explicit arguments.

sepp2k
  • 363,768
  • 54
  • 674
  • 675