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 …