Class: Dhall::Builtins::Optional_build

Inherits:
Dhall::BuiltinFunction show all
Defined in:
lib/dhall/builtins.rb

Instance Method Summary collapse

Methods inherited from Dhall::BuiltinFunction

#as_json, #call, #unfill

Methods inherited from Dhall::Builtin

#as_json

Methods inherited from Expression

#&, #*, #+, #annotate, #as_dhall, #cache_key, #call, #concat, decode, #deep_merge, #deep_merge_type, #dhall_eq, #digest, #fetch, #merge, #normalize, #resolve, #shift, #slice, #substitute, #to_binary, #to_cbor, #to_proc, #to_s, #|

Instance Method Details

#fusion(*args) ⇒ Object



293
294
295
296
297
298
299
300
301
302
# File 'lib/dhall/builtins.rb', line 293

def fusion(*args)
	_, arg, = args
	if arg.is_a?(Application) &&
	   arg.function.is_a?(Application) &&
	   arg.function.function == Optional_fold.new
		arg.argument
	else
		super
	end
end