src/Tools/Code/code_scala.ML
changeset 37437 4202e11ae7dc
parent 37384 5aba26803073
child 37439 c72a43a7d2c5
     1.1 --- a/src/Tools/Code/code_scala.ML	Tue Jun 15 07:42:48 2010 +0200
     1.2 +++ b/src/Tools/Code/code_scala.ML	Tue Jun 15 08:32:32 2010 +0200
     1.3 @@ -129,7 +129,7 @@
     1.4              (map2 (fn param => fn ty => print_typed tyvars
     1.5                  ((str o lookup_var vars) param) ty)
     1.6                params tys)) implicits) ty, str " ="]
     1.7 -    fun print_stmt (name, Code_Thingol.Fun (_, ((vs, ty), raw_eqs))) = (case filter (snd o snd) raw_eqs
     1.8 +    fun print_stmt (name, Code_Thingol.Fun (_, (((vs, ty), raw_eqs), _))) = (case filter (snd o snd) raw_eqs
     1.9           of [] =>
    1.10                let
    1.11                  val (tys, ty') = Code_Thingol.unfold_fun ty;
    1.12 @@ -351,8 +351,8 @@
    1.13        module_name reserved raw_module_alias program;
    1.14      val reserved = make_vars reserved;
    1.15      fun args_num c = case Graph.get_node program c
    1.16 -     of Code_Thingol.Fun (_, ((_, ty), [])) => (length o fst o Code_Thingol.unfold_fun) ty
    1.17 -      | Code_Thingol.Fun (_, (_, ((ts, _), _) :: _)) => length ts
    1.18 +     of Code_Thingol.Fun (_, (((_, ty), []), _)) => (length o fst o Code_Thingol.unfold_fun) ty
    1.19 +      | Code_Thingol.Fun (_, ((_, ((ts, _), _) :: _), _)) => length ts
    1.20        | Code_Thingol.Datatypecons (_, tyco) =>
    1.21            let val Code_Thingol.Datatype (_, (_, constrs)) = Graph.get_node program tyco
    1.22            in (length o the o AList.lookup (op =) constrs) c end