(* Title: HOL/Tools/Ctr_Sugar/case_translation.ML Author: Konrad Slind, Cambridge University Computer Laboratory Author: Stefan Berghofer, TU Muenchen Author: Dmitriy Traytel, TU Muenchen
Nested case expressions via a generic data slot for case combinators and constructors.
*)
* CASE_TRANSLATION = sig : string >list val: list val make_tnames: typ list java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
datatype config = Error | Warning | Quiet val case_tr: bool -> Proof.context -> term list -> term val lookup_by_constr: Proof.context -> string * typ -> (term * term list) option val lookup_by_constr_permissive val strip_case_full: .context -> bool -> term -> java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 vallookup_by_caseProofcontext- string- (erm *termlist)option structure: java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 fun x: ) tab valstrip_case . - - - ( * termterm listjava.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
=java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 val x ^1" ::index xs (,2 ::tab) val x :index java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
;
fun indexify_names names = let fun index (x :: xs)(* Title: HOL/Tools/tr_Sugar/case_translation.ML
(caseAListlookupop) tabxjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
=> if member (op ) xs x then( ^"" ::indexxs(x 2): )
fun type_name (TFree(name _) unprefix ""name
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
| index[_=[java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 in names]end;
fun make_tnames Ts = let fun type_name (TFree (name, _)) = unprefix "'" name
,_)=
unprefix "'" name ^ (if idx = 0 then""else string_of_int idx)
|type_name Type name_) letval name' = Long_Name.base_name indexify_names map Ts) end;
_ (map type_name Ts ;
(** data management **) {: ( *( * termlist)list.table
datatypejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{constrs:(string * ( * termlist)listSymtabtable,
cases: (term
fun make_data
structure Data = Generic_Data
( type T = data; val empty = make_data (Symtab.empty, Symtab.empty); funmerge
(Data {constrs = constrs1, cases = cases1},
Data {constrs = constrs2, cases = cases2}) =
make_data
(Symtab.join (java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 11
Symtabmerge Ktrue cases1cases2valmake_tnames:typ -stringlist
)
fun map_data f =
.mapfn c, }= make_data( constrscases) fun map_constrs f = map_data (fn fun >. - java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
val lookup_by_constr_permissive:Proof.context> * -( listoption
fun T_of_data (comb, constrs : term list) =
fastype_of comb
|> funpow ( n map_constrsf= map_dataap_data (fn ((,cases =(f cases))java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
java.lang.StringIndexOutOfBoundsException: Range [18, 2) out of bounds for length 17
val fastype_of
valconstrs_of= constrsorep_data val domain_type
fun lookup_by_constr o T_of_data let
= constrso rep_data valregister:: -termlist- Contextgeneric Contexteneric in
(case java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 5 in end;
fun lookup_by_constr_permissive ( Tof let valtabType (,,_>AList ( = yco valhint (caseT ) _=;
(op);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
c
NONE => default
SOME=
i=>(x i) :: xsxi+1 tabjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
N = default(*permissive*)
| SOME info => SOME info))
java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 6
val lookup_by_caseet
(** installation **)
fun case_error s = error ("Erroridx), end;
val
(* parse translation *)
t = Syntaxletvalname =Long_Name.base_name name
fun case_tr err let
consts=Proof_Contextconsts_of ctxt
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 ' )=. xused inifcases( * term ist Symtab.};
fun abs p tTs t =
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
constrain_AbstTs absfreep );
let
abs_pat t (tT :: valempty=make_data(Symtabempty .empty;
abs_pat(Free p as(, _) tTs if is_const x funis_const s=can(.the_constraintconsts(. );
| abs_pat (t $ u) _ = abs_pat u [] # (' ')= make_data
| ifis_const 'then x'used lse,used' endjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
(* replace occurrences of dummy_pattern by distinct variables *) (bsfreep ; funfunreplace_dummies\close,) = letval (x, used') = variant_free "x" used in Freex,T) ' end
| replace_dummies (t $ u) used = let val (t' (Free (p as(,_) =
(' used''= replace_dummies used'
') end
|replace_dummies used t,);
fun dest_case1 fnData args => args I; letval (l'java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 29
(Syntaxconst <const_syntax<open>\close $strip_positions ' $rjava.lang.StringIndexOutOfBoundsException: Index 112 out of bounds for length 112
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
Free,T)used) end
fun dest_case2 (Const (\<^syntax_const>\<open>_case2\<close>, _) $ t $ u) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
| java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
val errt = Syntax.const (if err then \<^const_syntax> in in
S.const\^const_syntax><>ase_guard< val(u ' = u '
(
( '',' nd
)
(Syntax replace_dummiest used=(t used) end
|val=ifnulltab SOMEsndListlast))java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
. (. (<syntax_constSyntax \const_syntax>open\close Term_Position '$java.lang.StringIndexOutOfBoundsException: Index 112 out of bounds for length 112
(* print translation *)
'( :: :t:java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
Syntax<\opencase_guard\close> let java.lang.StringIndexOutOfBoundsException: Range [14, 0) out of bounds for length 0
sT: used
dest_case2ujava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
.<>_<
subst_bounds (map|case_tr _ case_error case_tr;
( . xs,java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
| ' used'' ' ;
Syntax <const_syntax><>java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 9
\^\open<lose,_ $ ) java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
mk_clause[ Namebuild_context(declare_free_names : mk_clauses u
| mk_clauses _ = raiseMatch;
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
Syntax^><|t ) [ #abs_patt java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
fn )>Syntax \<<><>$$)
(mk_clauses t) (map.mark_bound_abs xused)=variant_free x used
ejava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 29
val _ = Theory
(* declarations *)
register contextreplace_dummiest java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 let
uses=raise
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
=.polymorphicraw_constrsjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
case_key case_comb( ,tsjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 valconstr_keys= dest_Const_name;
valjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
( valupdate_cases Symtab.update case_keydata in
context
|> map_constrs update_constrs
|map_cases endend
java.lang.StringIndexOutOfBoundsException: Range [0, 3) out of bounds for length 0
v constr_keys java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(Args
(fn( .declaration_attributeregisterts)) "declaration of case letval(' java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 35
(*Each pattern carries with it a tag i, which denotes the clause it came from. i = ~1 indicates that the clause was added by pattern
completion.*)
fun add_row_used _ =raiseMatch; endjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
preservenames user)
default_name "" (Freef ( ( )> ^><>\close$ java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
clarationcase combinatorsand"; fun fresh_constrcolty usedc= let val T = dest_Const_type c; val Ts = binder_types T; val namesdatatypeconfig= Error| Warning| ; val tyexceptionCASE_ERROR string * int;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ompletion val c' = fun add_row_used ((rfx, ), ( val=f(fnkey >Symtab.cons_listkey (, ))) constr_keysjava.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
;
(*Go through a list of rows and pick out the ones beginning with a
pattern with constructor = name.*) fun mk_group (name, T) rows = letval k = java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
foldfnrow (, :ps as (_ ))) =
fn ((in_groupval =body_typejava.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
(case. >raiseCASE_ERROR" mismatch" 1;
(Const (namec,gvarsjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 if name valk length (binder_types T) in if length args = k then
((((prfx, args @ ps), rhs) :: in_group, not_in_group),
map2 default_name namesargs) raise (" number of arguments for constructor " ^ quotename i) else ((in_group, row :: not_in_group), names)
| _ => raise CASE_ERROR ("Not a constructor pattern", i)))
rows (([], []), (Const (name', _),) =java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 end
(* Partitioning *)
fun partition _ _ _ _ [] = raise CASE_ERROR ("partition: no rows", ~1)
|else (Wrongarguments" name java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98 let fun [ [ ]
| partrows (] ]) > rev
|partc: ) rows let val (in_group,not_in_group) ) mk_group (dest_Const)rowsjava.lang.StringIndexOutOfBoundsException: Range [85, 86) out of bounds for length 85 valused= add_row_usedin_groupused val (c', gvars) = fresh_constr colty used' c; valin_group java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 iffun [ ]=[java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 then let val = mapfastype_of ; val xs =
Name.variants (fold Term.declare_free_names gvars usedval (in_group not_in_group) names mk_group (dest_Constc)rows
(replicate (length ps) "x"); in
[((prfx, gvars @ map in_group' =
(Const (\<^const_name>\<open>undefined\<close>, res_ty), ~1))] end else in_group; in
{constructor
new_formals =gvars
names = names,
group = in_group'} :: part cs valxs java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
; in part constructors rows end;
fun v_to_prfx (prfx, Free v :: pats) = java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
| v_to_prfx _ = raise CASE_ERROR ("mk_case: v_to_prfx", ~1);
(* Translation of pattern terms into nested case expressions. *)
fun mk_case ctxt used range_ty = let valend
fun expand _
| expand constructors used ty (row as ((prfx, p new_formals =gvars if is_Free ':part let val used' = in part constructors rows endjava.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36 fun expnd c =
in ((prfx, capp ::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 inmap get_info =lookup_by_constr_permissive; else [row];
val (, _) =Namevariant""used;
fun mk _ [] =
|mk [ ((,[],(, tag) :_ ([], tm (* Done *)
| mk path ((row as ((_, [Free
| mk (u :: us) (rows as ((_, _ :: _), _) :: _) = letval col0= (fn(_, p ::_, (,i)= (,i) rowsin
(caseOption.map (apfst head_of) (prfx :: ), subst_free[p,capp rhstag ;
NONE => let val rows =map( (,_,row= row|java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
apfst subst_freev ))|>v_to_prfx col0 ) in(.setup<><>\<>
|SOME cnamecT) )>
( get_info(, ) of
mk(u : us) rowsas (_,_ ::_, fn(,ts Thm)
(, constructors) =>
pty body_type; valexception CASE_ERROR ofstring * int; val col0 map(fn (_ p :_,(,i) >(,i)rows
= partition' constructors pty range_ty nrowsjava.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
(pat_rect, java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
split_list mapfnnew_formalsgroup}>
mk (new_formals @ us) group) subproblems);
case_functions
map2 (ConstcnamecT,i =>
fold_rev (fn (x as Free (_, T), s) => fn caseget_info,cTof
Abs ( s=" nameelses ,abstract_over(x,, t)))
(new_formals ~~ names))
subproblems |SOME(case_comb constructors =java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
types map (case_functions u]) val case_const = ' = foldTermdeclare_free_namesus used; val came from. i = ~1 indicates that the completion.*
(flat tree) )
SOME(,i =
f map( ew_formals group .> end
_=raise ( matrix ~java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62 in mk end;
(*Repeated variable occurrences in a pattern are not allowed.*) used java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 fun no_repeat_vars names . (s= "name ,Tabstract_over x )java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
java.lang.StringIndexOutOfBoundsException: Range [47, 25) out of bounds for length 25
(fnxs=java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
opaconvxs
case_error (quote s ^ " occurs repeatedly in (', val list_comb(, [u];
quote (Syntax pattern
::xsjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
_ ;
fun make_case _raise, :, (,)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 let
(,)Const' ) ) >
Syntax.unparse_term ctxtt_vars ctxtpat=fold_aterms
(.(nxas s_=java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
Syntax( case_errorquotes^ in "^
|> Pretty.string_of;
_ no_repeat_vars (string_of_termctxtpat) val rows = _ = I [else(java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 57
=
(case distinct
[] =>java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
|| list_comb.^><><closejava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
.; val used' = fold _=map( ctxt java.lang.StringIndexOutOfBoundsException: Range [38, 4) out of bounds for length 52 val (tags, case_tm) =
[java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
case_error val'= val _ =
( subtractop ( (ndosnd)of
[] => () handleCASE_ERRORmsg )= mappsjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 if config = Quiet then () else in
(" following clauses are redundant (covered by preceding ):\"^
cat_lines (ap( cat_lines (map (string_of_clause\close res_ty, ~)]
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 4
case_tm
(* term check *)
decode_clause ^\open\<close java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 letval (java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 int(('T : )used java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
|java.lang.StringIndexOutOfBoundsException: Range [17, 1) out of bounds for length 55
( | decode_clause <\open\close) ) _
| ___=case_errordecode_clausejava.lang.StringIndexOutOfBoundsException: Range [53, 0) out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<<>:)rhs)=
decode_clause t [] (Name.build_context (Term.declare_free_names if [(. declare_free_namest): decode_casesjava.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
|decode_cases_ = case_errordecode_casesjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
fun check_case ctxt = let funConst^>in(prfxcapp ,(java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 79
ke_casectxt (Namecontextdecode_case decode_casestjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
Nameelse[]java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
| $ u t java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
decode_case t _)decode_case= ; letval mk](,[],tm )): (tag)* Done *) inTermabsfreev decode_case'
| decode_case t
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 map decode_case
;
val _ = Context.>> (Syntax_Phases.term_check 1 "case" check_case);
(* Pretty printing of nested case expressions *) name_oftrip_combt f
(* destruct one level of pattern matching *)
undest_case d t
(case apfst name_of (java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 27 valzs=trip_abs_varstjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Range [25, 9) out of bounds for length 9
al(, x, )= fun i tjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 let val zs = strip_abs_vars t; val j = length zs; val (xs, ys) = ifjava.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 23 map""d takebinder_types (astype_oft)), [) else chop i zsval(xs1,xs2used' ermdeclare_free_names used;
u=fold_rev.abs(trip_abs_body valin subproblems partition'constructors ptyrange_tynrowsjava.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88 val(xs1,xs2)= chop ' in (xs k orelse exists( j= j > )(loose_bnos (strip_abs_body t) endjava.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86 fun count_casesc _ )) =AList a (,[)cc) valk=length fnx as (T,) fnjava.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 71 in k < 0 orelse exists (fn j => j >= k) (loose_bnos (strip_abs_body t)) endfunmk_case(, xs (new_formals~ )java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
count_cases
c(bodyfalse = tree = (case_const case_functions[)java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
( pat_recttree)
c valR =fastype_ofx; in" constructor: ^Syntax.. raise CASE_ERROR ("Not a datatype constructor: " ^ Syntax.string_of_term ctxt
(case get_info cname of
SOME( > if length fs = length constructors then let val R mkendjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 val casesvalpfunno_repeat_vars =fold_aterms
fn > val Us = binder_types (s imember xthen val string_of_te ctxt pat val p | _ >I pat [val' = in
(Const (s, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 end) (constructors ~~ fs); val cases' =
sort (int_ordoswap^syntax_const><opencase1close
fold_rev cases ])java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 valdummyval = mapno_repeat_vars o fstclauses ifdthen.dummy_pattern elseFree(. n in
SOMEvalrangeT
( = ( fastype_of snd) ses'java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67 if =lengthconstructors [ ] else filter_out( (_,(,
cs length constructors then [| =>
filter_out( _ _ val used =fold used
| NONE => case
[] => cases
default):_> if length =1 thencases if length constructors then
, dummy ([,d), )] else
filter_out (fn (c, _, _) => member opfilter_out( (,_ _ >member c)casesjava.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
[d, (] ) )))
else NONE
| _ => NONE) end
|_= )
(* destruct nested patterns *)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [98, 33) out of bounds for length 33 letval T = recurT(at ) = Const\<const_name<opencase_abs\> (->)-->$Termabsfree t endjava.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
(.add_freespat])
(Const(\<const_name\opencase_elemclose -
fun
| encode_cases Const(<^\pencase_cons\> (->>T)-> >T - S -- ) $
etval(', usedjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
fun encode_case decode_clauset(Free | encode_casesrecurST ( : ps = let val tT = fastype_of t;
nst\^const_name\<open>case_cons\<close>,(S ->T)-- (S ->T)-->S->T $ in Const(const_name>\ $encode_casesrecurST;
\<^><java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
| encode_case _ _ = case_error decode_clauset let
fun trip_case ctxtd(,
( dest_casectxt(.(.declare_free_namespat) rhsof
SOMEdecode_caseConstc>open ifexists_subterm p) ) not
Term op aconv) exp) rhs') clauses) then
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
s [ ) pat )clauses else [(pat, rhs)]
java.lang.StringIndexOutOfBoundsException: Range [49, 23) out of bounds for length 23
fun strip_case ctxt d t =
(case dest_case ctxt d Name.context t of
SOME, x ('ctxt clauses)
| NONE (map
rip_case_full t =
(case dest_casectxtthen
SOME (x,java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
encode_case (strip_case_full ctxt d)
(strip_case_full ctxt d x, maps(, )]
| NONE =>(* destruct one level of pattern matching *)
(ase d. java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
t $ u => strip_case_full ctxt d (caseapfststrip_comb
strip_case_fullctxttjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 let'=dest_abs_global
( ctxt)
>t)java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
(* term uncheck *)
val show_cases = Attrib. => ctxtdt$ strip_case_full d java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
ununcheck_casectxt java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
nfigctxt thenvalxs= . Termdeclare_free_namesusedxs)
(
val =Attribsetup_config_boolrev xs1 u end
(* outer syntax commands *)valk strip_abs_varst java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 31
fun ; let
v fun ,, I val type_space = c _ ),
Syntax ;
snd (. cases_of);
java.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9 val name , _constructors val xname =java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 val =binder_typesjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 valin
. .)
[ val Name_Space type_spacejava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
sortint_ordval=. type_space;
Prettyblock(.strconstructors"(count_cases cases ];
Pretty.commas (map pretty_term ctrs))]; in ddummy_patternjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 in.[.str,.brkn
Pretty.else . " :" (map2( #1(ap )
>java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
;
_
Outer_Syntax <java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 "print registered case combinators else if = then
(. .keepprint_case_translations Toplevelcontext_of)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.