generated at
PureScriptの型クラス
PureScriptの型クラス







基本的なclassとinstanceの構文
purs(hs)
class Show a where show :: a -> String instance Show String where show s = s instance (Show a) => Show (Array a) where show xs = "[" <> joinWith ", " (map show xs) <> "]"
hsと異なり、 showString のように名前を付ける必要があった
PureScript v.0.14.2から付けなくて良くなった ref


継承の <= の向きがhsと逆
purs(hs)
class (Monad m) <= MonadFail m where fail :: forall a. String -> m a
含意とみなせばいいmrsekut
class A <= B where
B が存在するならば、 A が存在する
B A を継承する
>In this particular context, the symbol should not be read as implication; infact reverse implication would be a more accurate reading, the intention beingthat every instance of Ord is also an instance of Eq .
みたいに書かれてる








Alt型クラスを継承する
emtpy ってなに?
Functor型クラスを継承する



monad