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
750 751 752 753 754 755 756 757 758 759 760 761 762 |
# File 'lib/dhall/typecheck.rb', line 750 def self.for(inkind, outkind) if inkind.nil? || outkind.nil? raise TypeError, "FunctionType part of this is a term" end raise TypeError, "Dependent types are not allowed" if outkind > inkind if outkind.zero? Term.new else Polymorphic.new(inkind, outkind) end end |