forall in constraint

Simon Peyton Jones simonpj at microsoft.com
Mon Oct 23 21:04:36 UTC 2017


I’m lost. Could you give me a bit more context?

I’m deeply suspicious about that ForallXImplicitBndrs thing with strange higher kinded parameters.   Smells all wrong to me.

Simon

From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of Alan & Kim Zimmerman
Sent: 23 October 2017 16:07
To: ghc-devs at haskell.org
Subject: forall in constraint

I am working on the Trees that Grow stuff, and hit a small problem
I have

type family XIB               x thing
type family XNewImplicitBndrs x thing

type ForallXImplicitBndrs (c :: * -> Constraint) (x :: *) (thing :: *) =
       ( c (XIB               x thing)
       , c (XNewImplicitBndrs x thing)
       )
and I want to extend the DataId constraint

type DataId p =
  ( Data p

  , ForallXImplicitBndrs Data p thing
  )
But the problem is I do not have `thing` at this point, and to get it in the code will involve some hs-boot nastiness.
Is there any way to require "forall thing. Data thing" inside the DataId constraint?
Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20171023/7c71cf13/attachment.html>


More information about the ghc-devs mailing list