summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/collections/rtarrays.nim1
-rw-r--r--lib/pure/future.nim10
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/pure/collections/rtarrays.nim b/lib/pure/collections/rtarrays.nim
index 7782b032c..e5d0b0d8a 100644
--- a/lib/pure/collections/rtarrays.nim
+++ b/lib/pure/collections/rtarrays.nim
@@ -21,7 +21,6 @@ type
     apart: array [ArrayPartSize, T]
   UncheckedArray* {.unchecked.}[T] = array[0..100_000_000, T]
 
-
 template usesSeqPart(x): expr = x.L > ArrayPartSize
 
 proc initRtArray*[T](len: Natural): RtArray[T] =
diff --git a/lib/pure/future.nim b/lib/pure/future.nim
index 34b76e41d..a0c1b5c2d 100644
--- a/lib/pure/future.nim
+++ b/lib/pure/future.nim
@@ -77,7 +77,17 @@ macro `=>`*(p, b: expr): expr {.immediate.} =
         identDefs.add(c)
         identDefs.add(newEmptyNode())
         identDefs.add(newEmptyNode())
+      of nnkInfix:
+        if c[0].kind == nnkIdent and c[0].ident == !"->":
+          var procTy = createProcType(c[1], c[2])
+          params[0] = procTy[0][0]
+          for i in 1 .. <procTy[0].len:
+            params.add(procTy[0][i])
+        else:
+          error("Expected proc type (->) got (" & $c[0].ident & ").")
+        break
       else:
+        echo treeRepr c
         error("Incorrect procedure parameter list.")
       params.add(identDefs)
   of nnkIdent: