-
-
Save Lysxia/38de0028bad0ac86cb594da7e122f1da to your computer and use it in GitHub Desktop.
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, GADTs #-} | |
data Foo a = B ((a ~ Int) => a) | |
-- Doesn't check | |
-- f :: Foo a -> Int | |
-- f (B n) = n | |
data Foo' a where | |
B' :: (a ~ Int) => a -> Foo' a | |
g :: Foo' a -> Int | |
g (B' n) = n | |
main = main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment