cduce issueshttps://gitlab.math.univ-paris-diderot.fr/cduce/cduce/-/issues2022-09-29T17:37:04+02:00https://gitlab.math.univ-paris-diderot.fr/cduce/cduce/-/issues/35Improve pretty-printing /parsing of types using UTF-8 Symbols2022-09-29T17:37:04+02:00Kim NguyễnImprove pretty-printing /parsing of types using UTF-8 SymbolsIt would be nice if CDuce was able to pretty-print types with UTF-8 connectives. This would depend on #34. Some requirements :
- It needs to be automatically disabled for terminals that don't support UTF-8
- A user must be able to disabl...It would be nice if CDuce was able to pretty-print types with UTF-8 connectives. This would depend on #34. Some requirements :
- It needs to be automatically disabled for terminals that don't support UTF-8
- A user must be able to disable it with a command-line flag
- This should also work for parsing. A rule of thumb to ensure the correct pretty-printing of types is that CDuce should always be able to parse a type it has pretty-printed (such that both types are equivalent).Usabilityhttps://gitlab.math.univ-paris-diderot.fr/cduce/cduce/-/issues/4Fix pretty printing of Top types2017-10-16T08:48:07+02:00Kim NguyễnFix pretty printing of Top types```
# let max (x: 'a) (y: 'a): 'a = if ( x >> y) then x else y;;
val max : 'a -> 'a -> 'a = <fun>
# max (42 : Int);;
- : (('a \ (Int)) | Int) -> (('a \ (Int)) | Int) = <fun>
# max (42 : 42|AnyXml|Atom|Arrow);;
- : (('a \ ((Arrow | ...```
# let max (x: 'a) (y: 'a): 'a = if ( x >> y) then x else y;;
val max : 'a -> 'a -> 'a = <fun>
# max (42 : Int);;
- : (('a \ (Int)) | Int) -> (('a \ (Int)) | Int) = <fun>
# max (42 : 42|AnyXml|Atom|Arrow);;
- : (('a \ ((Arrow | Atom))) | (Arrow | AnyXml | Atom | 42)) -> (('a \ (
(Arrow |
Atom))) |
(Arrow |
AnyXml |
Atom | 42)) = <fun>
# max (42 : 42|AnyXml|Atom);;
- : (('a \ (Atom)) | (AnyXml | Atom | 42)) -> (('a \ (Atom)) |
(AnyXml | Atom | 42)) = <fun>
```