Re: Unprincipled defaults
Whoa. I was far too confident that wouldn't work! On Sep 2, 2016 12:39 PM, "Richard Eisenberg"wrote: > I feel like I must be missing something, but what's wrong with > > class Semigroup1 f where > op :: f a -> f a -> f a > > default op :: Monoid (f a) => f a -> f a -> f a > op = (<>) > > > ? Does that do what you like? > > Richard > > > On Sep 1, 2016, at 11:15 PM, David Feuer wrote: > > On occasion, it can be useful to have default definitions that don't > typecheck even with DefaultSignatures. It would be nice to be able to use > them anyway. For example, if we have > > class Semigroup1 f where > op :: f a -> f a -> f a > > then we could, hypothetically, give a default definition for (<>): > > default (<>) :: Semigroup1 f => f a -> f a -> f a > (<>) = op > > But we can't give a default definition > > op = (<>) > > because there's no way to write its signature. However, for any F with > > instance Semigroup (F a) where ... > > the definition op = (<>) is perfectly fine. > > Would it be possible to offer a completely wild defaulting mechanism > allowing *any expression* as a default, and only checking its type and > compiling it when it's actually used? > ___ > ghc-devs mailing list > ghc-devs@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > > ___ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Re: Build GHC on Windows using Hadrian and Stack
Nice work! Edward Excerpts from Andrey Mokhov's message of 2016-09-02 02:45:58 +: > Hi all, > > Summary: Building GHC on Windows using Hadrian and Stack got even simpler - > see https://github.com/snowleopard/hadrian/blob/master/doc/windows.md. > > > To build GHC on Windows you usually need to jump through a lot of hoops [1], > which may be confusing even for experienced GHC developers [2]. > > Hadrian to the rescue! > > Hadrian, a new build system for GHC that I've been developing [3], is written > in Haskell and can therefore be built and run via Stack that can install > appropriate bootstrapping GHC and MSYS2 environment in an automated and > robust way. This was first pointed out by Neil Mitchell [4], and I've > recently simplified build instructions even further. Here are all the steps: > > git clone --recursive git://git.haskell.org/ghc.git > cd ghc > git clone git://github.com/snowleopard/hadrian > cd hadrian > stack setup > stack exec -- pacman -S autoconf automake-wrapper make patch tar --noconfirm > stack build > stack exec hadrian -- --directory ".." -j --flavour=quickest > > See more details here: > https://github.com/snowleopard/hadrian/blob/master/doc/windows.md. > > NB: Hadrian can build Stage2 GHC, but there are still many limitations [5]. > Help make it better! > > [1] https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows > [2] https://mail.haskell.org/pipermail/ghc-devs/2016-June/012340.html > [3] https://github.com/snowleopard/hadrian > [4] http://neilmitchell.blogspot.co.uk/2016/03/compiling-ghc-on-windows.html > [5] https://github.com/snowleopard/hadrian#current-limitations > > Cheers, > Andrey ___ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs