Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Michael Kohl 馃嚘馃嚬馃嚬馃嚟
@citizen428@chaos.social  路  activity timestamp 3 days ago

I like consistent colors in my terminal and I like #OCaml, so I threw together a quick Nord color scheme for utop:

https://git.sr.ht/~citizen428/nord-utop

The following example code in a utop session show in the Nord colorscheme.

# let rec sum = function
| [] -> 0
| hd :: tl -> hd + sum tl;;
val sum : int list -> int = <fun>
# #show sum;;
val sum : int list -> int
# "Hello, " ^ "OCaml " ^ "World!";;
- : string = "Hello, OCaml World!"
# 1/0;;
Exception: Division_by_zero.
# 1 + "string";;
Error: This constant has type string but an expression was expected of type int
The following example code in a utop session show in the Nord colorscheme. # let rec sum = function | [] -> 0 | hd :: tl -> hd + sum tl;; val sum : int list -> int = <fun> # #show sum;; val sum : int list -> int # "Hello, " ^ "OCaml " ^ "World!";; - : string = "Hello, OCaml World!" # 1/0;; Exception: Division_by_zero. # 1 + "string";; Error: This constant has type string but an expression was expected of type int
The following example code in a utop session show in the Nord colorscheme. # let rec sum = function | [] -> 0 | hd :: tl -> hd + sum tl;; val sum : int list -> int = <fun> # #show sum;; val sum : int list -> int # "Hello, " ^ "OCaml " ^ "World!";; - : string = "Hello, OCaml World!" # 1/0;; Exception: Division_by_zero. # 1 + "string";; Error: This constant has type string but an expression was expected of type int
  • Copy link
  • Flag this post
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About 路 Code of conduct 路 Privacy 路 Users 路 Instances
Bonfire social 路 1.0.0-rc.3.21 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login