This website requires JavaScript.
Explore
Help
Sign In
GaloisInc
/
cryptol
Watch
1
Star
1
Fork
0
You've already forked cryptol
mirror of
https://github.com/GaloisInc/cryptol.git
synced
2024-12-25 00:42:37 +03:00
Code
Issues
Projects
Releases
Wiki
Activity
1d5d5cdf2f
cryptol
/
tests
/
mono-binds
/
test06.cry
10 lines
108 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Add the mono-binds flag When `:set mono-binds=on`, any local definitions lacking type signatures will not be generalized (i.e., will be monomorphic). This reduces what is in most cases unnecessary polymorphism that can give rise to constraints that are difficult to solve. This also improves the performance of the Cryptol interpreter by lifting many polymorphic type applications out of the inner loops that are commonly defined as bindings in `where` clauses. The flag is on by default in the Cryptol REPL, and in most cases makes it possible to leave out more type signatures in `where` clauses than before. However, some programs really do rely on inferring polymorphic types for local variables; in this case adding an explicit polymorphic type signature to the local binding in question will make the program typecheck.
2014-12-16 04:48:25 +03:00
module test06 where
Update test output.
2017-09-16 02:38:03 +03:00
test : {a} (Zero a) => a -> a
Add the mono-binds flag When `:set mono-binds=on`, any local definitions lacking type signatures will not be generalized (i.e., will be monomorphic). This reduces what is in most cases unnecessary polymorphism that can give rise to constraints that are difficult to solve. This also improves the performance of the Cryptol interpreter by lifting many polymorphic type applications out of the inner loops that are commonly defined as bindings in `where` clauses. The flag is on by default in the Cryptol REPL, and in most cases makes it possible to leave out more type signatures in `where` clauses than before. However, some programs really do rely on inferring polymorphic types for local variables; in this case adding an explicit polymorphic type signature to the local binding in question will make the program typecheck.
2014-12-16 04:48:25 +03:00
test a = bar
where
foo : a
foo = zero
bar = foo
Reference in New Issue
Copy Permalink