タグ付けされた質問 「phantom-types」

2
最新のGHCバージョンには、何らかの証拠消去がありますか?
たとえば、次の小さなプログラムのように、型システムのメリットのためだけに存在するパラメーターがあるとします。 {-# LANGUAGE GADTs #-} module Main where import Data.Proxy import Data.List data MyPoly where MyConstr :: Proxy a -> a -> (Proxy a -> a -> Int -> Int) -> MyPoly listOfPolys :: [MyPoly] listOfPolys = [MyConstr Proxy 5 (const (+)) , MyConstr Proxy 10 (const (+)) , MyConstr …
弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.