Created
February 13, 2019 16:36
-
-
Save RyanGlScott/b031e7f37e8884fdf29b1422da1f2e3e to your computer and use it in GitHub Desktop.
Pattern synonym existential scoping weirdness
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 ExistentialQuantification #-} | |
{-# LANGUAGE PatternSynonyms #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
module Bug where | |
import Data.Kind | |
import Data.Proxy | |
data T = forall k (a :: k). MkT (Proxy a) | |
-- Uncomment `k` and it typechecks | |
pattern P :: forall. () => forall {-k-} (a :: k). Proxy a -> T | |
pattern P x = MkT (x :: Proxy (a :: k)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment