Skip to content

Instantly share code, notes, and snippets.

@ceedubs
Created September 13, 2021 14:04
Show Gist options
  • Save ceedubs/3bd3a09edc6b3a2bf0819f6d07398d6c to your computer and use it in GitHub Desktop.
Save ceedubs/3bd3a09edc6b3a2bf0819f6d07398d6c to your computer and use it in GitHub Desktop.
Unison pretty-printer bug: Unit applied to type constructor is printed with !

pretty printer: Unit applied to type constructor is printed with !

Some 3 is printed as Some 3, but Some () is printed as !Some.

I'm guessing that there's some logic to pretty-print unit being applied to a thunk (a function) that is also being applied to type constructors.

> Some 3

> Some ()

You can also see this applied to custom type constructors.

structural type Wrapper a = Wrapper a
.> add
> Wrapper 3

> Wrapper ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment