Reading type families from interface files

Jan Stolarek jan.stolarek at p.lodz.pl
Thu Oct 23 10:31:00 UTC 2014


Say I have:

module Foo where
 type family F a
 type instance F Int = Char

mi_fam_insts stores type family instances, in that case "F Int = Char". What I would like to load 
is type family declaration: "F a". If that does not exist already I wonder whether information 
about type family declarations should be cached in ModDetails in the same way md_fam_insts caches 
information about instances?

Rationale: I want to load information about tyfam declarations in FamInst.checkFamInstConsistency 
and pass these definitions of type families to FamInst.checkForConflicts. My plan is to verify 
whether an open type family is injective at the same time when looking for conflicts.

Janek

Dnia czwartek, 23 października 2014, napisałeś:
> I don't know what you mean. Can you be more explicit.  The mi_fam_insts
> field of a ModIface sounds like what you want
>
> |  -----Original Message-----
> |  From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of Jan
> |  Stolarek
> |  Sent: 23 October 2014 08:50
> |  To: ghc-devs at haskell.org
> |  Subject: Reading type families from interface files
> |
> |  Devs,
> |
> |  Is there a plumbing for returning declarations (not instances) of type
> |  families from an interface file?
> |
> |  Janek
> |  _______________________________________________
> |  ghc-devs mailing list
> |  ghc-devs at haskell.org
> |  http://www.haskell.org/mailman/listinfo/ghc-devs




More information about the ghc-devs mailing list