Skip to content
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

Fold long types when printing #210

Closed
julianhyde opened this issue Dec 12, 2023 · 0 comments
Closed

Fold long types when printing #210

julianhyde opened this issue Dec 12, 2023 · 0 comments

Comments

@julianhyde
Copy link
Collaborator

Long type descriptors should fold over multiple lines if they exceed the line width. For example, in smlnj:

- Control.Print.linewidth := 40;
val it = () : unit
- val x = [[1,2,3], [4,5], [6], []];
val x = [[1,2,3],[4,5],[6],[]] : int list list
- val y = ([1,2,3], [4,5], [6], []);
val y = ([1,2,3],[4,5],[6],[])
  : int list * int list * int list * 
    'a list
- val z = {a=[1,2,3], b=[4,5], c=[6], d=()};
val z = {a=[1,2,3],b=[4,5],c=[6],d=()}
  : {a:int list, b:int list,
     c:int list, d:unit}
- val r = {x=x,y=y,z=z};
val r =
  {x=[[1,2,3],[4,5],[6],[]],
   y=([1,2,3],[4,5],[6],[]),
   z={a=[1,2,3],b=[4,5],c=[6],d=()}}
  : {x:int list list,
     y:int list * int list * int list
       * 'a list,
     z:{a:int list, b:int list,
        c:int list, d:unit}}

Currently Morel folds the value but not the type:

val r =
  {x=[[1,2,3],[4,5],[6],[]],
   y=([1,2,3],[4,5],[6],[]),
   z={a=[1,2,3],b=[4,5],c=[6],d=()}}
  : {x:int list list, y:int list * int list * int list * 'a list, z:{a:int list, b:int list, c:int list, d:unit}}
julianhyde added a commit to julianhyde/morel that referenced this issue Dec 13, 2023
julianhyde added a commit to julianhyde/morel that referenced this issue Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant