Hi,
Is there a way to have GHC reduce all (reducable) type familiy
applications? For example, if I have
```
type family Id x where
Id x = x
foo :: Bool -> Id Bool
foo x = x
```
then I would like the `Id` of `foo` to have type `Bool -> Bool`, and the
generated Core should be either `foo = \x -> x` or, if that's asking
for too much, at least something like `foo = \x -> x |>
(somePossiblyOvercomplicatedCoercion :: Bool ~ Bool)`.
Is there already some functionality for this in GHC? If not, how messy
would it be to implement it as a separate `CoreProgram` transformation
just after desugaring? It'd need to be immediately after desugaring
because I would like e.g. the specialiser to already specialise in terms
of these reduced types.
Thanks,
Gergo
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs