-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve pretty-printing #64
Labels
Comments
jstolarek
added a commit
that referenced
this issue
Mar 20, 2017
Reported example now pretty prints as:
|
This is looking pretty nice ;)
…On 20 March 2017 at 17:45, Jan Stolarek ***@***.***> wrote:
Reported example now pretty prints as:
Running ../../examples/gauss.tml
val it = let n = 4 in
let as = _ in
_ ;;
_ ;;
_ ;;
_ ;;
_ ;;
_ ;;
_ ;;
_ ;;
_ ;;
_ ;;
_ ;;
_ ;;
_ ;;
_ ;;
_ ;;
_ ;;
_ ;;
_ ;;
_ ;;
_ ;;
let bs = _ in
_ ;;
_ ;;
_ ;;
_ ;;
let as' = array(n, _) in
set(as', 0, array(n, _)) ;;
set(as', 1, array(n, _)) ;;
set(as', 2, array(n, _)) ;;
_ ;;
set(get(as', 0), 0, 3.0) ;;
set(get(as', 0), 1, -1.0) ;;
_ ;;
_ ;;
set(get(as', 1), 0, 3.0) ;;
set(get(as', 1), 1, -1.0) ;;
_ ;;
_ ;;
set(get(as', 2), 0, 1.0) ;;
set(get(as', 2), 1, 2.0) ;;
_ ;;
_ ;;
_ ;;
_ ;;
_ ;;
_ ;;
let bs' = _ in
_ ;;
_ ;;
_ ;;
_ ;;
let gauss = (fun gauss a b =>
let dia = ref 0 in
(while !dia < n do
let row = ref (!dia + 1) in
(while !row < n do
let tmp = (get(get(a, !row), !dia)) / (get(get(a, !dia), !dia)) in
let col = ref (!dia + 1) in
(while !col < n do
let x = get(get(a, !row), !col) in
set(get(a, !row), !col, x - (tmp * (get(get(a, !dia), !col)))) ;;
_)
;;
_ ;;
let b_row = _ in
_ ;; row := !row + 1)
;; dia := !dia + 1)
;; _) in
map (fun f x => gauss fst x _) Cons (_, Cons ((as', _), _)) : trace(reslist)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#64 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHY8pFhAWrSO_gbp1LuuGXgva_EXt7Zks5rnrtXgaJpZM4MNuLJ>
.
|
jstolarek
added a commit
that referenced
this issue
Mar 21, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pretty-printing for larger programs is far from "pretty":
Need to do something about those indentations.
The text was updated successfully, but these errors were encountered: