Skip to content

Commit 1100459

Browse files
Explain why forall proxy. proxy sym is used instead of Proxy sym
1 parent 9a08737 commit 1100459

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Data/Symbol.purs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ data SProxy (sym :: Symbol) = SProxy
1313

1414
-- | A class for known symbols
1515
class IsSymbol (sym :: Symbol) where
16+
-- Note: Before v0.14.0, we did not have polykinds. Thus, we needed
17+
-- kind-specific proxy types to pass a Symbol around.
18+
-- Once v0.14.0 was released, we could use the kind-generic `Proxy` type
19+
-- insteand. However, to reduce the code breakage, we're using
20+
-- `forall proxy. proxy sym` here so that `SProxy` code will still compile.
21+
-- When PureScript makes a new breaking release after the v0.14.0 release,
22+
-- this type signature will be updated to `Proxy sym -> String`.
1623
reflectSymbol :: forall proxy. proxy sym -> String
1724

1825
-- local definition for use in `reifySymbol`

0 commit comments

Comments
 (0)