Sha256: 81dd1f15fd0ed7539dd48717f607a90e637e1accb38b37f58d66a1f58a5c8c9f

Contents?: true

Size: 457 Bytes

Versions: 3

Compression:

Stored size: 457 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 Succeed < NullaryRelation
      include Singleton

      def initialize
        super('succeed', '#s')
      end

      def solver_for(_actuals, _env)
        DuckFiber.new(:success)
      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/succeed.rb
mini_kraken-0.1.06 lib/mini_kraken/core/succeed.rb
mini_kraken-0.1.05 lib/mini_kraken/core/succeed.rb