Last active
August 29, 2015 14:12
-
-
Save philopon/cc7fec333a8fa011a8be to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| module Test where | |
| foreign import data A :: * | |
| foreign import data C :: * | |
| foreign import data B :: * | |
| newtype Test (a :: #*) = Test String | |
| a :: Test (a :: A) | |
| a = Test "neko" | |
| b :: Test (a :: A, b :: B) | |
| b = Test "neko" | |
| c :: Test (c :: C) | |
| c = Test "nyan" | |
| test :: forall e. Test (a :: A | e) -> String | |
| test (Test a) = a | |
| testA :: String | |
| testA = test a | |
| testB :: String | |
| testB = test b | |
| -- testC = test c -- compile error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment