Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Using an infix type alias in a type application crashes the compiler. #4535

Copy link
Copy link

Description

@jterbraak
Issue body actions

Description

Using an infix type alias like /\ for Tuple will crash the compiler with the following error message:

[1 of 6] Compiling Page.Processing.Variables
purs.bin: An internal error occurred during compilation: inferKind: Unimplemented case 
String Data.Tuple.Nested./\ Maybe String

Please report this at https://github.com/purescript/purescript/issues
CallStack (from HasCallStack):
  error, called at src\Language\PureScript\Crash.hs:10:3 in purescript-0.15.14-EV4SLMOi0BcgeHmFJC7Hq:Language.PureScript.Crash
  internalError, called at src\Language\PureScript\TypeChecker\Kinds.hs:242:7 in purescript-0.15.14-EV4SLMOi0BcgeHmFJC7Hq:Language.PureScript.TypeChecker.Kinds
  inferKind, called at src\Language\PureScript\TypeChecker\Kinds.hs:327:25 in purescript-0.15.14-EV4SLMOi0BcgeHmFJC7Hq:Language.PureScript.TypeChecker.Kinds
  checkKind', called at src\Language\PureScript\TypeChecker\Kinds.hs:303:13 in purescript-0.15.14-EV4SLMOi0BcgeHmFJC7Hq:Language.PureScript.TypeChecker.Kinds
  checkKind, called at src\Language\PureScript\TypeChecker\Types.hs:476:45 in purescript-0.15.14-EV4SLMOi0BcgeHmFJC7Hq:Language.PureScript.TypeChecker.Types

Using Tuple by itself works as expected.

To Reproduce

Try PS

module Main where

import Prelude

import Effect(Effect)
import Effect.Console(log)
import Data.Tuple.Nested(type(/\))

someVTA :: forall @a . String
someVTA =
  "some VTA"

main :: Effect Unit
main =
  log $ someVTA @( Int /\ Int )

Expected behavior

A successful compilation or a normal error/warning that this is not supported.

PureScript version

0.15.14 but the version on Try PS also has this bug.

Reactions are currently unavailable

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

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.