1 module PreludeBuiltin (
20 StateAndMallocPtr#(..),
22 StateAndMutableArray#(..),
23 StateAndByteArray#(..),
24 StateAndMutableByteArray#(..),
25 StateAndSynchVar#(..),
26 #ifndef __PARALLEL_HASKELL__
28 StateAndStablePtr#(..),
69 -- This follows the organisation of compiler/prelude/TysWiredIn.lhs
70 -- (which follows the state-interface.verb document).
73 -- instances are all done carefully, by hand (in the prelude/I*.hs files)
75 ----------------------------------------------------
81 data Float = F# Float#
82 data Double = D# Double#
84 data _State a = S# (State# a)
86 ----------------------------------------------------
88 -- Array is from PreludeArray & so can't be defined here.
89 -- _ByteArray, _MutableArray & _MutableByteArray are from PreludeGlaArray ...
91 data _MallocPtr = _MallocPtr MallocPtr#
92 #ifndef __PARALLEL_HASKELL__
93 data _StablePtr a = _StablePtr (StablePtr# a)
96 ----------------------------------------------------
98 data Integer = J# Int# Int# ByteArray#
99 -- corresponds to GNU multi-prec arith pkg rep
102 -- Oddly enough, the Return<blah>GMP<blah> don't need definitions,
103 -- because they are only used in "returning" (and so are never
106 -- Unless you want to write your own code using the Integer primops
107 -- -- at which point it becomes essential to have these types. ADR
109 data _Return2GMPs = _Return2GMPs Int# Int# ByteArray# Int# Int# ByteArray#
110 data _ReturnIntAndGMP = _ReturnIntAndGMP Int# Int# Int# ByteArray#
112 ----------------------------------------------------
114 data StateAndPtr# s elt = StateAndPtr# (State# s) elt
116 data StateAndChar# s = StateAndChar# (State# s) Char#
117 data StateAndInt# s = StateAndInt# (State# s) Int#
118 data StateAndWord# s = StateAndWord# (State# s) Word#
119 data StateAndFloat# s = StateAndFloat# (State# s) Float#
120 data StateAndDouble# s = StateAndDouble# (State# s) Double#
121 data StateAndAddr# s = StateAndAddr# (State# s) Addr#
123 #ifndef __PARALLEL_HASKELL__
124 data StateAndStablePtr# s a = StateAndStablePtr# (State# s) (StablePtr# a)
126 data StateAndMallocPtr# s = StateAndMallocPtr# (State# s) MallocPtr#
128 data StateAndArray# s elt = StateAndArray# (State# s) (Array# elt)
129 data StateAndMutableArray# s elt = StateAndMutableArray# (State# s) (MutableArray# s elt)
130 data StateAndByteArray# s = StateAndByteArray# (State# s) ByteArray#
131 data StateAndMutableByteArray# s = StateAndMutableByteArray# (State# s) (MutableByteArray# s)
133 data StateAndSynchVar# s elt = StateAndSynchVar# (State# s) (SynchVar# s elt)
135 ----------------------------------------------------
136 -- Bool: is from PreludeCore
138 data _CMP_TAG = _LT | _EQ | _GT -- for derived comparisons
140 ----------------------------------------------------
142 data List a = Nil | a : (List a)
144 ----------------------------------------------------
147 data Tuple2 a b = Tup2 a b
148 data Tuple3 a b c = Tup3 a b c
149 data Tuple4 a b c d = Tup4 a b c d
150 data Tuple5 a b c d e = Tup5 a b c d e
151 data Tuple6 a b c d e f = Tup6 a b c d e f
152 data Tuple7 a b c d e f g = Tup7 a b c d e f g
153 data Tuple8 a b c d e f g h = Tup8 a b c d e f g h
154 data Tuple9 a b c d e f g h i = Tup9 a b c d e f g h i
155 data Tuple10 a b c d e f g h i j = Tup10 a b c d e f g h i j
156 data Tuple11 a b c d e f g h i j k = Tup11 a b c d e f g h i j k
157 data Tuple12 a b c d e f g h i j k l = Tup12 a b c d e f g h i j k l
158 data Tuple13 a b c d e f g h i j k l m = Tup13 a b c d e f g h i j k l m
159 data Tuple14 a b c d e f g h i j k l m n = Tup14 a b c d e f g h i j k l m n
160 data Tuple15 a b c d e f g h i j k l m n o = Tup15 a b c d e f g h i j k l m n o
161 data Tuple16 a b c d e f g h i j k l m n o p = Tup16 a b c d e f g h i j k l m n o p
162 data Tuple17 a b c d e f g h i j k l m n o p q
163 = Tup17 a b c d e f g h i j k l m n o p q
164 data Tuple18 a b c d e f g h i j k l m n o p q r
165 = Tup18 a b c d e f g h i j k l m n o p q r
166 data Tuple19 a b c d e f g h i j k l m n o p q r s
167 = Tup19 a b c d e f g h i j k l m n o p q r s
168 data Tuple20 a b c d e f g h i j k l m n o p q r s t
169 = Tup20 a b c d e f g h i j k l m n o p q r s t
170 data Tuple21 a b c d e f g h i j k l m n o p q r s t u
171 = Tup21 a b c d e f g h i j k l m n o p q r s t u
172 data Tuple22 a b c d e f g h i j k l m n o p q r s t u v
173 = Tup22 a b c d e f g h i j k l m n o p q r s t u v
174 data Tuple23 a b c d e f g h i j k l m n o p q r s t u v w
175 = Tup23 a b c d e f g h i j k l m n o p q r s t u v w
176 data Tuple24 a b c d e f g h i j k l m n o p q r s t u v w x
177 = Tup24 a b c d e f g h i j k l m n o p q r s t u v w x
178 data Tuple25 a b c d e f g h i j k l m n o p q r s t u v w x y
179 = Tup25 a b c d e f g h i j k l m n o p q r s t u v w x y
180 data Tuple26 a b c d e f g h i j k l m n o p q r s t u v w x y z
181 = Tup26 a b c d e f g h i j k l m n o p q r s t u v w x y z
182 data Tuple27 a b c d e f g h i j k l m n o p q r s t u v w x y z a_
183 = Tup27 a b c d e f g h i j k l m n o p q r s t u v w x y z a_
184 data Tuple28 a b c d e f g h i j k l m n o p q r s t u v w x y z a_ b_
185 = Tup28 a b c d e f g h i j k l m n o p q r s t u v w x y z a_ b_
186 data Tuple29 a b c d e f g h i j k l m n o p q r s t u v w x y z a_ b_ c_
187 = Tup29 a b c d e f g h i j k l m n o p q r s t u v w x y z a_ b_ c_
188 data Tuple30 a b c d e f g h i j k l m n o p q r s t u v w x y z a_ b_ c_ d_
189 = Tup30 a b c d e f g h i j k l m n o p q r s t u v w x y z a_ b_ c_ d_
190 data Tuple31 a b c d e f g h i j k l m n o p q r s t u v w x y z a_ b_ c_ d_ e_
191 = Tup31 a b c d e f g h i j k l m n o p q r s t u v w x y z a_ b_ c_ d_ e_
192 data Tuple32 a b c d e f g h i j k l m n o p q r s t u v w x y z a_ b_ c_ d_ e_ f_
193 = Tup32 a b c d e f g h i j k l m n o p q r s t u v w x y z a_ b_ c_ d_ e_ f_
195 ----------------------------------------------------
196 -- Ratio: in PreludeRatio
198 data Bin = Bin_____________ -- placeholder only
200 -- IO things: in PreludeIO
202 --{-# SPECIALIZE data _Lift (State# _RealWorld) #-}
204 data _Lift a = _Lift a