Method: Dhall::TypeChecker.assert_types_match
- Defined in:
- lib/dhall/typecheck.rb
.assert_types_match(a, b, message, context:) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/dhall/typecheck.rb', line 20 def self.assert_types_match(a, b, , context:) atype = self.for(a).annotate(context).type btype = self.for(b).annotate(context).type unless atype.normalize == btype.normalize raise TypeError, "#{}: #{atype}, #{btype}" end atype end |