Cannot smap tuple #124

Closed
joneshf opened this Issue Jul 27, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@joneshf
Contributor

joneshf commented Jul 27, 2015

Am I doing something wrong here, or is there an actual bug?

~  npm i jsverify
jsverify@0.6.2 node_modules/jsverify
├── rc4@0.1.5
├── lazy-seq@0.2.0
├── trampa@1.0.0
└── typify-parser@0.0.1~  node
> var jsv = require('jsverify');
undefined
> jsv.pair(jsv.nat, jsv.bool).smap(function(x) { return x; }, function(x) { return x; })
{ generator: 
   { [Function]
     map: [Function: generatorProtoMap],
     flatmap: [Function: generatorProtoFlatMap],
     flatMap: [Function: generatorProtoFlatMap] },
  shrink: { [Function] smap: [Function: shrinkProtoIsoMap] },
  show: [Function: showDef],
  smap: [Function: arbitraryProtoSMap] }
> jsv.tuple([jsv.nat, jsv.bool]).smap(function(x) { return x; }, function(x) { return x; })
TypeError: undefined is not a function
    at Object.arbitraryProtoSMap [as smap] (/home/joneshf/node_modules/jsverify/lib/arbitraryBless.js:16:24)
    at repl:1:32
    at REPLServer.defaultEval (repl.js:132:27)
    at bound (domain.js:254:14)
    at REPLServer.runBound [as eval] (domain.js:267:12)
    at REPLServer.<anonymous> (repl.js:279:12)
    at REPLServer.emit (events.js:107:17)
    at REPLServer.Interface._onLine (readline.js:214:10)
    at REPLServer.Interface._line (readline.js:553:8)
    at REPLServer.Interface._ttyWrite (readline.js:830:14)
> jsv.tuple(jsv.nat, jsv.bool).smap(function(x) { return x; }, function(x) { return x; })
TypeError: undefined is not a function
    at Object.tuple (/home/joneshf/node_modules/jsverify/lib/arbitrary.js:74:15)
    at repl:1:5
    at REPLServer.defaultEval (repl.js:132:27)
    at bound (domain.js:254:14)
    at REPLServer.runBound [as eval] (domain.js:267:12)
    at REPLServer.<anonymous> (repl.js:279:12)
    at REPLServer.emit (events.js:107:17)
    at REPLServer.Interface._onLine (readline.js:214:10)
    at REPLServer.Interface._line (readline.js:553:8)
    at REPLServer.Interface._ttyWrite (readline.js:830:14)
> 

@phadej phadej added the bug label Jul 27, 2015

@phadej phadej closed this in 7269c5c Jul 27, 2015

@phadej

This comment has been minimized.

Show comment
Hide comment
@phadej

phadej Jul 27, 2015

Member

Fixed in 0.6.3. Could you verify your case?

Member

phadej commented Jul 27, 2015

Fixed in 0.6.3. Could you verify your case?

@joneshf

This comment has been minimized.

Show comment
Hide comment
@joneshf

joneshf Jul 27, 2015

Contributor

Looks like it works. Thanks for the quick fix!

Contributor

joneshf commented Jul 27, 2015

Looks like it works. Thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment