RE: Missing class op rules when using API

2022-10-17 Thread Erdi, Gergo via ghc-devs
PUBLIC What I've found out is that this was because I was registering the ModDetails as it comes out of tidyProgram. If instead I recreate the ModDetails form the ModIface via initModDetails, the class op rules show up properly and everything works as expected. Is this documented some

Missing class op rules when using API

2022-10-17 Thread Erdi, Gergo via ghc-devs
PUBLIC Hi, I'm trying to compile the following two modules: ``` {-# LANGUAGE NoImplicitPrelude #-} module MiniMonad where class Functor f where fmap :: (a -> b) -> f a -> f b class (Functor f) => Applicative f where pure :: a -> f a class (Applicative m) => Monad m where return ::

RE: Class op rules

2020-03-09 Thread Simon Peyton Jones via ghc-devs
on it. And it provides a solid write up to refer to from the implementation. You could draw on this thread for the raw material, so it would not be hard to write. Simon From: Christiaan Baaij Sent: 07 March 2020 08:53 To: Simon Peyton Jones Cc: Conal Elliott ; ghc-devs Subject: Re: Class op

Re: Class op rules

2020-03-07 Thread Christiaan Baaij
ojection" are implemented as rewrite rules >> and executed the same way as other user-defined RULES >> 2. These rules run first, and you cannot run anything before them >> >> Now my question is, is 1. actually true? or is that warning just a >> (white) lie? >

Re: Class op rules

2020-03-07 Thread Christiaan Baaij
selector. > > > > I remember Conal raising this before, but I’ve forgotten the resolution. > I’m entirely open to changes here, if someone is willing to do the work, > including checking for consequences. > > > > Simon > > > > *From:* ghc-devs *On Behalf

Re: Class op rules

2020-03-06 Thread Dr . ÉRDI Gergő
y true? or is that warning just a (white) > lie? > If 1. is actually true, would there be any objections to adding a "-1" > phase: where RULES specified to start from phase "-1" onward fire before > any of the Class op rules. > I'm quite willing to implement t

RE: Class op rules

2020-03-06 Thread Simon Peyton Jones via ghc-devs
to changes here, if someone is willing to do the work, including checking for consequences. Simon From: ghc-devs On Behalf Of Conal Elliott Sent: 06 March 2020 17:37 To: Christiaan Baaij Cc: ghc-devs Subject: Re: Class op rules Thank you for raising this issue, Christiaan! The current pol

Re: Class op rules

2020-03-06 Thread Carter Schonwald
> If 1. is actually true, would there be any objections to adding a "-1" > phase: where RULES specified to start from phase "-1" onward fire before > any of the Class op rules. > I'm quite willing to implement the above if A) Class op rules are actually > implemen

Re: Class op rules

2020-03-06 Thread Conal Elliott
is that warning just a (white) > lie? > If 1. is actually true, would there be any objections to adding a "-1" > phase: where RULES specified to start from phase "-1" onward fire before > any of the Class op rules. > I'm quite willing to implem

Class op rules

2020-03-06 Thread Christiaan Baaij
es run first, and you cannot run anything before them Now my question is, is 1. actually true? or is that warning just a (white) lie? If 1. is actually true, would there be any objections to adding a "-1" phase: where RULES specified to start from phase "-1" onward fire before