Questions tagged «type-level-computation»

1
创建一个完全依赖的串联
关于串联的一个很好的真实事实是,如果我知道方程式中的任何两个变量: a ++ b = c 那我知道第三个。 我想在我自己的concat中抓住这个想法,所以我使用了功能依赖。 {-# Language DataKinds, GADTs, FlexibleContexts, FlexibleInstances, FunctionalDependencies, KindSignatures, PolyKinds, TypeOperators, UndecidableInstances #-} import Data.Kind (Type) class Concatable (m :: k -> Type) (as :: k) (bs :: k) (cs :: k) | as bs -> cs , as cs -> bs , …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.