equal
deleted
inserted
replaced
781 |
781 |
782 val head = concl |
782 val head = concl |
783 |> perhaps (try HOLogic.dest_not) |> perhaps (try (fst o HOLogic.dest_eq)) |
783 |> perhaps (try HOLogic.dest_not) |> perhaps (try (fst o HOLogic.dest_eq)) |
784 |> head_of; |
784 |> head_of; |
785 |
785 |
786 val rhs_opt = concl |> perhaps (try HOLogic.dest_not) |> try (snd o HOLogic.dest_eq); |
786 val rhs_opt = concl |> perhaps (try HOLogic.dest_not) |> try (HOLogic.dest_eq #> snd); |
|
787 val _ = is_none rhs_opt orelse not (can dest_funT (fastype_of (the rhs_opt))) orelse |
|
788 error_at ctxt [eqn] "Expected more arguments to function on left-hand side"; |
787 |
789 |
788 val discs = maps (map #disc) basic_ctr_specss; |
790 val discs = maps (map #disc) basic_ctr_specss; |
789 val sels = maps (maps #sels) basic_ctr_specss; |
791 val sels = maps (maps #sels) basic_ctr_specss; |
790 val ctrs = maps (map #ctr) basic_ctr_specss; |
792 val ctrs = maps (map #ctr) basic_ctr_specss; |
791 in |
793 in |