Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 3,610
    • Issues 3,610
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 200
    • Merge Requests 200
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #3193

Closed
Open
Opened Apr 26, 2009 by nr@eecs.harvard.edu@trac-nr
  • Report abuse
  • New issue
Report abuse New issue

line number for GADT type error is very inaccurate

Here is an error message from 6.11:

cmm/ZDF5ex.hs:528:2:
    Couldn't match expected type `ZOpen'
           against inferred type `ZClosed'
      Expected type: ZipGF m l e x
      Inferred type: ZipGF m l C O
    In the first argument of `anal_f', namely `g'
    In the expression: anal_f g (return . fromZJust) ZNothing

This is all very well, but the offending term (the one shown in the message) is actually on line 697, not line 528. The term is part of one declaration in a monster 'where' clause attached to the definition on line 528, column 2. The next one might not be so easy to find.

I'm attaching the file, which is part of some new GHC code I'm hoping to deliver one of these months. If you need access to the whole thing I'll have a branch in a git repository.

Trac metadata
Trac field Value
Version 6.11
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture

Related issues

  • Discussion
  • Designs
Assignee
Assign to
6.12 branch
Milestone
6.12 branch
Assign milestone
Time tracking
None
Due date
None
4
Labels
bug GADTs P::normal Trac import
Assign labels
  • View project labels
Reference: ghc/ghc#3193