Ticket #2714 (closed merge: fixed)

Opened 5 years ago

Last modified 5 years ago

No match in record selector Var.tcTyVarDetails

Reported by: morrow Owned by: merge
Priority: normal Milestone: 6.10.1
Component: Compiler (Type checker) Version: 6.10.1
Keywords: Var, tcTyVarDetails, record selector Cc: mjm2002@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Summary:

ghci> :t fmap :: ((a -> b) -> b) -> (forall c. c -> a)
*** Exception: No match in record selector Var.tcTyVarDetails

I stumbled across this while in ghci with flags:

:set -fglasgow-exts -O2 -fno-print-bind-result
:set -XQuasiQuotes -XTemplateHaskell

Beginning with where I came across it and proceeding in reverse chrono order wrt ghc versions:

[m@ganon feio]$ ghc -V
The Glorious Glasgow Haskell Compilation System, version 6.10.0.20080927

ghci> :t fmap :: ((a -> b) -> b) -> (forall c. c -> a)
*** Exception: No match in record selector Var.tcTyVarDetails
[m@ganon feio]$ ghc -V
The Glorious Glasgow Haskell Compilation System, version 6.9.20080504

ghci> :t fmap :: ((a -> b) -> b) -> (forall c. c -> a)
*** Exception: No match in record selector Var.tcTyVarDetails
[m@ganon feio]$ /usr/bin/ghc-6.8.2 -V
The Glorious Glasgow Haskell Compilation System, version 6.8.2

ghci> :t fmap :: ((a -> b) -> b) -> (forall c. c -> a)

<interactive>:1:0:
    Couldn't match expected type `c'
           against inferred type `f (f b -> b)'
      `c' is a rigid type variable bound by
          the polymorphic type `forall c. c -> a' at <interactive>:1:0
    Probable cause: `fmap' is applied to too few arguments

<interactive>:1:0:
    Couldn't match expected type `a' against inferred type `f b'
      `a' is a rigid type variable bound by
          the polymorphic type
            `forall a b. ((a -> b) -> b) -> forall c. c -> a'
            at <interactive>:1:0
    Probable cause: `fmap' is applied to too few arguments
[m@ganon feio]$ /usr/bin/ghc-6.8.1 -V
The Glorious Glasgow Haskell Compilation System, version 6.8.1

ghci> :t fmap :: ((a -> b) -> b) -> (forall c. c -> a)

<interactive>:1:0:
    Couldn't match expected type `c'
           against inferred type `f (f b -> b)'
      `c' is a rigid type variable bound by
          the polymorphic type `forall c. c -> a' at <interactive>:1:0
    Probable cause: `fmap' is applied to too few arguments

Aside from filing a bug rpt, I'm curious in general about what change to whathaveyou, some way or another, had this as a side-effect.

Change History

Changed 5 years ago by morrow

Judging from the comment, this may have something to do with it? From TcUnify?:

unBox :: BoxyType -> TcM TcType
-- ...
unBox (TyVarTy tv)
  | isTcTyVar tv                                -- It's a boxy type variable
  , MetaTv BoxTv ref <- tcTyVarDetails tv       -- NB: non-TcTyVars are possible
  = do  { cts <- readMutVar ref                 --     under nested quantifiers
-- ...

Changed 5 years ago by morrow

I just came across ticket #1123, which seems possibly related.

Changed 5 years ago by simonpj

  • owner set to merge
  • difficulty set to Unknown
  • type changed from bug to merge

Thanks for the report. It's a small bug in the new code that deals with impredicativity. Fixed by

Wed Oct 22 15:51:38 GMT Daylight Time 2008  simonpj@microsoft.com
  * Fix Trac #2714 (a minor wibble)

Simon

Changed 5 years ago by igloo

  • milestone set to 6.10.1

Changed 5 years ago by igloo

  • status changed from new to closed
  • resolution set to fixed

Merged

Note: See TracTickets for help on using tickets.