mirror of
https://github.com/github/semantic.git
synced 2025-01-02 04:10:29 +03:00
Move the INLINEs for inj'/prj' next to them.
This commit is contained in:
parent
b31333f637
commit
3313e12047
@ -72,14 +72,14 @@ infixr 5 :<
|
||||
data Sum (r :: [ * -> * ]) (v :: *) where
|
||||
Sum :: {-# UNPACK #-} !Int -> t v -> Sum r v
|
||||
|
||||
{-# INLINE prj' #-}
|
||||
{-# INLINE inj' #-}
|
||||
inj' :: Int -> t v -> Sum r v
|
||||
inj' = Sum
|
||||
{-# INLINE inj' #-}
|
||||
|
||||
prj' :: Int -> Sum r v -> Maybe (t v)
|
||||
prj' n (Sum n' x) | n == n' = Just (unsafeCoerce x)
|
||||
| otherwise = Nothing
|
||||
| otherwise = Nothing
|
||||
{-# INLINE prj' #-}
|
||||
|
||||
newtype P (t :: * -> *) (r :: [* -> *]) = P { unP :: Int }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user