Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,867
    • Issues 4,867
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 456
    • Merge requests 456
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #21636
Closed
Open
Created May 24, 2022 by Icelandjack@IcelandjackReporter

Core Lint errors : in result of Static argument

Causes a Core Lint error:

{-# Language DeriveAnyClass #-}
{-# Language DeriveGeneric  #-}
{-# Language DerivingVia    #-}
{-# Language TypeFamilies   #-}

{-# Options_GHC -O2 -fstatic-argument-transformation -dcore-lint -fobject-code #-}

import Data.Distributive
import Data.Functor.Rep
import GHC.Generics

data Moore a b = Moore b (a -> Moore a b)
  deriving
  stock Generic1

  deriving (Functor, Applicative, Monad)
  via Co (Moore a)

instance Representable (Moore a) where
  type Rep (Moore a) = [a]
  index = undefined
  tabulate = undefined

instance Distributive (Moore a) where
  distribute = distributeRep
    Mismatch in type between binder and occurrence
    Var: $cfmap_s71F
    Binder type: forall a a b.
                 (a_a5LM -> b_a5LN)
                 -> Co (Moore a_a5LI) a_a5LM -> Moore a_a5LI b_a5LN
    Occurrence type: forall a a b.
                     (a -> b) -> Co (Moore a) a -> Moore a b
      Before subst: forall a a b.
                    (a -> b) -> Co (Moore a) a -> Moore a b
    In the RHS of $cfmap_s71F :: forall a a b.
                                 (a -> b) -> Co (Moore a) a -> Moore a b

Using the adjunctions package, using ghc 8.10.2.log

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking