Opened 5 years ago

Closed 5 years ago

#6162 closed feature request (wontfix)

defer-type-errors + unsafeCoerce

Reported by: guest Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.5
Keywords: defer-type-errors 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:


When evidence of a ~ b is missing, -fdefer-type-errors uses error to coerce a to b. It would nice to allow to use unsafeCoerce instead; for example ' ' :: Int would give under favourable conditions 32.

Change History (2)

comment:1 Changed 5 years ago by simonpj

difficulty: Unknown

But under unfavourable conditions you get a segmentation fault! The whole point of -fdefer-type-errors is that you get the same guarantees about lack of seg-faults and memory safety for type in-correct programs that you get for type-correct cones. As the paper discusses. So I don't propose to change this.


comment:2 Changed 5 years ago by simonpj

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.