Module: Dhall::TypeChecker::Forall::FunctionKind

Defined in:
lib/dhall/typecheck.rb

Defined Under Namespace

Classes: Polymorphic, Term

Class Method Summary collapse

Class Method Details

.for(inkind, outkind) ⇒ Object



880
881
882
883
884
885
886
887
888
889
890
# File 'lib/dhall/typecheck.rb', line 880

def self.for(inkind, outkind)
	if inkind.nil? || outkind.nil?
		raise TypeError, "FunctionType part of this is a term"
	end

	if outkind.zero?
		Term.new
	else
		Polymorphic.new(inkind, outkind)
	end
end