summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2017-09-26 09:33:53 -0400
committerBen Gamari <ben@smart-cactus.org>2017-09-26 11:59:53 -0400
commit62464071455ea0472903ef1d94833e5eefb8f74e (patch)
tree0e341d37dc98138b2862547199b2cdb21a0aa163
parent6e7c09d083358b07401cbecc36043be5dfe15f84 (diff)
downloadhaskell-62464071455ea0472903ef1d94833e5eefb8f74e.tar.gz
primops: Add some notes regarding the meaning of the "type" field
The overloading of "monadic" definitely deserved some explanation. [skip ci]
-rw-r--r--compiler/prelude/primops.txt.pp8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/prelude/primops.txt.pp b/compiler/prelude/primops.txt.pp
index f2c02ec2f1..afe58498db 100644
--- a/compiler/prelude/primops.txt.pp
+++ b/compiler/prelude/primops.txt.pp
@@ -38,6 +38,14 @@
-- processors of this file to easily get hold of simple info
-- (eg, out_of_line), whilst avoiding parsing complex expressions
-- needed for strictness info.
+--
+-- type refers to the general category of the primop. Valid settings include,
+--
+-- * Compare: A comparison operation of the shape a -> a -> Int#
+-- * Monadic: A unary operation of shape a -> a
+-- * Dyadic: A binary operation of shape a -> a -> a
+-- * GenPrimOp: Any other sort of primop
+--
-- The vector attribute is rather special. It takes a list of 3-tuples, each of
-- which is of the form <ELEM_TYPE,SCALAR_TYPE,LENGTH>. ELEM_TYPE is the type of