Arya Irani
27b6cf7bcc
Rt1 branch uses Rt1 by default
2019-02-27 14:04:42 -05:00
Arya Irani
d386787558
added unison-src/tests/text-pattern.ur
2019-02-27 13:59:15 -05:00
Arya Irani
721341c20d
implemented more stuff for Rt1:
...
implemented whiteboard pattern for decompiling IR.Ref
implemented decompile for LetRec & Match & LazySlot
bugfixed Rt1.getCapturedVars for literals, etc
added Text patterns and tested this program:
foo x = case x of
"xyz" -> false
"abc" -> true
_ -> false
> foo "abc"
> foo "xyz"
> foo "hello, world"
2019-02-27 13:56:39 -05:00
Arya Irani
319c2fa48d
Merge branch 'wip/rt1' of github.com:unisonweb/unison into wip/rt1
2019-02-26 12:23:25 -05:00
Arya Irani
c58f51522a
update remote-api based on discussion
2019-02-26 12:23:18 -05:00
Arya Irani
46aa728d25
sort out SearchByNameI
2019-02-25 22:40:58 -05:00
Arya Irani
f6e0cf3d60
turned the crank on boundVarsIR and decompileIR. Everything requires IO due to Value's IORef.
2019-02-25 18:40:39 -05:00
Arya Irani
11ca19bcca
declare Effect.bind and Effect.pure builtins
2019-02-25 16:57:14 -05:00
Arya Irani
20f8cb2edd
add stubs for decompiling IR.Cont.
...
also, added External typeclass to decompile an external to a Term
2019-02-25 16:44:13 -05:00
Paul Chiusano
1217fe37f4
fixed up and doc'd underapply case
2019-02-25 15:57:36 -05:00
Arya Irani
0c24b42eff
Is "search for terms by name" supposed to return constructors? What does it do now? I think yes.
2019-02-25 13:16:55 -05:00
Arya Irani
83743df3da
overhaul search & representation of short hashes; [non-compiling]
2019-02-24 23:54:06 -05:00
Arya Irani
4606280fc1
refactoring commands & output messages
...
Moved `P.wrap` calls from InputPattern.helpText initialization to the use site; introduced `P.wrapColumn2` since a use-site `P.wrap` can't penetrate the column group.
2019-02-24 13:52:14 -05:00
Arya Irani
e872dea777
Rt1 branch uses Rt1 by default
2019-02-23 16:14:53 -05:00
Arya Irani
adf1fb6e1e
cleanup
2019-02-23 16:13:28 -05:00
Arya Irani
5750656c7f
introduce Pretty.nonEmpty, and cleaned up TodoOutput
2019-02-23 14:32:15 -05:00
Arya Irani
985f20701b
refactor DisplayDefinitions
2019-02-23 12:10:31 -05:00
Arya Irani
9da5f929df
promote Unison.Codebase.CommandLine to Unison.CommandLine
2019-02-23 11:39:20 -05:00
Arya Irani
21bdb67a13
dicing up the cli
2019-02-23 11:30:37 -05:00
Arya Irani
72a5446159
scraps of unison remote api
2019-02-22 17:01:47 -05:00
Arya Irani
9bcf84093a
improve(?) Rt1 and delete Rt0
2019-02-22 13:47:59 -05:00
Arya Irani
21e9989f24
add Symbol names to IR.Let and IR.Match for the purpose of decompiling later
2019-02-22 12:18:43 -05:00
Arya Irani
cc6f1a0bfa
formatting
2019-02-21 22:26:52 -05:00
Paul Chiusano
a75759808b
added one more level of breaking for lambdas, so we get
...
x y z ->
blah
blah2
rather than
x
y
z ->
blah
blah2
2019-02-21 17:15:10 -05:00
Paul Chiusano
aee8de62d6
Merge branch 'wip/rt1' of github.com:unisonweb/unison into wip/rt1
2019-02-21 17:05:37 -05:00
Paul Chiusano
8b4d680ea1
IR.compile now handles if
, a slight oversight
2019-02-21 17:05:32 -05:00
Runar Bjarnason
7b7cb236b8
Merge branch 'wip/rt1' of github.com:unisonweb/unison into wip/rt1
2019-02-21 16:59:08 -05:00
Runar Bjarnason
ae81574944
Add builtin types
2019-02-21 16:58:59 -05:00
Paul Chiusano
5ef2488fe9
removed Stream stuff from Scala runtime
2019-02-21 16:46:25 -05:00
Arya Irani
2a49787307
Merge branch 'wip/rt1' of github.com:unisonweb/unison into wip/rt1
2019-02-21 16:05:20 -05:00
Arya Irani
e84d83e09a
ANF.fromTerm and IR.compile didn't know how to handle matchcase RHS;
...
also, nullary data constructors need to be compiled as Leaf, not Construct.
2019-02-21 16:05:09 -05:00
Runar Bjarnason
22b6254c05
Tests now using the RT1 runtime
2019-02-21 15:31:24 -05:00
Runar Bjarnason
978fbde6cd
Not equals
2019-02-21 15:22:33 -05:00
Runar Bjarnason
45e29082bc
Deleted stream tests
2019-02-21 15:10:45 -05:00
Runar Bjarnason
3af0cb5475
RIP builtin streams
2019-02-21 15:07:56 -05:00
Runar Bjarnason
bb70620188
CamelCase all the things
2019-02-21 14:49:12 -05:00
Runar Bjarnason
a3b39c18e8
Merge branch 'wip/rt1' of github.com:unisonweb/unison into wip/rt1
2019-02-21 14:12:39 -05:00
Runar Bjarnason
ab5311e288
Builtins
2019-02-21 14:12:28 -05:00
Arya Irani
b28d45211e
preliminary debug stuff for this program:
...
type Either a b = Left a | Right b
use Either Left Right
Either.leftToOptional : Either a b -> Optional a
Either.leftToOptional e = case e of
Either.Left a -> Optional.Some a
_ -> Optional.None
2019-02-21 13:37:14 -05:00
Arya Irani
2d066f8785
restucture mk1, mk2 to avoid arity blunders
2019-02-21 08:53:42 -05:00
Arya Irani
c05130eacd
misc cleanup
2019-02-21 08:19:16 -05:00
Arya Irani
de5ddb5ca7
a crashing implementation for Vectors
...
master>
let
Ref ##Sequence.at 0 [1, 2, 3]
Pair _0 ()
typeDeps
fromList [#"2tWj,#"3RmF]
stack: []
ir: Let (Let (MakeSequence [1,2,3]) (Apply (Leaf (Lam 1 FormClosure Ref(##Sequence.at) (Leaf External:ExternalFunction))) [0,#0])) (Let (Leaf (Lam 2 FormClosure #"2tWj#0 (Construct #"2tWj 0 [#1,#0]))) (Let (Construct #"3RmF 0 []) (Apply (Leaf #1 ) [#2,#0])))
stack: []
ir: Let (MakeSequence [1,2,3]) (Apply (Leaf (Lam 1 FormClosure Ref(##Sequence.at) (Leaf External:ExternalFunction))) [0,#0])
stack: []
ir: MakeSequence [1,2,3]
stack: [[1, 2, 3]]
ir: Apply (Leaf (Lam 1 FormClosure Ref(##Sequence.at) (Leaf External:ExternalFunction))) [0,#0]
stack: [[1, 2, 3]]
ir: Leaf (Lam 1 FormClosure Ref(##Sequence.at) (Leaf External:ExternalFunction))
stack: [[1, 2, 3],0]
ir: Leaf External:ExternalFunction
unison: user error (type error)
2019-02-20 21:33:24 -05:00
Arya Irani
bbb94f535d
add Debug.watch (can remove)
2019-02-20 21:13:27 -05:00
Arya Irani
c128a91cb7
implement Sequence builtins
2019-02-20 21:12:06 -05:00
Paul Chiusano
a80a37409f
{Nat,Int}.isEven/Odd
2019-02-20 18:23:09 -05:00
Paul Chiusano
e3466361ed
added a bunch of functions on numbers
2019-02-20 18:13:10 -05:00
Arya Irani
d522cccad1
added a helper for simple binary builtins
2019-02-20 17:35:44 -05:00
Arya Irani
643bf235f0
executed Hello, World almost exclusively
2019-02-20 17:20:10 -05:00
Arya Irani
18fa5cb936
switch stack exec unison -- -haskell
to use Rt1
2019-02-20 15:45:08 -05:00
Arya Irani
5c73edd481
implemented Text.++ in Rt1
2019-02-20 15:00:07 -05:00