Skip to content

Instantly share code, notes, and snippets.

@florence
Created April 6, 2015 15:50
Show Gist options
  • Save florence/c6870b42b4c33e3b8a6c to your computer and use it in GitHub Desktop.
Save florence/c6870b42b4c33e3b8a6c to your computer and use it in GitHub Desktop.
#lang racket
(define ns (make-base-namespace))
(namespace-attach-module (current-namespace) ''#%builtin ns)
(define args (contract (vectorof string?) (vector "a") 'pos 'neg))
(parameterize ([current-namespace ns])
(define current-args
(namespace-variable-value 'current-command-line-arguments ns))
(parameterize ([current-args args])
args))
@florence
Copy link
Author

florence commented Apr 6, 2015

Gives error:

current-command-line-arguments: contract violation
expected: (vectorof string?)
given: '#("a")

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