[GHC] #8778: Typeable TypeNats
GHC
ghc-devs at haskell.org
Mon Jun 16 23:08:57 UTC 2014
#8778: Typeable TypeNats
--------------------------------------------+------------------------------
Reporter: dmcclean | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: ⊥
Component: Compiler (Type checker) | Version: 7.8.1-rc1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets: 4385
--------------------------------------------+------------------------------
Comment (by diatchki):
Aha, thanks for the Phabricator tip!
I redid the instances to be of the form `\_ -> blah`.
About the `Typeable` instance: in normal modules we only allow machine-
generated instances. The module `Data.Typeable.Internal` is an exception
though---it allows manual instances to accommodate custom instances for
some types.
One note about the type-literal instances: they have a much higher
chance of collision than a typical kind, as both `Nat` and `Symbol` have
infinitely many type-constructors, which need to fit into the fingerprint.
I am not sure how much of a realistic problem this is, but it is something
to keep in mind.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8778#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list