Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,322
    • Issues 4,322
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 362
    • Merge Requests 362
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #13684

Closed
Open
Opened May 10, 2017 by Icelandjack@IcelandjackReporter

Core lint error with defer-typed-holes and coerce

{-# Options_GHC -dcore-lint -fdefer-typed-holes #-}

{-# Language FlexibleInstances, UndecidableInstances, MultiParamTypeClasses, GeneralizedNewtypeDeriving #-}

import Data.Traversable
import Control.Lens.Indexed 
import Control.Lens.Fold   (ifoldMapOf)
import Control.Lens.Setter (iover)

newtype Foo a = F (WrapITraversable [] a)

newtype WrapITraversable f a = WIT (f a)

instance TraversableWithIndex i f => Functor (WrapITraversable f) where
  fmap = fmapDefault

instance TraversableWithIndex i f => Foldable (WrapITraversable f) where
  foldMap = foldMapDefault

instance TraversableWithIndex i f => Traversable (WrapITraversable f) where
  traverse = itraverse . const

instance TraversableWithIndex i f => FoldableWithIndex i (WrapITraversable f) where
  ifoldMap = ifoldMapOf itraversed

instance TraversableWithIndex i f => FunctorWithIndex i (WrapITraversable f) where
  imap = iover itraversed

instance TraversableWithIndex i f => TraversableWithIndex i (WrapITraversable f) where
  itraverse = coerce itraverse 

causes with lens 4.14 or 4.15.1, GHC 8.0.1.

Trac metadata
Trac field Value
Version 8.0.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#13684