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,251
    • Issues 4,251
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 394
    • Merge Requests 394
  • 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
  • #11562

Closed
Open
Opened Feb 09, 2016 by Sergei Trofimovich@trofiReporter

WARNING: file compiler/stgSyn/CoreToStg.hs, line 250: $fCategoryConstraint:- True False

Tried to debug unrelated build failure of constraints-0.4.1.3 and found this in today's ghc-HEAD:

$ inplace/bin/ghc-stage2 -fforce-recomp -c C.hs -O0
WARNING: file compiler/stgSyn/CoreToStg.hs, line 250
  $fCategoryConstraint:- True False
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE GADTs #-}

module C () where
import Control.Category
import GHC.Types (Constraint)

data Dict :: Constraint -> * where
  Dict :: a => Dict a

infixr 9 :-

newtype a :- b = Sub (a => Dict b)

instance Category (:-) where
  id  = refl
  (.) = trans

infixl 1 \\

(\\) :: a => (b => r) -> (a :- b) -> r
r \\ Sub Dict = r

trans :: (b :- c) -> (a :- b) -> a :- c
trans f g = Sub (Dict \\ f \\ g)

refl :: a :- a
refl = Sub Dict

{-
$ inplace/bin/ghc-stage2 -fforce-recomp -c C.hs -O0

WARNING: file compiler/stgSyn/CoreToStg.hs, line 250
  $fCategoryConstraint:- True False
-}

Original file it was factored out is: https://github.com/ekmett/constraints/blob/c550b7653e88d58882873d11f05538d783313a05/src/Data/Constraint.hs

Might be a result of D1889

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