pretty function arrow for diag serializer
authorhaftmann
Tue Mar 20 08:27:21 2007 +0100 (2007-03-20)
changeset 22476088e141084a6
parent 22475 bd3378255cc8
child 22477 be9ae8b19271
pretty function arrow for diag serializer
src/Pure/Tools/codegen_serializer.ML
     1.1 --- a/src/Pure/Tools/codegen_serializer.ML	Tue Mar 20 08:27:20 2007 +0100
     1.2 +++ b/src/Pure/Tools/codegen_serializer.ML	Tue Mar 20 08:27:21 2007 +0100
     1.3 @@ -1473,7 +1473,14 @@
     1.4  fun seri_diagnosis labelled_name _ _ _ _ _ code =
     1.5    let
     1.6      val init_vars = CodegenNames.make_vars reserved_haskell;
     1.7 -    val pr = pr_haskell (K NONE) (K NONE) (K NONE) labelled_name init_vars I I (K false);
     1.8 +    fun pr_fun "fun" = SOME (2, fn pr_typ => fn fxy => fn [ty1, ty2] =>
     1.9 +          brackify_infix (1, R) fxy [
    1.10 +            pr_typ (INFX (1, X)) ty1,
    1.11 +            str "->",
    1.12 +            pr_typ (INFX (1, R)) ty2
    1.13 +          ])
    1.14 +      | pr_fun _ = NONE
    1.15 +    val pr = pr_haskell (K NONE) pr_fun (K NONE) labelled_name init_vars I I (K false);
    1.16    in
    1.17      []
    1.18      |> Graph.fold (fn (name, (def, _)) => case try pr (name, def) of SOME p => cons p | NONE => I) code