You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error called at Type/Solve.hs:206:15 -- thread blocked indefinitely in an MVar operation -- caused by type signature with type variable with wrapped phantom types
#2185
Open
SiriusStarr opened this issue
Apr 1, 2021
· 1 comment
Quick Summary: While trying to compile valid code with a wrapped phantom type and incomplete type signatures, compiler crashes with the following error (boilerplate parts excluded):
Compiling ...elm: You ran into a compiler bug. Here are some details for the developers:
a [rank = 2]
CallStack (from HasCallStack):
error, called at compiler/src/Type/Solve.hs:206:15 in main:Type.Solve
> thread blocked indefinitely in an MVar operation
SSCCE
moduleMainexposing (func)
type Wrapper a
=Wrapper(Internal a)type Internal a
=Internalfunc internal =let
x :Wrapper a
x =Wrapper internal
inTrue
Elm: 0.19.1
Browser: N/A
Operating System: Linux
Additional Details
This is valid code and should compile, but the compiler seems to fail to infer the type func : Internal a -> Bool.
The error does not occur if neither func nor x have type signatures
The error does not occur if both func and x have type signatures
The error does not occur if only func has a type signature
The error does not occur if x has a concrete type, e.g. x : Wrapper MyType
The text was updated successfully, but these errors were encountered:
Quick Summary: While trying to compile valid code with a wrapped phantom type and incomplete type signatures, compiler crashes with the following error (boilerplate parts excluded):
SSCCE
Additional Details
This is valid code and should compile, but the compiler seems to fail to infer the type
func : Internal a -> Bool
.func
norx
have type signaturesfunc
andx
have type signaturesfunc
has a type signaturex
has a concrete type, e.g.x : Wrapper MyType
The text was updated successfully, but these errors were encountered: