
(* this is a bad optimization which should be disabled. *)
structure BadOpt :> sig end =
struct

  fun bad (Il.Tag (h::i::t, e)) = Il.Tag (h::t, bad e)
    | bad (Il.Tag (t, e)) = Il.Tag (t, bad e)
    | bad (Il.Seq l) = Il.Seq (rev (map bad l))
    | bad (Il.Text s) = Il.Text s

  val _ = Driver.register_opt {optfun=Driver.Iltoil bad,
                               optname="Bad Opt",
                               scorefn=(fn x=>x),
                               initscore=NONE,
                               trusted=false,
                               blowup=false,
                               disabled=true}
end
