mirror of
https://github.com/urbit/shrub.git
synced 2024-12-20 09:21:42 +03:00
king: fix warnings for contbuild
This commit is contained in:
parent
dcc10c170e
commit
9b1c9db773
@ -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.
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user