Skip to content

Instantly share code, notes, and snippets.

@gelisam
Created May 3, 2014 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gelisam/f966c5efe79c3ad83515 to your computer and use it in GitHub Desktop.
Save gelisam/f966c5efe79c3ad83515 to your computer and use it in GitHub Desktop.
RankNTypes Regression
{-# LANGUAGE RankNTypes #-}
applyId :: (forall a. a -> a) -> b -> b
applyId f = f
passes :: [b] -> [b]
passes = map (applyId id)
-- works with ghc 7.6, fails with ghc 7.8
fails :: [b] -> [b]
fails = (map . applyId) id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment