cryptol/tests/mono-binds/test04.icry.stdout
Adam C. Foltzer 3d275ea44c add load targets to search path
Fixes a bug pointed out by @weaversa:
https://github.com/GaloisInc/cryptol/issues/127#issuecomment-64464455

In addition to the other search path changes in #127, we now will add
the directory containing files to be loaded to the search path. This
applies to:

- files loaded with a command line argument, like in the original
  comment
- arguments to `:l`, so for example `:l examples/DES.cry` would work
- batch file arguments, so for example running `cryptol -b
  /some/path/bar.cry` adds `/some/path` to the search path.
2015-02-17 15:27:59 -08:00

33 lines
890 B
Plaintext

Loading module Cryptol
Loading module Cryptol
Loading module test04
module test04
import Cryptol
/* Not recursive */
test04::test : {a, b} (b >= 4, fin b) => a -> ((a, ()), (a, [b]))
test04::test = \{a, b} (b >= 4, fin b) (a : a) ->
(f () (), f [b] (demote 10 b <> <> <>))
where
/* Not recursive */
f : {c} c -> (a, c)
f = \{c} (x : c) -> (a, x)
Loading module Cryptol
Loading module test04
[warning] at ./test04.cry:1:1--5:14:
Defaulting type parameter 'bits'
of literal or demoted expression
at ./test04.cry:3:19--3:21
to 4
[error] at ./test04.cry:3:19--3:21:
Type mismatch:
Expected type: ()
Inferred type: [?k3]
where
?k3 is type parameter 'bits'
of literal or demoted expression
at ./test04.cry:3:19--3:21