Sha256: 94a717c7957b14e33af3ede5b84221ed8e801b4848309283da5cb337569622e9

Contents?: true

Size: 479 Bytes

Versions: 3

Compression:

Stored size: 479 Bytes

Contents

# frozen_string_literal: true

require 'singleton'
require_relative 'duck_fiber'
require_relative 'nullary_relation'

module MiniKraken
  module Core
    # A nullary relation that unconditionally always fails.
    class Fail < NullaryRelation
      include Singleton

      def initialize
        super('fail', '#u')
      end

      # @return [DuckFiber]
      def solver_for(_actuals, _env)
        DuckFiber.new(:failure)
      end
    end # class
  end # module
end # module

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mini_kraken-0.1.07 lib/mini_kraken/core/fail.rb
mini_kraken-0.1.06 lib/mini_kraken/core/fail.rb
mini_kraken-0.1.05 lib/mini_kraken/core/fail.rb