Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Alex D
GHC
Commits
bc9e81cf
Commit
bc9e81cf
authored
Dec 03, 2014
by
Simon Peyton Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comments only
parent
289e52f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
compiler/typecheck/TcInteract.lhs
compiler/typecheck/TcInteract.lhs
+2
-2
libraries/ghc-prim/GHC/Types.hs
libraries/ghc-prim/GHC/Types.hs
+8
-4
No files found.
compiler/typecheck/TcInteract.lhs
View file @
bc9e81cf
...
...
@@ -1038,8 +1038,8 @@ outer type constructors match.
Note [Delicate equality kick-out]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When adding an work-item CTyEqCan (a ~ xi), we kick
out an inert
CTyEqCan (b ~ phi) when
When adding an
fully-rewritten
work-item CTyEqCan (a ~ xi), we kick
out an inert
CTyEqCan (b ~ phi) when
a) the work item can rewrite the inert item
...
...
libraries/ghc-prim/GHC/Types.hs
View file @
bc9e81cf
...
...
@@ -98,11 +98,11 @@ constraints, but we cannot define them as such in Haskell. But we also cannot
just define them only in GHC.Prim (like (->)), because we need a real module
for them, e.g. to compile the constructor's info table.
Furthermore the type of MkCoercible cannot be written in Haskell
(no syntax for
~#R).
Furthermore the type of MkCoercible cannot be written in Haskell
(no syntax for
~#R).
So we define them as regular data types in GHC.Types, and do magic in
GHC to
change the kind and type
, in tysWiredIn
.
So we define them as regular data types in GHC.Types, and do magic in
TysWiredIn,
inside GHC, to
change the kind and type.
-}
...
...
@@ -161,6 +161,10 @@ data (~) a b = Eq# ((~#) a b)
--
-- /Since: 4.7.0.0/
data
Coercible
a
b
=
MkCoercible
((
~#
)
a
b
)
-- It's really ~R# (represntational equality), not ~#,
-- but * we don't yet have syntax for ~R#,
-- * the compiled code is the same either way
-- * TysWiredIn has the truthful types
-- Also see Note [Kind-changing of (~) and Coercible]
-- | Alias for 'tagToEnum#'. Returns True if its parameter is 1# and False
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment