RE: deriving Bits
Can you give an example? GHC has no specific code for Bits as far as I know. Perhaps you are using GeneralisedNewtypeDeriving? You don't give enough context to say. Simon | -Original Message- | From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Kazu | Yamamoto | Sent: 03 September 2014 06:48 | To: ghc-devs@haskell.org | Subject: deriving Bits | | Hi, | | Recently, I found that we can put Bits in deriving. I checked the | GHC manual but it seems to me that this page does not cover Bits: | | https://www.haskell.org/ghc/docs/7.8.3/html/users_guide/deriving.h | tml | | Are there any other classes which can be automatically derived and are | not listed in this page? | | If the number of such classes is not large, how about adding them to | this page? | | --Kazu | ___ | ghc-devs mailing list | ghc-devs@haskell.org | http://www.haskell.org/mailman/listinfo/ghc-devs ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: deriving Bits
Hi Simon, Can you give an example? GHC has no specific code for Bits as far as I know. Perhaps you are using GeneralisedNewtypeDeriving? You don't give enough context to say. Yes, I'm using GeneralisedNewtypeDeriving. So, my question should be: Are there any other classes which can be automatically derived if GeneralisedNewtypeDeriving is specified and are not listed in this page? --Kazu ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
RE: deriving Bits
As the GND documentation says, it works for ANY class. So we can't list them! It works for classes you define and we don't know about. Here is the documentation: http://www.haskell.org/ghc/docs/latest/html/users_guide/deriving.html#newtype-deriving Simon | -Original Message- | From: Kazu Yamamoto [mailto:k...@iij.ad.jp] | Sent: 03 September 2014 07:35 | To: Simon Peyton Jones | Cc: ghc-devs@haskell.org | Subject: Re: deriving Bits | | Hi Simon, | | Can you give an example? GHC has no specific code for Bits as far | as I know. Perhaps you are using GeneralisedNewtypeDeriving? You | don't give enough context to say. | | Yes, I'm using GeneralisedNewtypeDeriving. So, my question should be: | | Are there any other classes which can be automatically derived if | GeneralisedNewtypeDeriving is specified and are not listed in this | page? | | --Kazu ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: deriving Bits
Simon, As the GND documentation says, it works for ANY class. So we can't list them! Understand. Thanks. --Kazu ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: PROPOSAL: Make Data.Type.Bool.If polykinded
Hi Richard, It would appear that you’re right! I had expected GHC to infer the kind Constraint for () from the second argument, rather than reporting an error, but adding an explicit annotation works. I would still say that warrants a clearer error message from GHC, but at least it works :) Cheers, Merijn On 02 Sep 2014, at 01:20 , Richard Eisenberg e...@cis.upenn.edu wrote: Hi Merijn, I believe that `If` is already the way you want: λ :k If If :: Bool - k - k - k The problem in your code is that GHC is a little... er... unprincipled about the kind of `()`. It basically assumes that `()` is of kind `*` unless it is very, absolutely, abundantly obvious that it should have kind `Constraint`. Your code is not abundantly obvious enough in this regard. If you say `If cond (() :: Constraint) (...) = ...`, I believe your code will work. Does this in fact work for you? Richard On Sep 1, 2014, at 11:41 PM, Merijn Verstraaten mer...@inconsistent.nl wrote: Ola! Currently we have: type family If cond tru fls where If True tru fls = tru If False tru fls = fls Unfortunately, this appears to turned into a monomorphicly kinded type family by GHC, which means it’s impossible to do foo :: If cond () (“Condition does not hold” ~ “”) = Foo - Bar or similar fancy constraints. I hereby propose altering If to: type family If (cond :: Bool) (tru :: k) (fls :: k) :: k where If True tru fls = tru If False tru fls = fls Allowing it to work with kinds other than *. Discussion period: 2 weeks? Seems like a minor change. Cheers, Merijn ___ Libraries mailing list librar...@haskell.org http://www.haskell.org/mailman/listinfo/libraries signature.asc Description: Message signed with OpenPGP using GPGMail ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Status updates
Hi *, Here are some status updates for the past week, which have been a bit light. - I spent a bunch of time code reviewing things and merging patches this week. There are still things in Phabricator that need some review, so please review them if you get a chance! You will probably learn things and learning things is good. [1] - I spent more time getting a Windows builder working, and talking with upstream about it. I believe it should Basically Work, but unfortunately the changes for this have not gone upstream yet, so it will probably be a week or two before I can officially do that - I have spent some time fixing some bugs, and I'm posting a review for some shortly, notably 7602! Unrelated to what I in particular am doing Right Now: - I would still _really_ like help with the Applicative Monad patch; I haven't touched it much. Please pester me if you have some cycles to spare. Or just helping me brainstorm would be really really useful![2] - After some minor instability in the tree earlier this week (test failures), everything is back to normal (Thanks to Edward Simon). Please ping here if you're still having trouble on your machine. - I still think we should turn on --slow mode for our buildbots soon, but this will cause noise. I'd really like some inputs on this - maybe someone would like to help clean up the 'slow' vaildate failures? Bonus points for this, since you don't even have to - Gabor Pali I had a minor discussion this last week about fixing nightly documentation snapshots. We've had complaints about this in the past and the prior system totally disappeared, so it will be really nice to fix this! Binary snapshots should be possible too, but documentation is perhaps the more key thing. A little work is necessary for this though, and my time is limited as always. Please let me know if you'd like to help with this, and I'll pull you into the loop with Gabor so can tackle this. I've probably forgotten some things other people have done the past week, including myself. If you have any questions, suggestions, or want to pop in on this email and say something, you should. :) [1] https://phabricator.haskell.org/differential/ [2] https://phabricator.haskell.org/D13 -- Regards, Austin Seipp, Haskell Consultant Well-Typed LLP, http://www.well-typed.com/ ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: Status updates
On Wed, Sep 3, 2014 at 3:31 PM, Austin Seipp aus...@well-typed.com wrote: - I still think we should turn on --slow mode for our buildbots soon, but this will cause noise. I'd really like some inputs on this - maybe someone would like to help clean up the 'slow' vaildate failures? Bonus points for this, since you don't even have to Hmmm, I accidentally the rest of this paragraph. To finish: Bonus points here, since you can leave most of the 'heavy lifting' to phabricator. I can just turn on --slow mode, you submit a patch, and Phabricator tells you if it works. :) And if you'd like to fix some problems but are shy, this might be a good place to start! (Tests are small, self contained, and should be easy to follow via the bug tracker - there shouldn't be *too* much to wade through to get started.) -- Regards, Austin Seipp, Haskell Consultant Well-Typed LLP, http://www.well-typed.com/ ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: Status updates
2014-09-03 22:31 GMT+02:00 Austin Seipp aus...@well-typed.com: - Gabor Pali I had a minor discussion this last week about fixing nightly documentation snapshots. We've had complaints about this in the past and the prior system totally disappeared, so it will be really nice to fix this! Binary snapshots should be possible too, but documentation is perhaps the more key thing. I have not followed up on it, but for your information, I have started building and publishing snapshots for the GHC documentation here: http://haskell.inf.elte.hu/docs/ It is based on the snapshots provided by the builders I have and it uses a script that is derived from the mkDocs utility in the source tree (under distrib). As a consequence, the method is a bit fragile, as it needs at least a Windows and non-Windows build to be built in order to extract and combine the files from them. Unfortunately, my Windows builders are not fully stable yet, although they deemed to be usable enough mostly. ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
RE: Status updates
That's great! Austin, can you fix the links on http://www.haskell.org/haskellwiki/GHC so that the current HEAD snapshot link (currently dead) points to the right place? thanks Simon | -Original Message- | From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Páli | Gábor János | Sent: 03 September 2014 21:48 | To: Austin Seipp | Cc: ghc-devs@haskell.org | Subject: Re: Status updates | | 2014-09-03 22:31 GMT+02:00 Austin Seipp aus...@well-typed.com: | - Gabor Pali I had a minor discussion this last week about fixing | nightly documentation snapshots. We've had complaints about this in | the past and the prior system totally disappeared, so it will be | really nice to fix this! Binary snapshots should be possible too, but | documentation is perhaps the more key thing. | | I have not followed up on it, but for your information, I have started | building and publishing snapshots for the GHC documentation here: | | http://haskell.inf.elte.hu/docs/ | | It is based on the snapshots provided by the builders I have and it | uses a script that is derived from the mkDocs utility in the source | tree (under distrib). As a consequence, the method is a bit | fragile, as it needs at least a Windows and non-Windows build to be | built in order to extract and combine the files from them. | Unfortunately, my Windows builders are not fully stable yet, although | they deemed to be usable enough mostly. | ___ | ghc-devs mailing list | ghc-devs@haskell.org | http://www.haskell.org/mailman/listinfo/ghc-devs ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs