D202: Injective type families

Simon Peyton Jones simonpj at microsoft.com
Wed Oct 22 18:25:56 UTC 2014


Devs

I now know how to use 'arc patch' to get a Phab ticket onto my disk.  But if I edit the code, can I make a git commit and upload it back to D202?  That would be akin to sharing a branch with (in this case Jan) the author.  How do I do that?  It is often more direct than making comments.

Simon
________________________________________
From: noreply at phabricator.haskell.org [noreply at phabricator.haskell.org]
Sent: 22 October 2014 14:18
To: Simon Peyton Jones
Subject: [Differential] [Updated, 486 lines] D202: Injective type families

jstolarek updated this revision to Diff 961.
jstolarek added a comment.

The implementation of parser and renamer is finished (subject to revisions of
course). The parser recognizes injectivity declaration for closed and open type
families and for associated types. Renamer checks whether the injectivity
condition is well-formed. If it's not then it prints out informative (hopefully)
error message. I've made the decission to require that type variables on the RHS
of injectivity condition should be placed in exactly the same order as they were
declared in type family head. Thanks to this the implementation of renaming is
linear in the numer of type variables. Also, SynTyCon stores a list of Bools and
so the functions are allowed to be injective only in some arguments.

What remains to be done is:

 1. type checking of injectivity (ie. whether the function declared as injective
    really is injective).

 2. extending constraint solver with knowledge about injectivity

REPOSITORY
  rGHC Glasgow Haskell Compiler

CHANGES SINCE LAST UPDATE
  https://phabricator.haskell.org/D202?vs=960&id=961

BRANCH
  T6018-injective-type-families

REVISION DETAIL
  https://phabricator.haskell.org/D202

AFFECTED FILES
  compiler/deSugar/DsMeta.hs
  compiler/hsSyn/Convert.lhs
  compiler/hsSyn/HsDecls.lhs
  compiler/iface/BuildTyCl.lhs
  compiler/iface/IfaceSyn.lhs
  compiler/iface/MkIface.lhs
  compiler/iface/TcIface.lhs
  compiler/parser/Parser.y.pp
  compiler/parser/RdrHsSyn.lhs
  compiler/prelude/TysPrim.lhs
  compiler/rename/RnSource.lhs
  compiler/rename/RnTypes.lhs
  compiler/typecheck/TcCanonical.lhs
  compiler/typecheck/TcInstDcls.lhs
  compiler/typecheck/TcInteract.lhs
  compiler/typecheck/TcTyClsDecls.lhs
  compiler/typecheck/TcTypeNats.hs
  compiler/types/CoAxiom.lhs
  compiler/types/FamInstEnv.lhs
  compiler/types/TyCon.lhs
  compiler/vectorise/Vectorise/Type/Env.hs

REPLY HANDLER ACTIONS
  Reply to comment, or !reject, !abandon, !reclaim, !resign, !rethink, !unsubscribe.

To: jstolarek, simonpj, goldfire, austin
Cc: thomie, goldfire, simonmar, ezyang, carter, Mikolaj


More information about the ghc-devs mailing list