From zubin at well-typed.com Sun Jun 6 00:10:57 2021 From: zubin at well-typed.com (Zubin Duggal) Date: Sun, 6 Jun 2021 05:40:57 +0530 Subject: [Haskell] [ANNOUNCE] GHC 8.10.5 released Message-ID: <20210606001057.2ku6z5zjjv5skw7q@zubin-msi> The GHC team is very pleased to announce the availability of GHC 8.10.5. Source and binary distributions are available at the [usual place](https://downloads.haskell.org/ghc/8.10.5/). This release adds native ARM/Darwin support, as well as bringing performance improvements and fixing numerous bugs of varying severity present in the 8.10 series: - First-class support for Apple M1 hardware using GHC's LLVM ARM backend - Fix a bug resulting in segmentation faults where code may be unloaded prematurely when using the parallel garbage collector (#19417) along with other bugs in the GC and linker (#19147, #19287) - Improve code layout fixing certain performance regressions (#18053) and other code generation bug fixes (#19645) - Bug fixes for signal handling when using the pthread itimer implementation. - Improvements to the specializer and simplifier reducing code size and and memory usage (#17151, #18923,#18140, #10421, #18282, #13253). - Fix a bug where typechecker plugins could be run with an inconsistent typechecker environment (#19191). - Fix a simplifier bug which lead to an exponential blow up and excessive memory usage in certain cases A complete list of bug fixes and improvements can be found in the release notes: [release notes](https://downloads.haskell.org/~ghc/8.10.5/docs/html/users_guide/8.10.5-notes.html) As always, feel free to report any issues you encounter via [gitlab.haskell.org](https://gitlab.haskell.org/ghc/ghc/-/issues/new). From zubin at well-typed.com Sun Jun 6 00:44:30 2021 From: zubin at well-typed.com (Zubin Duggal) Date: Sun, 6 Jun 2021 06:14:30 +0530 Subject: [Haskell] [ANNOUNCE] GHC 8.10.5 released In-Reply-To: <20210606001057.2ku6z5zjjv5skw7q@zubin-msi> References: <20210606001057.2ku6z5zjjv5skw7q@zubin-msi> Message-ID: <20210606004430.gc2a6t7eglidmri6@zubin-msi> The correct link to the release notes is: https://downloads.haskell.org/ghc/8.10.5/docs/html/users_guide/8.10.5-notes.html (Note the missing tilde) Apolgies, Zubin From juhpetersen at gmail.com Thu Jun 10 11:25:16 2021 From: juhpetersen at gmail.com (Jens Petersen) Date: Thu, 10 Jun 2021 19:25:16 +0800 Subject: [Haskell] [ANNOUNCE] GHC 8.10.5 released In-Reply-To: <20210606001057.2ku6z5zjjv5skw7q@zubin-msi> References: <20210606001057.2ku6z5zjjv5skw7q@zubin-msi> Message-ID: On Sun, 6 Jun 2021 at 08:11, Zubin Duggal wrote: > The GHC team is very pleased to announce the availability of GHC 8.10.5. > Thank you and congratulations on the release. Fedora users can try it now already with : sudo dnf --enablerepo=updates-testing-modular module install ghc:8.10 on Fedora 33 and 34. Best regards, Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazyswamp at gmail.com Sun Jun 20 16:28:12 2021 From: lazyswamp at gmail.com (Kwanghoon Choi) Date: Sun, 20 Jun 2021 17:28:12 +0100 Subject: A default setting for DynFlags.Settings? Message-ID: Hi Glasgow-haskell-users, I am wondering if there is a declaration of a default setting value for DynFlags.Settings: Settings :: GhcNameVersion -> FileSettings -> Platform -> ToolSettings -> PlatformMisc -> PlatformConstants -> [(String, String)] -> Settings in DynFlags - https://www.stackage.org/haddock/nightly-2019-09-04/ghc-lib-parser-8.8.0.20190424/DynFlags.html . I am attempting to use Lexer.lexer, which is provided by the ghc-parser-lib package. To make Lexer.lexer run, I seem to have such a setting value. I managed to fill it by myself as defaultSettings (Line 82) in the following source code: - https://github.com/kwanghoon/hslexer/blob/master/app/Main.hs with a sequence of meaningless 0, False, "", and [], which are not relevant to the usage of Lexer.lexer, I think. Are there any better ways to make a setting value just for the usage of Lexer.lexer? Anyway, it is great to see that it is quite easy to make use of the Haskell lexer by using GHC and the ghc-parser-lib package! Kinds regards Kwanghoon -------------- next part -------------- An HTML attachment was scrubbed... URL: From anthony.d.clayden at gmail.com Mon Jun 21 07:53:05 2021 From: anthony.d.clayden at gmail.com (Anthony Clayden) Date: Mon, 21 Jun 2021 19:53:05 +1200 Subject: Constraints on type synonyms In-Reply-To: References: Message-ID: Consider > pattern PPoint :: Floating a => a -> a -> (a, a) -- => () > pattern PPoint x y = (x, y) > originP = PPoint 0 0 > scaleP w (PPoint x y) = PPoint (w*x) (w*y) Inferred `scaleP :: Floating a => a -> (a, a) -> (a, a)` -- so more restrictive than the `Num a` that would be inferred usually for `scaleP`'s `(*)` operator. Ok what's the type-level analogue for `PPoint`, so that I can give signatures, instances, etc for methods using it? The type is not this: > type CPoint a = Floating a => (a, a) (Needs `RankNTypes` to put a constraint in RHS of a type synonym.) This seems to get accepted: > scaleP :: a -> CPoint a -> CPoint a Inferred `scaleP :: Floating a => a -> CPoint a -> (a, a)` -- that un-expanded `CPoint a` hints at a lurking danger. I couldn't for example write the equation for `scaleP` with a type annotation > scaleP w (PPoint x y) = PPoint (w*x) (w*y) :: CPoint a Despite the annotation giving the result type exactly per the signature, this gives 'rigid type variable' rejections. This works (needs `ScopedTypeVariables`) > scaleP (w :: a) (PPoint x y) = PPoint (w*x) (w*y) :: CPoint a What I especially want is instances and constraints: > instance C1 (CPoint a) -- * Illegal qualified type: Floating a => (a, a) > -- * In the expansion of type synonym `CPoint' > instance (C1 (CPoint a)) => C2 a -- * Illegal qualified type: Floating a => (a, a) > -- GHC doesn't yet support impredicative polymorphism (Needs `FlexibleInstances` to appear in the instance head, `FlexibleContexts` to appear in the constraint.) But I don't want to embed a qualified type in the instance head nor constraints, I want the expansion to be > instance (Floating a) => C1 (a, a) > instance (C1 (a, a), Floating a) => C2 a It's kinda the constraint is 'outside' the constructed type; as if the synonym were given by > type (Floating a) => CPoint a = (a, a) With the idea that when the compiler is expanding `CPoint a`, it floats the associated constraint out to the context the synonym call appears in. That is, I'm treating the expansion as very early in the compiler pipeline, just after syntax checking, before type inference/checking. If that constraint-outside syntax in the type synonym decl seems familiar, you might have seen it discussed briefly in [Jones, Morris, Eisenberg 2020 Partial Type Constructors], Section 7 Related Work 'Datatype contexts in Haskell'. Let me emphasise I'm talking here about type synonyms _not_ Datatypes. That constraint-outside syntax got rejected very early in the history of Haskell, apparently because nobody could give an adequate specification. Is my expand-it-as-syntax proposal not viable? AntC -------------- next part -------------- An HTML attachment was scrubbed... URL: