Fixup module system tests

This commit is contained in:
Iavor Diatchki 2022-06-09 14:21:19 -07:00
parent 75f19382b6
commit 7e3d65090c
22 changed files with 37 additions and 93 deletions

View File

@ -1,2 +0,0 @@
:module `T10::Main
:browse `T10::Main

View File

@ -1,8 +0,0 @@
Loading module Cryptol
Loading module Cryptol
Loading module T10::Main
Symbols
=======
f : {T} {x : T} -> T

View File

@ -1,9 +0,0 @@
module T10::Main where
parameter
type T : *
x : T
f : T
f = x

View File

@ -1 +0,0 @@
:module T11::Main

View File

@ -1,4 +0,0 @@
Loading module Cryptol
Loading module Cryptol
Loading module T11::A
Loading module T11::Main

View File

@ -1,12 +0,0 @@
module T11::A where
parameter
type X : #
type Y : #
type T = ([X],[Y])
f : T -> [X]
f (x,_) = x

View File

@ -1,9 +0,0 @@
module T11::Main where
import `T11::A as X
f : X::T 1 2 -> [1]
f = X::f

View File

@ -1,4 +1,4 @@
Loading module Cryptol
Loading module Cryptol
Loading module T12::A
Loading module T12::Main
Parse error at T12/Main.cry:4:8--4:9
Module argument may not be a functor

View File

@ -1,5 +1,7 @@
Loading module Cryptol
Loading module Cryptol
Loading module T13::B$argument
Loading interface module T13::A$interface
Loading module T13::A
Loading module T13::B
Loading module T13::Main

View File

@ -1,5 +1,7 @@
Loading module Cryptol
Loading module Cryptol
Loading module T2::Main$argument
Loading interface module T2::A$interface
Loading module T2::A
Loading module T2::Main
0x00

View File

@ -1,5 +1,11 @@
Loading module Cryptol
Loading module Cryptol
Loading interface module T3::A$interface
Loading module T3::A
Loading module T3::Main
[error] Import of a non-instantiated parameterized module: T3::A
[error] at T3/Main.cry:5:8--5:15
Value not in scope: X::main
[error] at T3/Main.cry:3:1--3:18
• Expected a module
• `T3::A` is a functor

View File

@ -1,5 +1,7 @@
Loading module Cryptol
Loading module Cryptol
Loading module T4::Main$argument
Loading interface module T4::A$interface
Loading module T4::A
Loading module T4::Main
main : [8]

View File

@ -1,7 +1,12 @@
Loading module Cryptol
Loading module Cryptol
Loading module T5::A
Loading module T5::B
Loading module T5::Main
main : [8]
0x11
Loading module T5::Main$argument
Parse error at ./T5/B.cry:4:3--4:4
Module argument may not be a functor
[error] at T5.icry:2:4--2:8
Value not in scope: main
[error] at T5.icry:3:1--3:5
Value not in scope: main

View File

@ -1,7 +1,12 @@
Loading module Cryptol
Loading module Cryptol
Loading module T5::A
Loading module T5::B
Loading module T5::Main
main : [8]
0x11
Loading module T5::Main$argument
Parse error at ./T5/B.cry:4:3--4:4
Module argument may not be a functor
[error] at T6.icry:2:4--2:8
Value not in scope: main
[error] at T6.icry:3:1--3:5
Value not in scope: main

View File

@ -1,5 +1,6 @@
Loading module Cryptol
Loading module Cryptol
Loading interface module T7::Main$interface
Loading module T7::Main
Expression depends on definitions from a parameterized module:

View File

@ -1,2 +0,0 @@
:module `T8::Main
:t f

View File

@ -1,4 +0,0 @@
Loading module Cryptol
Loading module Cryptol
Loading module T8::Main
f : {x : [8]} -> [8]

View File

@ -1,3 +0,0 @@
:module T9::Main
:t main
main

View File

@ -1,6 +0,0 @@
Loading module Cryptol
Loading module Cryptol
Loading module T9::A
Loading module T9::Main
main : [16]
0x1010

View File

@ -1,10 +0,0 @@
module T9::A where
parameter
type n : #
type constraint fin n
x : [n]
f : [n+n]
f = x # x

View File

@ -1,7 +0,0 @@
module T9::Main where
import `T9::A
main = f { x = 0x10 }

View File

@ -4,6 +4,4 @@ Loading module T010$argument
Loading module T010_S
Loading module T010_F
Loading module T010
[warning] at ./T010_F.cry:4:28--4:29
Unused name: T010_F::A::n
0x0a