hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

types.ha (471B)


      1 // SPDX-License-Identifier: MPL-2.0
      2 // (c) Hare authors <https://harelang.org>
      3 
      4 use errors;
      5 
      6 // Any error that may occur during TTY-related tasks.
      7 export type error = !(errors::invalid | errors::unsupported | errors::noentry);
      8 
      9 // Converts an [[error]] to a human-friendly string.
     10 export fn strerror(err: error) str = {
     11 	return errors::strerror(err);
     12 };
     13 
     14 // Structure representing dimensions of a terminal.
     15 export type ttysize = struct {
     16 	rows:    u16,
     17 	columns: u16,
     18 };