[ANNOUNCE] GHC 8.6.1-alpha2 available
Andrés Sicard-Ramírez
asr at eafit.edu.co
Sat Jul 21 02:27:38 UTC 2018
On 15 July 2018 at 20:07, Ben Gamari <ben at well-typed.com> wrote:
>
> The GHC development team is pleased to announce the second alpha release
> leading up to GHC 8.6.1.
The following MVE uses the gitrev library (
http://hackage.haskell.org/package/gitrev ):
$ cat Test.hs
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Development.GitRev
commitInfo :: Maybe String
commitInfo = case $(gitHash) of
"UNKNOWN" -> Nothing
hash -> Just hash
main :: IO ()
main = print commitInfo
The MVE compiles *without* warnings with different versions of GHC
(e.g. 8.4.3) but with GHC 8.6.1-alpha2 I get the following warning:
$ ghc Test.hs
Test.hs:10:3: warning: [-Woverlapping-patterns]
Pattern match is redundant
In a case alternative: hash -> ...
|
10 | hash -> Just hash
| ^^^^^^^^^^^^^^^^^^^^^^
Linking Test ...
Is it a bug or is it the expected behaviour?
Best,
--
Andrés
More information about the ghc-devs
mailing list