[GHC] #13671: Core lint error with PatternSynonyms and undefined
GHC
ghc-devs at haskell.org
Tue May 9 16:12:20 UTC 2017
#13671: Core lint error with PatternSynonyms and undefined
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Keywords: | Operating System: Unknown/Multiple
PatternSynonyms |
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
I've submitted quite a few Core Lint errors lately, I don't have access to
GHC HEAD so ignore this ticket if this has already been resolved
{{{#!hs
{-# Options_GHC -dcore-lint #-}
{-# Language ViewPatterns, PatternSynonyms #-}
import Data.Bifunctor.Fix
import Data.Bifunctor.Tannen
newtype ZipList a = ZL { getZipList :: Fix (Tannen Maybe (,)) a }
pattern Nil :: ZipList a
pattern Nil = ZL (In (Tannen Nothing))
infixr 5 :::
pattern (:::) :: a -> ZipList a -> ZipList a
pattern a:::as <- ZL (In (Tannen (undefined -> (a, as))))
where a:::as = undefined
}}}
`↑` works fine without `-dcore-lint` but fails with it.
Works fine if `undefined -> (a, as)` is replaced with `let x = x in x ->
(a, as)`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13671>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list