Opened 20 months ago

#12005 new bug

Constraint instances not shown in `:info`

Reported by: Iceland_jack Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.10.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

$ ghci -ignore-dot-ghci -XKindSignatures -XRank2Types -XConstraintKinds -XAllowAmbiguousTypes -XInstanceSigs
GHCi, version 8.1.20160428: http://www.haskell.org/ghc/  :? for help
Prelude> import Data.Kind
Prelude Data.Kind> class Defer (p :: Constraint) where defer :: (p => r) -> r
Prelude Data.Kind> instance Defer () where defer :: r -> r; defer = id
Prelude Data.Kind> :i Defer
class Defer (p :: Constraint) where
  defer :: (p => r) -> r
  {-# MINIMAL defer #-}
        -- Defined at <interactive>:2:1

Same happens with the Data.Constraint.Deferrable which defines:

instance (Typeable a, Typeable b)                   => Deferrable (a ~ b) 
instance (Deferrable a, Deferrable b)               => Deferrable (a, b) 
instance (Deferrable a, Deferrable b, Deferrable c) => Deferrable (a, b, c) 

but no instances are shown:

ghci> import Data.Constraint.Deferrable 
ghci> :i Deferrable 
class Deferrable (p :: Constraint) where
  deferEither :: proxy p -> (p => r) -> Either String r
  {-# MINIMAL deferEither #-}
        -- Defined in ‘Data.Constraint.Deferrable’

Change History (0)

Note: See TracTickets for help on using tickets.