#15180 closed task (fixed)

Make Control.Exception.throw levity polymorphic

Reported by: andrewthad Owned by:
Priority: normal Milestone: 8.6.1
Component: Compiler Version: 8.2.2
Keywords: LevityPolymorphism, newcomer Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: testsuite/tests/typecheck/should_compile/T15180.hs
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D4827
Wiki Page:

Description

The error function has a levity-polymorphic type. I propose that the same be done for throw. I just encountered a situation where I needed this, and instead of calling throw x, I had to call raise# (toException x) because throw is unnecessarily restrictive.

Change History (8)

comment:1 Changed 16 months ago by simonpj

Sounds ok to me!

comment:2 Changed 16 months ago by RyanGlScott

Keywords: newcomer added

comment:3 Changed 15 months ago by Ninjatrappeur

I'm going to give a try on this one.

Last edited 15 months ago by Ninjatrappeur (previous) (diff)

comment:4 Changed 15 months ago by Ninjatrappeur

Test Case: testsuite/tests/typecheck/should_compile/T15180.hs

comment:5 Changed 15 months ago by Ninjatrappeur

Differential Rev(s): https://phabricator.haskell.org/D4827
Status: newpatch

comment:6 Changed 15 months ago by Ninjatrappeur

Differential Rev(s): https://phabricator.haskell.org/D4827Phab:D4827

comment:7 Changed 15 months ago by Ben Gamari <ben@…>

In 8ae7c1b/ghc:

Make Control.Exception.throw levity polymorphic.

Test Plan: Validate.

Reviewers: hvr, bgamari, sighingnow

Reviewed By: sighingnow

Subscribers: tdammers, sighingnow, rwbarton, thomie, carter

GHC Trac Issues: #15180

Differential Revision: https://phabricator.haskell.org/D4827

comment:8 Changed 15 months ago by bgamari

Resolution: fixed
Status: patchclosed
Note: See TracTickets for help on using tickets.