summaryrefslogtreecommitdiff
path: root/utils/genprimopcode/Lexer.x
Commit message (Collapse)AuthorAgeFilesLines
* primops: Remove Monadic and Dyadic categoriesKrzysztof Gogolewski2020-08-261-2/+0
| | | | | | | | | There were four categories of primops: Monadic, Dyadic, Compare, GenPrimOp. The compiler does not treat Monadic and Dyadic in any special way, we can just replace them with GenPrimOp. Compare is still used in isComparisonPrimOp.
* Remove warnings-silencing flags for code generated by AlexSimon Jakobi2018-11-221-8/+0
| | | | | | | | | | | | | | | | | | Current versions of Alex don't seem to produce as many warnings any more. In order to silence a warning and to avoid overlong lines, I've taken the liberty of refactoring 'tok_num'. Test Plan: ./validate Reviewers: bgamari, simonmar Reviewed By: simonmar Subscribers: erikd, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5319
* Improve generated `GHC.Prim` docsAlec Theriault2018-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: * Extended `genprimcode` to generate Haddock-compatible deprecations, as well as displaying information about which functions are LLVM-only and which functions can fail with an unchecked exception. * Ported existing deprecations to the new format, and also added a deprecation on `par#` (see Trac #15227). * Emit an error on fixity/deprecation of builtins, unless we are processing the module in which that name is defined (see Trac #15233). That means the following is no longer accepted (outside of `GHC.Types`): ``` infixr 7 : {-# DEPRECATED (:) "cons is deprecated" #-} ``` * Generate `data (->) a b` with docs and fixity in `GHC.Prim`. This means: GHC can now parse `data (->) a b` and `infixr 0 ->` (only in `GHC.Prim`) and `genprimcode` can digest `primtype (->) a b` (See Trac #4861) as well as some misc fixes along the way. Reviewers: bgamari, RyanGlScott Reviewed By: RyanGlScott Subscribers: RyanGlScott, rwbarton, mpickering, carter GHC Trac Issues: #15227, #15233, #4861 Differential Revision: https://phabricator.haskell.org/D5167
* Add Note [Warnings in code generated by Alex]Thomas Miedema2015-07-071-5/+1
| | | | Differential Revision: https://phabricator.haskell.org/D1044
* Replace usages of `-w` by `-fno-warn`sThomas Miedema2015-07-041-7/+11
| | | | | | | | | | | And remove unused imports and language pragmas. I checked that the minimum Happy and Alex version requirements, as listed in aclocal.m4, don't have to change. Before building ghc, I ran: - cabal install happy==1.19.4 --with-ghc=ghc-7.8.4 - cabal install alex==3.1.0 --with-ghc=ghc-7.6.3 Differential Revision: https://phabricator.haskell.org/D1032
* Typos in error messages and in commentsGabor Greif2015-04-101-1/+1
|
* Remove support for "primclass"Joachim Breitner2014-03-161-1/+0
| | | | | | This partly reverts commit e239753c349f925b576b72dc3445934cba8bcd50. Since Coercible is exported via GHC.Types, so "primclass" is no longer needed. The support for => in primops.pp is still required for coerce.
* Globally replace "hackage.haskell.org" with "ghc.haskell.org"Simon Marlow2013-10-011-1/+1
|
* SIMD primops are now generated using schemas that are polymorphic inGeoffrey Mainland2013-09-221-0/+8
| | | | | | | | | | | | | width and element type. SIMD primops are now polymorphic in vector size and element type, but only internally to the compiler. More specifically, utils/genprimopcode has been extended so that it "knows" about SIMD vectors. This allows us to, for example, write a single definition for the "add two vectors" primop in primops.txt.pp and have it instantiated at many vector types. This generates a primop in GHC.Prim for each vector type at which "add two vectors" is instantiated, but only one data constructor for the PrimOp data type, so the code generator is much, much simpler.
* Allow primclass and class constraints in primopsJoachim Breitner2013-09-131-0/+2
| | | | In preparation for the primitive class Coercible
* Add fixity information to primops (ticket #6026)Michal Terepeta2012-11-231-0/+5
|
* compatibility with Alex 3.0Simon Marlow2011-08-081-1/+1
|
* Assign more accurate code sizes to primops, so that the inliningSimon Marlow2011-05-241-0/+1
| | | | | heuristics work better. Also removed the old unused "needs_wrapper" predicate for primops. This helps with #4978.
* add some {-# LANGUAGE BangPatterns #-} to mollify GHCSimon Marlow2010-11-171-0/+1
|
* Fix building with the HEADIan Lynagh2009-05-201-1/+1
|
* Add an OPTIONS -w pragma to utils/genprimopcode/Lexer.xxIan Lynagh2007-09-051-0/+7
| | | | SPJ reports that it has warnings (=> errors with -Werror) on Windows.
* Warning Police: Unused importsMichael D. Adams2007-07-131-1/+1
|
* Remove redundant importIan Lynagh2007-04-111-1/+0
|
* Replace genprimopcode's parsec parser with an alex+happy parserIan Lynagh2007-04-101-0/+68
This use was the only thing keeping parsec in core-packages, and we already have a dependency on alex+happy anyway.