Commit Graph

8 Commits

Author SHA1 Message Date
Paul Chiusano
a222a46353 fix scala tests to for new Foo.+ (vs +_Foo) syntax for qualified operators, also reduced test sizes for Sequence a bit so they don't take forever 2018-07-30 09:30:13 -04:00
Arya Irani
a91b6c81a8 no more stack allocations for Stream
`fp_s` and `fppp_s` accept a function returning `EnvTo[Foo]`.
The environment is passed to the resulting `EnvTo[Foo]` before
encoding the `Foo` as normal.
2018-07-07 17:49:59 -04:00
Arya Irani
dcbe3cc4d8 seems to have largely fixed itself in my sleep
the typedecl parser for builtins seems to work fine
fixed prettyprinting of tuples
fixed logic error in OptionalTC.isEmpty
added tuple.u and unfold.u tests
2018-07-07 13:00:39 -04:00
Arya Irani
ea3b4291b5 wip/failing attempt to implement Stream.unfold, which requires an Option type
Somehow I broke Pair, or something to do with Pair wrapped in Option?
2018-07-06 23:58:12 -04:00
Arya Irani
a4ef66e645 bugfix and tests for Stream.flatMap 2018-07-05 23:10:30 -04:00
Arya Irani
1f556f0bb1 add tests for Stream.takeWhile/dropWhile/zipWith
untested: flatMap/constant (doesnt terminate)
2018-07-05 13:22:45 -04:00
Arya Irani
510e0c07aa add Stream.sum/append 2018-07-04 22:42:20 -04:00
Arya Irani
3063e7e57f add more Stream builtins and thread env through (see more...)
added `fs_p`, `fpps_p`, etc and the `StackDecode` typeclass, which describes how
  to decode a value which needs access to a stack.

builtin function adapter helper naming convention guide:
`u` = unison unboxed
`b` = Scala Boolean as unboxed booleana
`l` = Scala Long as unboxed int64
`n` = Scala Int as unboxed uint64
`d` = Scala Double as unboxed float
`p` = "polymorphic", some generic type not known to be unboxed
`s` = "stack decode", some input parameter requiring access to the runtime stack to be decoded
`z` = laZy, a result type for which the decompiled form has to be recorded with each operation, as opposed to being derived from a Value.

`p` is used when a function accepts a an `Env => Stream` that will not be consumed
`s` is used when a function accepts a `Stream` (no `Env`) that will be consumed
`z` is used when a function returns a `Stream`

add pretty printing for `Tuple` and `Sequence`
2018-07-04 21:32:56 -04:00