|
1 | 1 | -- Need some extra imports from the Prelude for doctests, annoyingly |
| 2 | +{-# LANGUAGE NoImplicitPrelude #-} |
2 | 3 | {-# LANGUAGE OverloadedStrings #-} |
3 | 4 | {-# OPTIONS_GHC -Wno-unused-imports #-} |
4 | 5 | {-# OPTIONS_GHC -fno-omit-interface-pragmas #-} |
@@ -116,12 +117,8 @@ import PlutusTx.Ratio as Ratio |
116 | 117 | import PlutusTx.Semigroup as Semigroup |
117 | 118 | import PlutusTx.Trace as Trace |
118 | 119 | import PlutusTx.Traversable as Traversable |
119 | | -import Prelude hiding (Applicative (..), Enum (..), Eq (..), Foldable (..), Functor (..), |
120 | | - Monoid (..), Num (..), Ord (..), Rational, Semigroup (..), Traversable (..), all, |
121 | | - and, any, concat, concatMap, const, curry, divMod, either, elem, error, filter, |
122 | | - fst, head, id, length, map, mapM_, max, maybe, min, not, notElem, null, or, |
123 | | - quotRem, reverse, round, sequence, snd, take, uncurry, zip, (!!), ($), (&&), |
124 | | - (++), (<$>), (||)) |
| 120 | +import Prelude (Integer, dropWhile, flip, otherwise, return, until, zipWith, (.), (=<<), (>>), |
| 121 | + (>>=)) |
125 | 122 |
|
126 | 123 | -- this module does lots of weird stuff deliberately |
127 | 124 | {- HLINT ignore -} |
@@ -181,6 +178,10 @@ quotient = Builtins.quotientInteger |
181 | 178 | remainder :: Integer -> Integer -> Integer |
182 | 179 | remainder = Builtins.remainderInteger |
183 | 180 |
|
| 181 | +{-# INLINABLE even #-} |
| 182 | +even :: Integer -> Bool |
| 183 | +even n = if modulo n 2 == 0 then True else False |
| 184 | + |
184 | 185 | {-# INLINABLE fst #-} |
185 | 186 | -- | Plutus Tx version of 'Data.Tuple.fst' |
186 | 187 | fst :: (a, b) -> a |
|
0 commit comments