Skip to content

Option GADTs specialises a polymorphic value in local bindings

This module typechecks WITHOUT the extension GADTs and doesn't typecheck WITH the extension GADTs

Since it has nothing to do with GADTs, the consequence of using the option is surprising.

I witnessed this behaviour on GHC versions 7.6.3, 7.8.3, 7.8.4, 7.10.1

{-# LANGUAGE
     RankNTypes
   , GADTs  
 #-}
module GADTMonomorphism where

problem :: (forall x . () -> x) -> (a,b)
problem f = (p, p)
  where p = f ()
Trac metadata
Trac field Value
Version 7.10.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Edited by bales
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information