-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The changes are: 1. No impredicative types in `Typeable` 2. Distinguish normal tuples, from tuples of constraints.
- Loading branch information
Showing
8 changed files
with
58 additions
and
22 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{-# LANGUAGE ImpredicativeTypes #-} | ||
{-# LANGUAGE FlexibleContexts #-} | ||
|
||
module T9858b where | ||
import Data.Typeable | ||
|
||
test = typeRep (Proxy :: Proxy (Eq Int => Int)) | ||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
T9858b.hs:7:8: error: | ||
No instance for (Typeable (Eq Int => Int)) | ||
(maybe you haven't applied a function to enough arguments?) | ||
arising from a use of ‘typeRep’ | ||
In the expression: typeRep (Proxy :: Proxy (Eq Int => Int)) | ||
In an equation for ‘test’: | ||
test = typeRep (Proxy :: Proxy (Eq Int => Int)) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{-# LANGUAGE KindSignatures #-} | ||
module Main(main) where | ||
|
||
import Data.Typeable | ||
import GHC.Exts | ||
|
||
test1 :: Bool | ||
test1 = typeRep (Proxy :: Proxy (() :: *)) == | ||
typeRep (Proxy :: Proxy (() :: Constraint)) | ||
|
||
test2 :: Bool | ||
test2 = typeRepTyCon (typeRep (Proxy :: Proxy (Int,Int))) == | ||
typeRepTyCon (typeRep (Proxy :: Proxy (Eq Int, Eq Int))) | ||
|
||
main :: IO () | ||
main = print (test1,test2) | ||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(False,False) |
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