Class: Dhall::TypeChecker::Builtin
- Inherits:
-
Object
- Object
- Dhall::TypeChecker::Builtin
- Defined in:
- lib/dhall/typecheck.rb
Instance Method Summary collapse
- #annotate ⇒ Object
-
#initialize(builtin) ⇒ Builtin
constructor
A new instance of Builtin.
Constructor Details
#initialize(builtin) ⇒ Builtin
Returns a new instance of Builtin.
1194 1195 1196 1197 |
# File 'lib/dhall/typecheck.rb', line 1194 def initialize(builtin) @expr = builtin @name = builtin.as_json end |
Instance Method Details
#annotate ⇒ Object
1199 1200 1201 1202 1203 1204 1205 1206 |
# File 'lib/dhall/typecheck.rb', line 1199 def annotate(*) Dhall::TypeAnnotation.new( value: @expr, type: BUILTIN_TYPES.fetch(@name) do raise TypeError, "Unknown Builtin #{@name}" end ) end |