MK
Size: a a a
MK
к
module Control.ApplyingVia
( (!@)
, (!!@)
) where
import Data.Coerce
(!@) :: (Coercible a' a, Coercible b' b) => (a' -> b') -> (a -> a') -> a -> b
(!@) f _ = coerce fMK
f !@ MinMK
MK
R
type Equal :: forall a b. a -> b -> Constraint
class Equal x y
instance Equal x x
type (~?~) :: forall a b. a -> b -> Constraint
class (x ~~ y => Equal x y) => x ~?~ y
instance (x ~~ y => Equal x y) => x ~?~ y
-- >>> :t defaultToInt True
-- <interactive>:1:1-17: error:
-- • Could not deduce (Equal Bool Int)
-- arising from a use of ‘defaultToInt’
-- from the context: Bool ~ Int
-- bound by a quantified context at <interactive>:1:1
-- • In the expression: defaultToInt True
defaultToInt :: a ~?~ Int => a -> a
defaultToInt = id