Skip to content

Type synonym impossible to fully apply in type application #4531

Description

@LiamGoodacre

Description

Possible kind inference funkiness going on with synonyms in type applications.

Using the same type expression in an annotation vs a type application works differently.

To Reproduce

try purescript

module Main where
import Prelude
import Type.Proxy (Proxy(..))

-- `i` will be determined when `x` is concrete
type F :: forall i . Row i -> Row i
type F x = ()

-- type checks; `i ~ Type`
y :: Proxy (F (() :: Row Type))
y = Proxy

-- fails:
--   Type synonym Main.F is partially applied.
--   Type synonyms must be applied to all of their type arguments.
z :: Proxy (F (() :: Row Type))
z = Proxy @(F (() :: Row Type))

type G = F (() :: Row Type)
-- also works
g :: Proxy G
g = Proxy @G

Expected behavior

z would also pass type checking.

PureScript version

0.15.13

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions