Sha256: 666a31e47f1727438a01514e63083d0a3fd2d5359163e101e2bceae56876b23e

Contents?: true

Size: 438 Bytes

Versions: 3

Compression:

Stored size: 438 Bytes

Contents

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.04 lib/mini_kraken/core/succeed.rb
mini_kraken-0.1.03 lib/mini_kraken/core/succeed.rb
mini_kraken-0.1.02 lib/mini_kraken/core/succeed.rb