[Haskell-cafe] -XGADTs changes type for program that does not contain GADT

Andres Löh andres at well-typed.com
Fri Feb 12 13:05:12 UTC 2016


Hi.

> the following type-correct program does not contain GADT syntax.
> When I activate GADT language pragma, it does no longer typecheck.

This is because -XGADTs implies -XMonoLocalBinds. See
https://ghc.haskell.org/trac/ghc/blog/LetGeneralisationInGhc7 for a
longer explanation.

Cheers,
  Andres

-- 
Andres Löh, Haskell Consultant
Well-Typed LLP, http://www.well-typed.com

Registered in England & Wales, OC335890
250 Ice Wharf, 17 New Wharf Road, London N1 9RF, England


More information about the Haskell-Cafe mailing list