File: common/constant.rb

Overview
Module Structure
Class Hierarchy
Code

Overview

Module Structure

  module: <Toplevel Module>
  module: Umu#4
has properties
constant: PP_INDENT_WIDTH #5
constant: L #117
constant: LL #118
constant: LT #119
constant: CS #120
constant: CSM #121
constant: CSMD #122
constant: CSME #123
constant: CSMP #124
constant: CSC #125
constant: CSCD #126
constant: CSCE #127
constant: CSCEU #128
constant: CSCEB #129
constant: CSCEN #130
constant: CSCP #131
constant: AS #132
constant: ASR #133
constant: ASC #134
constant: ASCD #135
constant: ASCE #136
constant: ASCEU #137
constant: ASCEB #138
constant: ASCEN #139
constant: V #140
constant: VC #141
constant: VCA #142
constant: VCAN #143
constant: VCP #144
constant: VCU #145
constant: VCM #146
constant: E #147
constant: EC #148
constant: ECT #149
constant: ECTS #150
constant: ECTSC #151
constant: ECTSM #152
constant: ECV #153
constant: ASSERT #155
constant: X #156
constant: LOC #157
constant: PRT #158
  module: Lexical#13
module: Lexer    #14
module: Token    #15
  module: ConcreteSyntax#17
has properties
constant: WILDCARD #33
  module: Module#18
module: Declaration    #19
module: Expression    #20
module: Pattern    #21
  module: Core#23
  module: Declaration#24
  module: Expression#25
module: Unary    #26
module: Binary    #27
module: Nary    #28
  module: Pattern#30
  module: AbstractSyntax#35
  module: Result#36
  module: Core#37
  module: Declaration#38
  module: Expression#39
module: Unary    #40
module: Binary    #41
module: Nary    #42
  module: Value#46
  module: Core#47
  class: Top#48
inherits from
  Object ( Builtin-Module )
  class: Object#49
inherits from
  Top ( Umu::Value::Core )
  class: Unit#50
inherits from
  Object ( Umu::Value::Core )
  module: Atom#51
  class: Abstract#52
inherits from
  Object ( Umu::Value::Core )
  class: Bool#53
inherits from
  Abstract ( Umu::Value::Core::Atom )
  module: Number#54
  class: Abstract#55
inherits from
  Abstract ( Umu::Value::Core::Atom )
  class: Int#56
  class: Float#57
  class: String#59
inherits from
  Abstract ( Umu::Value::Core::Atom )
  module: Product#61
  class: Abstract#62
includes
  Enumerable ( Builtin-Module )
inherits from
  Object ( Umu::Value::Core )
  class: Tuple#63
inherits from
  Abstract ( Umu::Value::Core::Product )
  module: Union#65
  class: Abstract#66
inherits from
  Object ( Umu::Value::Core )
  module: Option#67
  class: Abstract#68
inherits from
  Abstract ( Umu::Value::Core::Union )
  module: Morph#71
  class: Abstract#72
inherits from
  Object ( Umu::Value::Core )
  class: Interval#73
inherits from
  Abstract ( Umu::Value::Core::Morph )
  module: Enum#74
  class: Abstract#75
inherits from
  Abstract ( Umu::Value::Core::Morph )
  module: List#77
  class: Abstract#78
includes
  Enumerable ( Builtin-Module )
inherits from
  Abstract ( Umu::Value::Core::Morph )
  module: Stream#80
  module: Entry#81
  class: Abstract#82
inherits from
  Abstract ( Umu::Value::Core::Morph )
  class: Interval#83
  module: SExpr#87
  class: Abstract#88
inherits from
  Object ( Umu::Value::Core )
  class: Fun#90
inherits from
  Object ( Umu::Value::Core )
  module: IO#91
  class: Abstract#92
inherits from
  Object ( Umu::Value::Core )
  class: Input#93
inherits from
  Abstract ( Umu::Value::Core::IO )
  class: Output#94
inherits from
  Abstract ( Umu::Value::Core::IO )
  class: Dir#96
inherits from
  Object ( Umu::Value::Core )
  module: Environment#99
  module: Context#100
  module: Type#101
  module: Signature#102
module: Class    #103
module: Method    #104
  module: Value#107
  module: Abstraction#8
  class: Model#9
inherits from
  Object ( Builtin-Module )
  class: Record#10
inherits from
  Object ( Builtin-Module )
  class: Collection#11
includes
  Enumerable ( Builtin-Module )
inherits from
  Object ( Builtin-Module )
  module: Assertion#111
  module: Exception#112
  module: Location#113
  module: PrettyPrint#114

