Created
January 29, 2015 15:54
-
-
Save kgadek/be334e27f4a45c21ba92 to your computer and use it in GitHub Desktop.
How to force typechecker not to instantiate `id` ?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RankNTypes, ImpredicativeTypes, ScopedTypeVariables #-} | |
main = return () | |
data Lam f = Lam f | |
helper = | |
let a = Lam undefined :: Lam (forall a. a -> a) | |
--b = Lam id :: Lam (forall a. a -> a) | |
--c = Lam id2 :: Lam (forall a. a -> a) | |
in () | |
id2 :: forall a. a -> a | |
id2 x = x | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment