Commit 3c98f7bf authored by rrt's avatar rrt
Browse files

[project @ 2001-09-21 14:07:21 by rrt]

This file is now generated from primops.txt.pp and shouldn't be in the
repository any more.
parent a5fe1fa0
-----------------------------------------------------------------------
-- $Id: primops.txt,v 1.26 2001/09/14 15:51:42 simonpj Exp $
--
-- Primitive Operations
--
-----------------------------------------------------------------------
-- This file is processed by the utility program genprimopcode to produce
-- a number of include files within the compiler and optionally to produce
-- human-readable documentation.
--
-- It should first be preprocessed.
--
-- To add a new primop, you currently need to update the following files:
--
-- - this file (ghc/compiler/prelude/primops.txt), which includes
-- the type of the primop, and various other properties (its
-- strictness attributes, whether it is defined as a macro
-- or as out-of-line code, etc.)
--
-- - ghc/lib/std/PrelGHC.hi-boot, to declare the primop
--
-- - if the primop is inline (i.e. a macro), then:
-- ghc/includes/PrimOps.h
-- ghc/compiler/nativeGen/StixPrim.lhs
-- ghc/compiler/nativeGen/MachCode.lhs (if implementation is machine-dependent)
--
-- - or, for an out-of-line primop:
-- ghc/includes/PrimOps.h (just add the declaration)
-- ghc/rts/PrimOps.hc (define it here)
--
-- - the User's Guide
--
-- This file is divided into named sections, each containing or more primop entries.
-- Section headers have the format:
--
-- section "section-name" {description}
--
-- This information is used solely when producing documentation; it is otherwise ignored.
-- The description is optional.
--
-- The format of each primop entry is as follows:
--
-- primop internal-name "name-in-program-text" type category {description} attributes
-- The description is optional.
-- The default attribute values which apply if you don't specify
-- other ones. Attribute values can be True, False, or arbitrary
-- text between curly brackets. This is a kludge to enable
-- processors of this file to easily get hold of simple info
-- (eg, out_of_line), whilst avoiding parsing complex expressions
-- needed for strictness and usage info.
defaults
has_side_effects = False
out_of_line = False
commutable = False
needs_wrapper = False
can_fail = False
strictness = { \ arity -> StrictnessInfo (replicate arity wwPrim) False }
usage = { nomangle other }
-- Currently, documentation is produced using latex, so contents of description fields
-- should be legal latex. Descriptions can contain matched pairs of embedded curly brackets.