Tag: haskell platform

如何阅读这个GHC核心“certificate”?

我写了这个Haskell的一小部分来弄清GHC如何certificate对于自然数,你只能减半: {-# LANGUAGE DataKinds, GADTs, KindSignatures, TypeFamilies #-} module Nat where data Nat = Z | S Nat data Parity = Even | Odd type family Flip (x :: Parity) :: Parity where Flip Even = Odd Flip Odd = Even data ParNat :: Parity -> * where PZ :: ParNat Even PS :: (x […]