[GHC] #6026: Unboxed operators have wrong fixity
GHC
cvs-ghc at haskell.org
Fri Apr 20 10:18:05 CEST 2012
#6026: Unboxed operators have wrong fixity
---------------------------------+------------------------------------------
Reporter: benl | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: libraries/base | Version: 7.4.1
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: Incorrect result at runtime
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Changes (by simonpj):
* difficulty: => Unknown
Comment:
Good point. Here's the deal.
* `LoadIface.ghcPrimIface` gives the `Iface` data structure for
`GHC.Prim`, which includes all primops.
* You'll see that it give a fixity for `seq`, but not for any of the
`PrimOp`s. This is plainly wrong, as this ticket points out.
* The wrong way to fix it is to add a long list of fixities to
`ghcPrimIface`. Wrong because there are a lot of infix primops, and the
list will change.
* The right way to fix it is to allow `prelude/primops.txt.pp` to specify
the fixity of a primop. There is a pattern to follow: the `strictness` or
`out_of_line` fields. Then the program that processes `primops.txt.pp`
can generate a function `primOpFixity :: PrimOp -> Fixity`, and
`ghcPrimIface` can use that function to populate the fixity information.
Not clear how important this is... it's been this way for a long time.
But yes, a useful task.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6026#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list