Is there a technical reason that would prevent the compiler from honoring a per-file pragma that allowed the developer to define how the code was expected to be interpreted by the compiler?
I find it terribly confusing. It means that Haskell is almost never something I can expect a lot from, but a weird combination of extensions changing to "non-standard" behaviours.
> It means that Haskell is almost never something I can expect a lot from, but a weird combination of extensions changing to "non-standard" behaviours.
I can't think of a weird combination of behaviors from extensions that would change semantics... maybe it's because I don't use that many extensions usually.
When I do they are related to type level programming and all they seem to affect is type inference.
Never confused me. In general, on a bigger project you'll have a bunch of approved extensions, and everything extra goes through very strict code review to see whether it helps more than it confuses.
I don't know whether you can, but it would be asking for trouble. Let's say you call function f in library L and get back a std::list, and then pass it to function g in library M, which linked to a different implementation of std:list. At best, that would lead to a crash.