Skip to content
This repository was archived by the owner on Jun 20, 2022. It is now read-only.

Commit 6d2a825

Browse files
committed
improve scheme kind show
1 parent d2392e9 commit 6d2a825

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Scheme.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module Scheme (Scheme (..), quantify, toScheme) where
33
import Adhoc (Qual ((:=>)))
44
import Data.Foldable (toList)
55
import qualified Data.Sequence as S
6-
import Types (HasKind (kind), Kind, Subst (Subst), TyVar, Typ (TGen), Types (apply, ftv), letters)
6+
import Types (HasKind (kind), Kind (KStar), Subst (Subst), TyVar, Typ (TGen), Types (apply, ftv), letters)
77

88
-- | Type schemes are used to describe qualified types.
99
-- Each TGen that appears in qt represents a generic that the kind is given
@@ -15,6 +15,7 @@ instance Show Scheme where
1515
show (Forall us q) = concat ["forall ", unwords us', ". ", show q]
1616
where
1717
showKind :: Int -> Kind -> String
18+
showKind n KStar = "'" ++ letters !! n
1819
showKind n k = concat ["('", letters !! n, " : ", show k, ")"]
1920

2021
us' :: [String]

0 commit comments

Comments
 (0)