haskell 0.2.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d3c9ffa1d1b36cb7926952b21760fbf551702a43
4
- data.tar.gz: 74e7d0eefc40f2d5564b3adc4cb484f4ce9e6135
3
+ metadata.gz: c9efb31f91a7475d1fcd51a18b529879ca3ab0ea
4
+ data.tar.gz: 3e9184b5470a354934ae4ceee378abb85444019c
5
5
  SHA512:
6
- metadata.gz: 013a5b1881c581a93a8075974edcf3aa3f12d175cfd4957b87948b41599181ed484579053b9b7683a4b699c30e97d94256ef333d49d8de099b339162bb388355
7
- data.tar.gz: 16ddb4cb6b778cfad27173c79809063c9d6856d15628aac70cba9d1405a177872389f6f6551d1cb16c015d249934e12d4cebe0d5769ae2dab7007ceb16eb725d
6
+ metadata.gz: 1fe9296da19d105b068cdabb4d56885022c88503db22a540230e27f43392d77181dece9c3f959a2cb921aa416fe858471dba5815bec6eab15a1c8f3f487b83d4
7
+ data.tar.gz: 4bfdcbda96973d27a17472ade7d7c19451976c75e2649de5c460ddcee16d6f2846def54127c7a703c4602018c6fe470eb8d97836932456540d67c98560d557d2
data/README.md CHANGED
@@ -5,7 +5,7 @@ Matz has mentioned Ruby3.0 with static type at some confluences. But almost all
5
5
  But it's worth thinking more. This gem is kind of trial without so much side-effect.
6
6
 
7
7
  ```rb
8
- require 'rubype'
8
+ require 'haskell'
9
9
 
10
10
  # ex1
11
11
  class MyClass
@@ -81,13 +81,13 @@ MyClass.new.foo('str')
81
81
 
82
82
  ## Installation
83
83
 
84
- gem install rubype or add gem 'rubype' to your Gemfile.
84
+ gem install haskell or add gem 'haskell' to your Gemfile.
85
85
 
86
86
  This gem requires Ruby 2.0.0+.
87
87
 
88
88
  ### Contributing
89
89
 
90
- Fork it ( https://github.com/[my-github-username]/rubype/fork )
90
+ Fork it ( https://github.com/[my-github-username]/haskell/fork )
91
91
 
92
92
  Create your feature branch (`git checkout -b my-new-feature`)
93
93
 
data/Rakefile CHANGED
@@ -5,15 +5,4 @@ Rake::TestTask.new(:test) do |t|
5
5
  t.libs << "test"
6
6
  end
7
7
 
8
- require "rake/extensiontask"
9
-
10
- Rake::ExtensionTask.new("rubype") do |ext|
11
- ext.lib_dir = "lib/rubype"
12
- end
13
-
14
- task :compile_and_test do
15
- Rake::Task['compile'].invoke
16
- Rake::Task['test'].invoke
17
- end
18
-
19
- task default: :compile_and_test
8
+ task default: :test
data/bin/rubype CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'rubype'
3
+ require 'haskell'
File without changes
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ module Haskell
2
+ VERSION = "0.2.2"
3
+ end
@@ -1,5 +1,3 @@
1
- require "rubype/rubype"
2
-
3
1
  # Builtin Contracts
4
2
  class Any; end
5
3
  module Boolean; end
@@ -8,26 +6,26 @@ FalseClass.send(:include, Boolean)
8
6
 
9
7
  class Module
10
8
  private
11
- def __rubype__
12
- prepend (@__rubype__ = Module.new) unless @__rubype__
13
- @__rubype__
9
+ def __haskell__
10
+ prepend (@__haskell__ = Module.new) unless @__haskell__
11
+ @__haskell__
14
12
  end
15
13
 
16
14
  def typesig(hash)
17
15
  meth = hash.keys.first
18
16
  *arg_types, type_pair = hash.values.first
19
17
 
20
- __rubype__.send(:define_method, meth) do |*args, &block|
21
- ::Rubype.assert_arg_type(meth, args, arg_types << type_pair.keys.first)
18
+ __haskell__.send(:define_method, meth) do |*args, &block|
19
+ ::Haskell.assert_arg_type(meth, args, arg_types << type_pair.keys.first)
22
20
  rtn = super(*args, &block)
23
- ::Rubype.assert_trn_type(meth, rtn, type_pair.values.first)
21
+ ::Haskell.assert_trn_type(meth, rtn, type_pair.values.first)
24
22
  rtn
25
23
  end
26
24
  self
27
25
  end
28
26
  end
29
27
 
30
- module Rubype
28
+ module Haskell
31
29
  class << self
32
30
  def assert_arg_type(meth, args, klasses)
33
31
  args.each_with_index do |arg, i|
data/rubype.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'rubype/version'
4
+ require 'haskell/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "haskell"
8
- spec.version = Rubype::VERSION
8
+ spec.version = Haskell::VERSION
9
9
  spec.authors = ["gogotanaka"]
10
10
  spec.email = ["mail@tanakakazuki.com"]
11
- spec.extensions = ["ext/rubype/extconf.rb"]
11
+ spec.extensions = ["ext/haskell/extconf.rb"]
12
12
  spec.summary = %q{Ruby with type.}
13
13
  spec.description = %q{Ruby with type.}
14
14
  spec.homepage = "http://gogotanaka.me/"
@@ -1,4 +1,4 @@
1
1
  $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
- require 'rubype'
2
+ require 'haskell'
3
3
 
4
4
  require 'minitest/autorun'
data/test/test_rubype.rb CHANGED
@@ -4,7 +4,7 @@ class TypePair
4
4
  "#{last_arg_type} => #{rtn_type}"
5
5
  end
6
6
  end
7
- class TestRubype < MiniTest::Unit::TestCase
7
+ class TestHaskell < MiniTest::Unit::TestCase
8
8
  def setup
9
9
  @string = 'str'
10
10
  @numeric = 1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haskell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - gogotanaka
@@ -72,7 +72,7 @@ email:
72
72
  executables:
73
73
  - rubype
74
74
  extensions:
75
- - ext/rubype/extconf.rb
75
+ - ext/haskell/extconf.rb
76
76
  extra_rdoc_files: []
77
77
  files:
78
78
  - ".gitignore"
@@ -82,11 +82,11 @@ files:
82
82
  - README.md
83
83
  - Rakefile
84
84
  - bin/rubype
85
- - ext/rubype/extconf.rb
86
- - ext/rubype/rubype.c
87
- - ext/rubype/rubype.h
88
- - lib/rubype.rb
89
- - lib/rubype/version.rb
85
+ - ext/haskell/extconf.rb
86
+ - ext/haskell/haskell.c
87
+ - ext/haskell/haskell.h
88
+ - lib/haskell.rb
89
+ - lib/haskell/version.rb
90
90
  - rubype.gemspec
91
91
  - test/minitest_helper.rb
92
92
  - test/test_rubype.rb
@@ -1,3 +0,0 @@
1
- module Rubype
2
- VERSION = "0.2.0"
3
- end