Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* Fix incorrect module context computation for nested functors.
([#1872](https://github.com/GaloisInc/cryptol/issues/1872))
([#1898](https://github.com/GaloisInc/cryptol/issues/1898))

* Don't consider schemas with trivial `True` constraints to be polymorphic.
([#1576](https://github.com/GaloisInc/cryptol/issues/1576))


# 3.5.0 -- 2026-01-27
Expand Down
2 changes: 1 addition & 1 deletion src/Cryptol/Symbolic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ data ProverResult = AllSatResult [SatResult] -- LAZY

predArgTypes :: QueryType -> Schema -> Either Doc [FinType]
predArgTypes qtype schema@(Forall ts ps ty)
| null ts && null ps =
| null ts && all pIsTrue ps = -- We could have `True` constraints due to module instantiations (see #1576)
case evalType mempty ty of
Left _ -> Left "Predicate needs to be of kind *"
Right tval ->
Expand Down
16 changes: 16 additions & 0 deletions tests/issues/issue1576.cry
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module issue1576 where
interface submodule I where
type Value : *
value: Value

submodule F where
import interface submodule I

eq_self : Eq Value => Bool
property eq_self = value == value

submodule P where
type Value = [16]
value = 0xe641

import submodule F { submodule P } as FP
2 changes: 2 additions & 0 deletions tests/issues/issue1576.icry
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
:load issue1576.cry
:prove FP::eq_self
4 changes: 4 additions & 0 deletions tests/issues/issue1576.icry.stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Loading module Cryptol
Loading module Cryptol
Loading module issue1576
Q.E.D.
Loading