aiya000
ghci> pure 10 :: Monad m => m Int 10
すごい、ghciはm Intを表示してくれるんだ
このアルファ版で2ヶ月くらいテストしたあと、RC(release candidate)を経た後に、8月くらいに8.6.1が正式リリースです。
アルファ版の段階で充分に不具合を取っておく必要があります。 不具合があれば、ghc-devsかtracへバグ報告をぜひどうぞ:slightly_smiling_face:
https://mail.haskell.org/pipermail/ghc-devs/2018-June/015970.html
https://pay.reddit.com/r/haskell/comments/8v53cb/announce_ghc_861alpha1_available/
なお、 8.6.1は、直前の駆け込みもあり盛りだくさんになっているようです。
DerivingVia、 QuantifiedConstraints、 BlockArguments、NumericUnderscores等の各拡張に、ghc-heap-view など盛りだくさん!
https://ghc.haskell.org/trac/ghc/wiki/Status/GHC-8.6.1
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
と同じ、全然役に立たない。。。