From: simonpj Date: Mon, 1 Sep 2003 12:35:09 +0000 (+0000) Subject: [project @ 2003-09-01 12:35:09 by simonpj] X-Git-Tag: Approx_11550_changesets_converted~505 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=5b1c395e014350e58a0565be5c976e01d9271335;p=ghc-hetmet.git [project @ 2003-09-01 12:35:09 by simonpj] Add a binding for maxPrimOpTag :: Int to primop-tag.hs-incl with the obvious meaning. --- diff --git a/ghc/utils/genprimopcode/Main.hs b/ghc/utils/genprimopcode/Main.hs index d92d3a9..e486403 100644 --- a/ghc/utils/genprimopcode/Main.hs +++ b/ghc/utils/genprimopcode/Main.hs @@ -290,10 +290,12 @@ gen_primop_list (Info defaults entries) ) where (first:rest) = filter is_primop entries gen_primop_tag (Info defaults entries) - = unlines (zipWith f (filter is_primop entries) [1..]) + = unlines (max_def : zipWith f primop_entries [1..]) where + primop_entries = filter is_primop entries f i n = "tagOf_PrimOp " ++ cons i ++ " = _ILIT(" ++ show n ++ ") :: FastInt" + max_def = "maxPrimOpTag = " ++ show (length primop_entries) ++ " :: Int" gen_data_decl (Info defaults entries) = let conss = map cons (filter is_primop entries)