Code

   1  # coding: utf-8
   2  # frozen_string_literal: true
   3 
   4  module Umu
   5      PP_INDENT_WIDTH = 4    # for pretty printing
   6 
   7 
   8      module Abstraction
   9          class Model; end
  10          class Record; end
  11          class Collection; end
  12      end
  13      module Lexical
  14          module Lexer;   end
  15          module Token;   end
  16      end
  17      module ConcreteSyntax
  18          module Module
  19              module Declaration; end
  20              module Expression;  end
  21              module Pattern;     end
  22          end
  23          module Core
  24              module Declaration; end
  25              module Expression
  26                  module Unary;   end
  27                  module Binary;  end
  28                  module Nary;    end
  29              end
  30              module Pattern;     end
  31          end
  32 
  33          WILDCARD = :_
  34      end
  35      module AbstractSyntax
  36          module Result;      end
  37          module Core
  38              module Declaration; end
  39              module Expression
  40                  module Unary;   end
  41                  module Binary;  end
  42                  module Nary;    end
  43              end
  44          end
  45      end
  46      module Value
  47          module Core
  48              class Top < ::Object; end
  49              class Object < Top; end
  50              class Unit < Object; end
  51              module Atom
  52                  class Abstract < Object; end
  53                  class Bool < Abstract; end
  54                  module Number
  55                      class Abstract < Atom::Abstract; end
  56                      class Int < Abstract; end
  57                      class Float < Abstract; end
  58                  end
  59                  class String < Abstract; end
  60              end
  61              module Product
  62                  class Abstract < Object; end
  63                  class Tuple < Abstract; end
  64              end
  65              module Union
  66                  class Abstract < Object; end
  67                  module Option
  68                      class Abstract < Union::Abstract; end
  69                  end
  70              end
  71              module Morph
  72                  class Abstract < Object; end
  73                  class Interval < Abstract; end
  74                  module Enum
  75                      class Abstract < Morph::Abstract; end
  76                  end
  77                  module List
  78                      class Abstract < Morph::Abstract; end
  79                  end
  80                  module Stream
  81                      module Entry
  82                          class Abstract < Morph::Abstract; end
  83                          class Interval < Abstract; end
  84                      end
  85                  end
  86              end
  87              module SExpr
  88                  class Abstract < Object; end
  89              end
  90              class Fun < Object; end
  91              module IO
  92                  class Abstract < Object; end
  93                  class Input  < Abstract; end
  94                  class Output < Abstract; end
  95              end
  96              class Dir < Object; end
  97          end
  98      end
  99      module Environment
 100          module Context
 101              module Type
 102                  module Signature
 103                      module Class; end
 104                      module Method; end
 105                  end
 106              end
 107              module Value; end
 108          end
 109      end
 110 
 111      module Assertion;   end
 112      module Exception;   end
 113      module Location;   end
 114      module PrettyPrint; end
 115 
 116 
 117      L       = Lexical
 118      LL      = Lexical::Lexer
 119      LT      = Lexical::Token
 120      CS      = ConcreteSyntax
 121      CSM     = ConcreteSyntax::Module
 122      CSMD    = ConcreteSyntax::Module::Declaration
 123      CSME    = ConcreteSyntax::Module::Expression
 124      CSMP    = ConcreteSyntax::Module::Pattern
 125      CSC     = ConcreteSyntax::Core
 126      CSCD    = ConcreteSyntax::Core::Declaration
 127      CSCE    = ConcreteSyntax::Core::Expression
 128      CSCEU   = ConcreteSyntax::Core::Expression::Unary
 129      CSCEB   = ConcreteSyntax::Core::Expression::Binary
 130      CSCEN   = ConcreteSyntax::Core::Expression::Nary
 131      CSCP    = ConcreteSyntax::Core::Pattern
 132      AS      = AbstractSyntax
 133      ASR     = AbstractSyntax::Result
 134      ASC     = AbstractSyntax::Core
 135      ASCD    = AbstractSyntax::Core::Declaration
 136      ASCE    = AbstractSyntax::Core::Expression
 137      ASCEU   = AbstractSyntax::Core::Expression::Unary
 138      ASCEB   = AbstractSyntax::Core::Expression::Binary
 139      ASCEN   = AbstractSyntax::Core::Expression::Nary
 140      V       = Value
 141      VC      = Value::Core
 142      VCA     = Value::Core::Atom
 143      VCAN    = Value::Core::Atom::Number
 144      VCP     = Value::Core::Product
 145      VCU     = Value::Core::Union
 146      VCM     = Value::Core::Morph
 147      E       = Environment
 148      EC      = Environment::Context
 149      ECT     = Environment::Context::Type
 150      ECTS    = Environment::Context::Type::Signature
 151      ECTSC   = Environment::Context::Type::Signature::Class
 152      ECTSM   = Environment::Context::Type::Signature::Method
 153      ECV     = Environment::Context::Value
 154 
 155      ASSERT  = Assertion
 156      X       = Exception
 157      LOC     = Location
 158      PRT     = PrettyPrint
 159  end # Umu