[GHC] #14975: Refactor (Maybe Coercion)
GHC
ghc-devs at haskell.org
Wed May 30 20:30:56 UTC 2018
#14975: Refactor (Maybe Coercion)
-------------------------------------+-------------------------------------
Reporter: tdammers | Owner: (none)
Type: task | Status: patch
Priority: normal | Milestone:
Component: Compiler | Version:
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #11735 | Differential Rev(s): Phab:D4699
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"9aac442f70b0b58decd56fb52dd4ec2289b03759/ghc" 9aac442/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="9aac442f70b0b58decd56fb52dd4ec2289b03759"
Define MCoercion type
An attempt on #14975:
During compilation, reflexive casts is discarded for computation.
Currently in some places we use Maybe coercion as inputs. So if a cast
is reflexive it is denoted as Nothing, otherwise Just coercion.
This patch defines the type
data MCoercion = MRefl | MCo Coercion
which is isomorphic to Maybe Coercion but useful in a number of places,
and super-helpful documentation.
Test Plan: validate
Reviewers: bgamari, goldfire, simonpj
Reviewed By: goldfire
Subscribers: mpickering, rwbarton, thomie, carter
GHC Trac Issues: #14975
Differential Revision: https://phabricator.haskell.org/D4699
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14975#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list