Skip to content

Instantly share code, notes, and snippets.

@rice10t
Created May 24, 2017 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rice10t/0ca1288ed5d2e907aaab9e2b59e2822a to your computer and use it in GitHub Desktop.
Save rice10t/0ca1288ed5d2e907aaab9e2b59e2822a to your computer and use it in GitHub Desktop.
型クラスとカインドの関係性
module Hoge (Hoge, Fuga) where
-- > :k Applicative
-- Applicative :: (* -> *) -> Constraint
-- > :k Hoge
-- Hoge :: (* -> *) -> Constraint
class (Applicative h) => Hoge h where
hoge :: h a
-- > :k Show
-- Show :: * -> Constraint
-- > :k Fuga
-- Fuga :: * -> Constraint
class (Show f) => Fuga f where
fuga :: f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment