plutus icon indicating copy to clipboard operation
plutus copied to clipboard

Add a `MINIMAL` pragma to `Ord` and check existence of other `MINIMAL` pragmas

Open effectfully opened this issue 1 year ago • 0 comments

PlutusTx.Ord.Ord lacks a MINIMAL pragma meaning it's easy to cause an infinite loop by defining an instance of this class. We should simply take the pragma from base (where that code is stolen from):

{-# MINIMAL compare | (<=) #-}

and check existence of MINIMAL pragmas for all the other type classes where such a pragma applies.

effectfully avatar Jun 28 '24 11:06 effectfully