星取表
●と○の2種類の記号を左から右へ並べたもの
code:Hositorihyou.hs
data AH
= AK
| AS
deriving (Eq, Show)
data CH (c :: Char) where
CK :: CH '●'
CS :: CH '○'
data HH (h :: CH c) where
HK :: HH 'CK
HS :: HH 'CS
data instance Sing (h :: AH) where
SK :: Sing AK
SS :: Sing AK
instance SingKind AK where
type Demote AH = AH
toSing = \ case
AK -> SomeSing SK
AS -> SomeSing SS
fromSing = \ case
SK -> AK
SS -> AS