@ささき has joined the channel
ghci> pure 10 :: Monad m => m Int 10
IO でインスタンス化できる型なら大丈夫なようですね。 import SomeModule (abc = someFunc) みたいな事がしたいなって
{-# LANGUAGE PolyKinds, DataKinds #-}
{-# LANGUAGE AllowAmbiguousTypes, RankNTypes #-}
import Data.Void
hw :: forall (x :: Void). String
hw = "Hello, world!"
main :: IO ()
main = putStrLn hw
main = putStrLn "Hello, World!" の部分しか残らないみたいですね。v :: forall (x :: Void). Typeable x => Proxy x -> String v _ = "Hello World"
Typeable requires you assigning a concrete type, which is always impossible.class Functor f => Comonoidal f where counit :: f () -> () cophi :: f (a, b) -> (f a, f b)
instance Functor f => Comonoidal f where counit _ = () cophi fab = (fmap fst fab, fmap snd fab)
Comonoid と同じ、全然役に立たない。。。