[GHC] #6018: Injective type families

GHC ghc-devs at haskell.org
Wed Sep 10 23:58:16 UTC 2014


#6018: Injective type families
-------------------------------------+-------------------------------------
              Reporter:  lunaris     |            Owner:  jstolarek
                  Type:  feature     |           Status:  new
  request                            |        Milestone:  7.10.1
              Priority:  normal      |          Version:  7.4.1
             Component:  Compiler    |         Keywords:  TypeFamilies,
            Resolution:              |  Injective
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:              |       Blocked By:
  None/Unknown                       |  Related Tickets:  #4259
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 Replying to [comment:58 jstolarek]:
 > I thought about it and I believe this should be possible. But we could
 only infer normal injectivity. I believe an algorithm for inferring
 injectivity in some of the parameters (ie. things like `result a -> b c`
 or `result -> b c` for a 3-arity type family) would be exponential in the
 number of arguments.

 I don't know anything about this, but what's wrong with exponential time
 here? This inference only happens once per closed type family, right? How
 many variables are there likely to be?

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/6018#comment:62>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list