Ticket #301 (closed bug: fixed)

Opened 8 years ago

Last modified 5 years ago

GADT constructor constraints ignored

Reported by: wolfram_kahl Owned by: simonpj
Priority: normal Milestone: 6.8.1
Component: Compiler (Type checker) Version: 6.4
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: gadt/karl1, gadt/karl2 Blocked By:
Blocking: Related Tickets:

Description (last modified by simonmar) (diff)

Class constraints on GADT constructore appear to be
ignored.

I tried:

data Expr :: * -> * where
  Const :: Show a => a -> Expr a
  Apply :: Fct a b -> Expr a -> Expr b

and there is no way to define the expected constraint-less
Show instance --- for details, see Expr0.lhs.

Attachments

Expr0.2.lhs Download (3.9 KB) - added by wolfram_kahl 8 years ago.
Expr1.2.lhs Download (1.8 KB) - added by wolfram_kahl 8 years ago.
Expr1a.2.lhs Download (1.3 KB) - added by wolfram_kahl 8 years ago.

Change History

Changed 8 years ago by wolfram_kahl

Changed 8 years ago by wolfram_kahl

Changed 8 years ago by wolfram_kahl

Logged In: YES 
user_id=1212105

For a simpler example, see Expr1.lhs

Changed 8 years ago by wolfram_kahl

Changed 8 years ago by wolfram_kahl

Logged In: YES 
user_id=1212105

The expected solution would be that constrained constructors are
translated into constructors with an additional dictionary
argument,
as sketched in Expr1a.lhs.

Changed 7 years ago by simonmar

  • owner changed from nobody to simonpj
  • status changed from assigned to new
  • description modified (diff)

Changed 7 years ago by simonpj

  • difficulty set to Unknown
  • os set to Unknown
  • architecture set to Unknown
  • milestone set to 6.8

Changed 7 years ago by simonpj

  • status changed from new to closed
  • testcase set to gadt/karl1, gadt/karl2
  • resolution changed from None to fixed

Fixed at last (the implication-consraint patch)

Simon

Changed 6 years ago by igloo

  • milestone changed from 6.8 branch to 6.8.1

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.