king: fix warnings for contbuild

This commit is contained in:
pilfer-pandex 2021-08-30 20:12:13 -04:00
parent dcc10c170e
commit 9b1c9db773
2 changed files with 6 additions and 3 deletions

View File

@ -16,7 +16,10 @@ bound = 1_000
newtype New = New Wen newtype New = New Wen
deriving newtype (Eq, Ord) deriving newtype (Eq, Ord)
new :: Wen -> New
new = New . negate new = New . negate
wen :: New -> Wen
wen (New w) = negate w wen (New w) = negate w
-- | Given a new, find an older new corresponding to `expiry` ago. -- | Given a new, find an older new corresponding to `expiry` ago.

View File

@ -84,15 +84,15 @@ flush = Put $ \tbl s@S{..} -> do
{-# INLINE update #-} {-# INLINE update #-}
update :: (S -> S) -> Put () update :: (S -> S) -> Put ()
update f = Put $ \tbl s@S{..} -> pure (PutResult (f s) ()) update f = Put $ \tbl s@S{} -> pure (PutResult (f s) ())
{-# INLINE setRegOff #-} {-# INLINE setRegOff #-}
setRegOff :: Word -> Int -> Put () setRegOff :: Word -> Int -> Put ()
setRegOff r o = update $ \s@S{..} -> (s {reg=r, off=o}) setRegOff r o = update $ \s@S{} -> (s {reg=r, off=o})
{-# INLINE setReg #-} {-# INLINE setReg #-}
setReg :: Word -> Put () setReg :: Word -> Put ()
setReg r = update $ \s@S{..} -> (s { reg=r }) setReg r = update $ \s@S{} -> (s { reg=r })
{-# INLINE getS #-} {-# INLINE getS #-}
getS :: Put S getS :: Put S