Closed i-am-the-slime closed 1 year ago
java.lang.IllegalStateException: java.lang.IllegalStateException: @NotNull method com/intellij/psi/impl/PsiElementBase.notNullChild must not return null at java.base/jdk.internal.reflect.GeneratedConstructorAccessor133.newInstance(Unknown Source) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480) at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:562) at java.base/java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:591) at java.base/java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:672) at com.intellij.concurrency.JobLauncherImpl.processQueue(JobLauncherImpl.java:360) at com.intellij.codeInsight.daemon.impl.InspectionRunner.processInOrder(InspectionRunner.java:300) at com.intellij.codeInsight.daemon.impl.InspectionRunner.visitElements(InspectionRunner.java:275) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$inspect$4(InspectionRunner.java:129) at com.intellij.codeInspection.InspectionEngine.withSession(InspectionEngine.java:227) at com.intellij.codeInsight.daemon.impl.InspectionRunner.inspect(InspectionRunner.java:114) at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.collectInformationWithProgress(LocalInspectionsPass.java:115) at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:97) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:57) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:381) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1091) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:373) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:372) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:348) at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:223) at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:180) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:346) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:181) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJ
java.lang.NullPointerException at org.purescript.psi.declaration.foreign.ForeignValueDecl.getNameIdentifier(ForeignValueDecl.kt:62) at org.purescript.psi.declaration.foreign.ForeignValueDecl.getName(ForeignValueDecl.kt:64) at org.purescript.psi.module.Module$Psi.getExportedForeignValueDeclarations(Module.kt:573) at org.purescript.psi.declaration.imports.Import$importedForeignValueDeclarations$1.get(Import.kt:198) at org.purescript.psi.declaration.imports.Import.getImportedForeignValueDeclarations(Import.kt:406) at org.purescript.psi.module.Module$Psi.getExportedForeignValueDeclarations(Module.kt:194) at org.purescript.psi.declaration.imports.Import$importedForeignValueDeclarations$1.get(Import.kt:198) at org.purescript.psi.declaration.imports.Import.getImportedForeignValueDeclarations(Import.kt:406) at org.purescript.psi.module.Module$Psi.getExportedForeignValueDeclarations(Module.kt:194) at org.purescript.psi.declaration.imports.Import$importedForeignValueDeclarations$1.get(Import.kt:198) at org.purescript.psi.declaration.imports.Import.getImportedForeignValueDeclarations(Import.kt:406) at org.purescript.psi.module.Module$Psi.getExportedForeignValueDeclarations(Module.kt:194) at org.purescript.psi.declaration.imports.Import$importedForeignValueDeclarations$1.get(Import.kt:198) at org.purescript.psi.declaration.imports.Import.getImportedForeignValueDeclarations(Import.kt:406) at org.purescript.psi.expression.ExpressionIdentifierReference$candidates$1.invokeSuspend(ExpressionIdentifierReference.kt:77) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlin.sequences.SequenceBuilderIterator.hasNext(SequenceBuilder.kt:129) at org.purescript.psi.expression.ExpressionIdentifierReference.resolve(ExpressionIdentifierReference.kt:125) at org.purescript.psi.expression.ExpressionIdentifierReference.resolve(ExpressionIdentifierReference.kt:19) at com.intellij.codeInsight.TargetElementUtilBase.getReferencedElement(TargetElementUtilBase.java:177) at com.intellij.codeInsight.TargetElementUtilBase.doGetReferenceOrReferencedElement(TargetElementUtilBase.java:165) at com.intellij.codeInsight.TargetElementUtilBase.getReferenceOrReferencedElement(TargetElementUtilBase.java:210) at com.intellij.codeInsight.TargetElementUtilBase.getReferencedElement(TargetElementUtilBase.java:254) at com.intellij.codeInsight.TargetElementUtilBase.doFindTargetElement(TargetElementUtilBase.java:233) at com.intellij.codeInsight.TargetElementUtilBase.findTargetElement(TargetElementUtilBase.java:298) at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:147) at com.intellij.openapi.fileEditor.impl.text.TextEditorPsiDataProvider.getPsiElementIn(TextEditorPsiDataProvider.java:235) at com.intellij.openapi.fileEditor.impl.text.TextEditorPsiDataProvider.getSlowData(TextEditorPsiDataProvider.java:145) at com.intellij.openapi.fileEditor.impl.text.TextEditorPsiDataProvider.lambda$getData$0(TextEditorPsiDataProvider.java:72) at com.intellij.ide.impl.DataManagerImpl.getDataFromProviderInner(DataManagerImpl.java:241) at com.intellij.ide.impl.DataManagerImpl.getSlowData(DataManagerImpl.java:225) at com.intellij.ide.impl.DataManagerImpl.lambda$getDataRuleInner$6(DataManagerImpl.java:177) at com.intellij.ide.impl.DataManagerImpl.lambda$getDataRuleInner$8(DataManagerImpl.java:182) at com.intellij.ide.impl.DataManagerImpl.getDataFromRuleInner(DataManagerImpl.java:112) at com.intellij.ide.impl.DataManagerImpl.getDataFromRulesInner(DataManagerImpl.java:99) at com.intellij.ide.impl.DataManagerImpl.getDataFromProviderAndRulesInner(DataManagerImpl.java:85) at com.intellij.ide.impl.DataManagerImpl.lambda$getDataFromRuleInner$3(DataManagerImpl.java:113) at com.intellij.openapi.actionSystem.DataKey.getData(DataKey.java:68) at com.intellij.ide.impl.dataRules.NavigatableRule.getData(NavigatableRule.java:39) at com.intellij.ide.impl.DataManagerImpl.getRulesData(DataManagerImpl.java:210) at com.intellij.ide.impl.DataManagerImpl.lambda$getDataRuleInner$8(DataManagerImpl.java:183) at com.intellij.ide.impl.DataManagerImpl.getDataFromRuleInner(DataManagerImpl.java:112) at com.intellij.ide.impl.DataManagerImpl.getDataFromRulesInner(DataManagerImpl.java:99) at com.intellij.ide.impl.DataManagerImpl.getDataFromProviderAndRulesInner(DataManagerImpl.java:85) at com.intellij.ide.impl.DataManagerImpl.lambda$getDataFromRuleInner$3(DataManagerImpl.java:113) at com.intellij.openapi.actionSystem.DataKey.getData(DataKey.java:68) at com.intellij.ide.impl.dataRules.NavigatableArrayRule.getData(NavigatableArrayRule.java:23) at com.intellij.ide.impl.DataManagerImpl.getRulesData(DataManagerImpl.java:210) at com.intellij.ide.impl.DataManagerImpl.lambda$getDataRuleInner$8(DataManagerImpl.java:183) at com.intellij.ide.impl.DataManagerImpl.getDataFromRuleInner(DataManagerImpl.java:112) at com.intellij.ide.impl.DataManagerImpl.getDataFromRulesInner(DataManagerImpl.java:99) at com.intellij.ide.impl.DataManagerImpl.getDataFromRules(DataManagerImpl.java:67) at com.intellij.openapi.actionSystem.impl.PreCachedDataContext.getDataInner(PreCachedDataContext.java:224) at com.intellij.openapi.actionSystem.impl.PreCachedDataContext.getData(PreCachedDataContext.java:166) at com.intellij.openapi.actionSystem.DataContext.getData(DataContext.java:45) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$ensureSlowDataKeysPreCached$20(ActionUpdater.java:465) at com.intellij.diagnostic.telemetry.TraceKt.runWithSpan(trace.kt:74) at com.intellij.openapi.actionSystem.impl.ActionUpdater.ensureSlowDataKeysPreCached(ActionUpdater.java:460) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$callAction$6(ActionUpdater.java:201) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1091) at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:201) at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:161) at com.intellij.openapi.actionSystem.impl.ActionUpdater.updateActionReal(ActionUpdater.java:137) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$new$0(ActionUpdater.java:124) at com.intellij.openapi.actionSystem.impl.ActionUpdater.update(ActionUpdater.java:699) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:550) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$23(ActionUpdater.java:523) at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1536) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:523) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:600) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$23(ActionUpdater.java:523) at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1536) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:523) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroup(ActionUpdater.java:309) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroupAsync$14(ActionUpdater.java:377) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroupAsync$15(ActionUpdater.java:396) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1091) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$tryRunReadActionAndCancelBeforeWrite$19(ActionUpdater.java:428) at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:129) at com.intellij.openapi.actionSystem.impl.ActionUpdater.tryRunReadActionAndCancelBeforeWrite(ActionUpdater.java:424) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroupAsync$16(ActionUpdater.java:396) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173) at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:361) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroupAsync$17(ActionUpdater.java:395) at io.opentelemetry.context.Context.lambda$wrap$1(Context.java:212) at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:248) at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:28) at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:221) at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212) at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:210) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699) at java.base/java.lang.Thread.run(Thread.java:833)
java.lang.NullPointerException at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480) at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:564) at java.base/java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:591) at java.base/java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:672) at com.intellij.concurrency.JobLauncherImpl.processQueue(JobLauncherImpl.java:360) at com.intellij.codeInsight.daemon.impl.InspectionRunner.processInOrder(InspectionRunner.java:300) at com.intellij.codeInsight.daemon.impl.InspectionRunner.visitElements(InspectionRunner.java:275) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$inspect$4(InspectionRunner.java:129) at com.intellij.codeInspection.InspectionEngine.withSession(InspectionEngine.java:227) at com.intellij.codeInsight.daemon.impl.InspectionRunner.inspect(InspectionRunner.java:114) at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.collectInformationWithProgress(LocalInspectionsPass.java:115) at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:97) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:57) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:381) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1091) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:373) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:372) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:348) at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:223) at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:180) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:346) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:181) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) Caused by: java.lang.NullPointerException at org.purescript.psi.declaration.foreign.ForeignValueDecl.getNameIdentifier(ForeignValueDecl.kt:62) at org.purescript.psi.declaration.foreign.ForeignValueDecl.getName(ForeignValueDecl.kt:64) at org.purescript.psi.module.Module$Psi.getExportedForeignValueDeclarations(Module.kt:573) at org.purescript.psi.declaration.imports.Import$importedForeignValueDeclarations$1.get(Import.kt:198) at org.purescript.psi.declaration.imports.Import.getImportedForeignValueDeclarations(Import.kt:406) at org.purescript.psi.expression.ExpressionIdentifierReference$candidates$1.invokeSuspend(ExpressionIdentifierReference.kt:77) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlin.sequences.SequenceBuilderIterator.hasNext(SequenceBuilder.kt:129) at org.purescript.psi.expression.ExpressionIdentifierReference.resolve(ExpressionIdentifierReference.kt:125) at org.purescript.psi.expression.ExpressionIdentifierReference.resolve(ExpressionIdentifierReference.kt:19) at org.purescript.ide.inspections.PSUnresolvedReferenceInspection$buildVisitor$1.visitReference(PSUnresolvedReferenceInspection.kt:81) at org.purescript.ide.inspections.PSUnresolvedReferenceInspection$buildVisitor$1.visitElement(PSUnresolvedReferenceInspection.kt:39) at com.intellij.psi.impl.PsiElementBase.accept(PsiElementBase.java:273) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$9(InspectionRunner.java:324) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1091) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$10(InspectionRunner.java:332) at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:223) at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:180) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$11(InspectionRunner.java:338) at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:159) at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:151) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$12(InspectionRunner.java:301) at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:130) at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:119) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$13(InspectionRunner.java:301) at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.lambda$call$0(JobLauncherImpl.java:299) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.call(JobLauncherImpl.java:284) at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.call(JobLauncherImpl.java:272) at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1428) ... 5 more
java.lang.NullPointerException at java.base/jdk.internal.reflect.GeneratedConstructorAccessor135.newInstance(Unknown Source) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480) at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:564) at java.base/java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:591) at java.base/java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:672) at com.intellij.concurrency.JobLauncherImpl.processQueue(JobLauncherImpl.java:360) at com.intellij.codeInsight.daemon.impl.InspectionRunner.processInOrder(InspectionRunner.java:300) at com.intellij.codeInsight.daemon.impl.InspectionRunner.visitElements(InspectionRunner.java:275) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$inspect$4(InspectionRunner.java:129) at com.intellij.codeInspection.InspectionEngine.withSession(InspectionEngine.java:227) at com.intellij.codeInsight.daemon.impl.InspectionRunner.inspect(InspectionRunner.java:114) at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.collectInformationWithProgress(LocalInspectionsPass.java:115) at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:97) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:57) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:381) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1091) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:373) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:372) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:348) at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:223) at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:180) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:346) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:181) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) Caused by: java.lang.NullPointerException at org.purescript.psi.declaration.foreign.ForeignValueDecl.getNameIdentifier(ForeignValueDecl.kt:62) at org.purescript.psi.declaration.foreign.ForeignValueDecl.getName(ForeignValueDecl.kt:64) at org.purescript.psi.module.Module$Psi.getExportedForeignValueDeclarations(Module.kt:573) at org.purescript.psi.declaration.imports.Import$importedForeignValueDeclarations$1.get(Import.kt:198) at org.purescript.psi.declaration.imports.Import.getImportedForeignValueDeclarations(Import.kt:406) at org.purescript.psi.expression.ExpressionIdentifierReference$candidates$1.invokeSuspend(ExpressionIdentifierReference.kt:77) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlin.sequences.SequenceBuilderIterator.hasNext(SequenceBuilder.kt:129) at org.purescript.psi.expression.ExpressionIdentifierReference.resolve(ExpressionIdentifierReference.kt:125) at org.purescript.psi.expression.ExpressionIdentifierReference.resolve(ExpressionIdentifierReference.kt:19) at org.purescript.ide.inspections.PSUnresolvedReferenceInspection$buildVisitor$1.visitReference(PSUnresolvedReferenceInspection.kt:81) at org.purescript.ide.inspections.PSUnresolvedReferenceInspection$buildVisitor$1.visitElement(PSUnresolvedReferenceInspection.kt:39) at com.intellij.psi.impl.PsiElementBase.accept(PsiElementBase.java:273) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$9(InspectionRunner.java:324) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1091) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$10(InspectionRunner.java:332) at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:223) at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:180) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$11(InspectionRunner.java:338) at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:159) at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:151) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$12(InspectionRunner.java:301) at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:130) at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:119) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$13(InspectionRunner.java:301) at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.lambda$call$0(JobLauncherImpl.java:299) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.call(JobLauncherImpl.java:284) at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.call(JobLauncherImpl.java:272) at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1428) ... 5 more
java.lang.Throwable: apply = Proxy parent=module Control.Apply ( class Apply , apply , (<>) , applyFirst , (<) , applySecond , (*>) , lift2 , lift3 , lift4 , lift5 , module Data.Functor ) where
import Data.Functor (class Functor, map, void, ($>), (<#>), (<$), (<$>)) import Data.Function (const) import Control.Category (identity) import Type.Proxy (Proxy(..))
-- | The Apply class provides the (<*>) which is used to apply a function
-- |
to an argument under a type constructor. |
---|---|---|
-- | Apply can be used to lift functions of two or more arguments to work on |
|
-- | values wrapped with the type constructor f . It might also be understood |
|
-- | in terms of the lift2 function: |
|
-- | ||
-- | ```purescript | |
-- | lift2 :: forall f a b c. Apply f => (a -> b -> c) -> f a -> f b -> f c | |
-- | lift2 f a b = f <$> a <*> b | |
-- | ``` | |
-- | ||
-- | (<*>) is recovered from lift2 as lift2 ($) . That is, (<*>) lifts |
|
-- | the function application operator ($) to arguments wrapped with the |
|
-- | type constructor f . |
|
-- | ||
-- | Put differently... | |
-- | ``` | |
-- | foo = | |
-- | functionTakingNArguments <$> computationProducingArg1 | |
-- | <*> computationProducingArg2 | |
-- | <*> ... | |
-- | <*> computationProducingArgN | |
-- | ``` | |
-- | ||
-- | Instances must satisfy the following law in addition to the Functor |
|
-- | laws: | |
-- | ||
-- | - Associative composition: (<<<) <$> f <*> g <*> h = f <*> (g <*> h) |
|
-- | ||
-- | Formally, Apply represents a strong lax semi-monoidal endofunctor. |
class Functor f <= Apply f where apply :: forall a b. f (a -> b) -> f a -> f b
infixl 4 apply as <*>
instance applyFn :: Apply ((->) r) where apply f g x = f x (g x)
instance applyArray :: Apply Array where apply = arrayApply
foreign import arrayApply :: forall a b. Array (a -> b) -> Array a -> Array b
instance applyProxy :: Apply Proxy where apply = Proxy
-- | Combine two effectful actions, keeping only the result of the first. applyFirst :: forall a b f. Apply f => f a -> f b -> f a applyFirst a b = const <$> a <*> b
infixl 4 applyFirst as <*
-- | Combine two effectful actions, keeping only the result of the second. applySecond :: forall a b f. Apply f => f a -> f b -> f b applySecond a b = const identity <$> a <*> b
infixl 4 applySecond as *>
-- | Lift a function of two arguments to a function which accepts and returns -- | values wrapped with the type constructor f . |
---|---|---|
-- | ```purescript | |
-- | lift2 add (Just 1) (Just 2) == Just 3 | |
-- | lift2 add Nothing (Just 2) == Nothing | |
-- | ``` | |
-- |
lift2 :: forall a b c f. Apply f => (a -> b -> c) -> f a -> f b -> f c lift2 f a b = f <$> a <*> b
-- | Lift a function of three arguments to a function which accepts and returns
-- | values wrapped with the type constructor f
.
lift3 :: forall a b c d f. Apply f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
lift3 f a b c = f <$> a <> b <> c
-- | Lift a function of four arguments to a function which accepts and returns
-- | values wrapped with the type constructor f
.
lift4 :: forall a b c d e f. Apply f => (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e
lift4 f a b c d = f <$> a <> b <> c <*> d
-- | Lift a function of five arguments to a function which accepts and returns
-- | values wrapped with the type constructor f
.
lift5 :: forall a b c d e f g. Apply f => (a -> b -> c -> d -> e -> g) -> f a -> f b -> f c -> f d -> f e -> f g
lift5 f a b c d e = f <$> a <> b <> c <> d <> e
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202)
at com.intellij.psi.impl.PsiElementBase.notNullChild(PsiElementBase.java:284)
at com.intellij.psi.impl.PsiElementBase.findNotNullChildByClass(PsiElementBase.java:307)
at org.purescript.psi.declaration.fixity.FixityDeclaration.getOperatorName(FixityDeclaration.kt:71)
at org.purescript.psi.declaration.fixity.FixityDeclaration.getName(FixityDeclaration.kt:79)
at org.purescript.psi.declaration.imports.Import.getImportedFixityDeclarations(Import.kt:706)
at org.purescript.psi.module.Module$Psi.getExportedFixityDeclarations(Module.kt:132)
at org.purescript.psi.declaration.imports.Import$importedFixityDeclarations$1.get(Import.kt:355)
at org.purescript.psi.declaration.imports.Import.getImportedFixityDeclarations(Import.kt:683)
at org.purescript.psi.module.Module$Psi.getExportedFixityDeclarations(Module.kt:132)
at org.purescript.psi.declaration.imports.Import$importedFixityDeclarations$1.get(Import.kt:355)
at org.purescript.psi.declaration.imports.Import.getImportedFixityDeclarations(Import.kt:683)
at org.purescript.psi.module.Module$Psi.getExportedFixityDeclarations(Module.kt:132)
at org.purescript.psi.declaration.imports.Import$importedFixityDeclarations$1.get(Import.kt:355)
at org.purescript.psi.declaration.imports.Import.getImportedFixityDeclarations(Import.kt:683)
at org.purescript.psi.module.Module$Psi.getExportedFixityDeclarations(Module.kt:132)
at org.purescript.psi.declaration.imports.Import$importedFixityDeclarations$1.get(Import.kt:355)
at org.purescript.psi.declaration.imports.Import.getImportedFixityDeclarations(Import.kt:683)
at org.purescript.psi.expression.ExpressionSymbolReference$candidates$1.invokeSuspend(ExpressionSymbolReference.kt:35)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlin.sequences.SequenceBuilderIterator.hasNext(SequenceBuilder.kt:129)
at org.purescript.psi.expression.ExpressionSymbolReference.resolve(ExpressionSymbolReference.kt:60)
at org.purescript.ide.inspections.PSUnresolvedReferenceInspection$buildVisitor$1.visitReference(PSUnresolvedReferenceInspection.kt:81)
at org.purescript.ide.inspections.PSUnresolvedReferenceInspection$buildVisitor$1.visitElement(PSUnresolvedReferenceInspection.kt:41)
at com.intellij.psi.impl.PsiElementBase.accept(PsiElementBase.java:273)
at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$9(InspectionRunner.java:324)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1091)
at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$10(InspectionRunner.java:332)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:223)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:180)
at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$11(InspectionRunner.java:338)
at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:159)
at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:151)
at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$12(InspectionRunner.java:301)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:130)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:119)
at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$13(InspectionRunner.java:301)
at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.lambda$call$0(JobLauncherImpl.java:299)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.call(JobLauncherImpl.java:284)
at com.intellij.concurrency.JobLauncherImpl.processQueue(JobLauncherImpl.java:352)
at com.intellij.codeInsight.daemon.impl.InspectionRunner.processInOrder(InspectionRunner.java:300)
at com.intellij.codeInsight.daemon.impl.InspectionRunner.visitElements(InspectionRunner.java:275)
at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$inspect$4(InspectionRunner.java:129)
at com.intellij.codeInspection.InspectionEngine.withSession(InspectionEngine.java:227)
at com.intellij.codeInsight.daemon.impl.InspectionRunner.inspect(InspectionRunner.java:114)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.collectInformationWithProgress(LocalInspectionsPass.java:115)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:97)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:57)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:381)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1091)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:373)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:372)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:348)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:223)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:180)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:346)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:181)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
java.lang.NullPointerException at org.purescript.psi.declaration.foreign.ForeignValueDecl.getNameIdentifier(ForeignValueDecl.kt:62) at org.purescript.psi.declaration.foreign.ForeignValueDecl.getName(ForeignValueDecl.kt:64) at org.purescript.psi.module.Module$Psi.getExportedForeignValueDeclarations(Module.kt:573) at org.purescript.psi.declaration.imports.Import$importedForeignValueDeclarations$1.get(Import.kt:198) at org.purescript.psi.declaration.imports.Import.getImportedForeignValueDeclarations(Import.kt:406) at org.purescript.psi.module.Module$Psi.getExportedForeignValueDeclarations(Module.kt:194) at org.purescript.psi.declaration.imports.Import$importedForeignValueDeclarations$1.get(Import.kt:198) at org.purescript.psi.declaration.imports.Import.getImportedForeignValueDeclarations(Import.kt:406) at org.purescript.psi.module.Module$Psi.getExportedForeignValueDeclarations(Module.kt:194) at org.purescript.psi.declaration.imports.Import$importedForeignValueDeclarations$1.get(Import.kt:198) at org.purescript.psi.declaration.imports.Import.getImportedForeignValueDeclarations(Import.kt:406) at org.purescript.psi.module.Module$Psi.getExportedForeignValueDeclarations(Module.kt:194) at org.purescript.psi.declaration.imports.Import$importedForeignValueDeclarations$1.get(Import.kt:198) at org.purescript.psi.declaration.imports.Import.getImportedForeignValueDeclarations(Import.kt:406) at org.purescript.psi.expression.ExpressionIdentifierReference$candidates$1.invokeSuspend(ExpressionIdentifierReference.kt:77) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlin.sequences.SequenceBuilderIterator.hasNext(SequenceBuilder.kt:129) at org.purescript.psi.expression.ExpressionIdentifierReference.resolve(ExpressionIdentifierReference.kt:125) at org.purescript.psi.expression.ExpressionIdentifierReference.resolve(ExpressionIdentifierReference.kt:19) at org.purescript.ide.inspections.PSUnresolvedReferenceInspection$buildVisitor$1.visitReference(PSUnresolvedReferenceInspection.kt:81) at org.purescript.ide.inspections.PSUnresolvedReferenceInspection$buildVisitor$1.visitElement(PSUnresolvedReferenceInspection.kt:39) at com.intellij.psi.impl.PsiElementBase.accept(PsiElementBase.java:273) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$9(InspectionRunner.java:324) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1091) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$10(InspectionRunner.java:332) at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:223) at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:180) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$11(InspectionRunner.java:338) at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:159) at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:151) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$12(InspectionRunner.java:301) at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:130) at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:119) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$13(InspectionRunner.java:301) at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.lambda$call$0(JobLauncherImpl.java:299) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.call(JobLauncherImpl.java:284) at com.intellij.concurrency.JobLauncherImpl.processQueue(JobLauncherImpl.java:352) at com.intellij.codeInsight.daemon.impl.InspectionRunner.processInOrder(InspectionRunner.java:300) at com.intellij.codeInsight.daemon.impl.InspectionRunner.visitElements(InspectionRunner.java:275) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$inspect$4(InspectionRunner.java:129) at com.intellij.codeInspection.InspectionEngine.withSession(InspectionEngine.java:227) at com.intellij.codeInsight.daemon.impl.InspectionRunner.inspect(InspectionRunner.java:114) at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.collectInformationWithProgress(LocalInspectionsPass.java:115) at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:97) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:57) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:381) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1091) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:373) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:372) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:348) at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:223) at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:180) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:346) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:181) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
java.lang.Throwable: unsafeReactComponent :: forall hooks props. Lacks "key" props => Lacks "ref" props => String -> ({ | props } -> Render Unit hooks JSX) -> Effect (ReactComponent { | props }) unsafeReactComponent name renderFn = let c = unsafeReactFunctionComponent ( mkEffectFn1 ( \props -> unsafeDiscardRenderEffects (renderFn props) ) ) in runEffectFn2 unsafeSetDisplayName name c parent=module React.Basic.Hooks ( Component , component , reactComponent , reactComponentWithChildren , reactComponentFromHook , ReactChildren , reactChildrenToArray , reactChildrenFromArray , memo , memo' , useState , useState' , UseState , useEffect , useEffectOnce , useEffectAlways , UseEffect , useLayoutEffect , useLayoutEffectOnce , useLayoutEffectAlways , UseLayoutEffect , useInsertionEffect , useInsertionEffectOnce , useInsertionEffectAlways , UseInsertionEffect , Reducer , mkReducer , runReducer , useReducer , UseReducer , readRef , readRefMaybe , writeRef , useRef , UseRef , useContext , UseContext , useEqCache , UseEqCache , useMemo , UseMemo , useDebugValue , UseDebugValue , useId , UseId , useTransition , UseTransition , useDeferredValue , UseDeferredValue , useSyncExternalStore , useSyncExternalStore' , UseSyncExternalStore , UnsafeReference(..) , displayName , module React.Basic.Hooks.Internal , module React.Basic , module Data.Tuple.Nested ) where
import Prelude hiding (bind, discard)
import Data.Bifunctor (rmap) import Data.Function.Uncurried (Fn2, mkFn2, runFn2) import Data.Maybe (Maybe) import Data.Newtype (class Newtype) import Data.Nullable (Nullable, toMaybe) import Data.Tuple (Tuple(..)) import Data.Tuple.Nested (type (/), (/)) import Effect (Effect) import Effect.Uncurried (EffectFn1, EffectFn2, EffectFn3, mkEffectFn1, runEffectFn1, runEffectFn2, runEffectFn3) import Prelude (bind) as Prelude import Prim.Row (class Lacks) import React.Basic (JSX, ReactComponent, ReactContext, Ref, consumer, contextConsumer, contextProvider, createContext, element, elementKeyed, empty, keyed, fragment, provider) import React.Basic.Hooks.Internal (Hook, HookApply, Pure, Render, bind, discard, coerceHook, unsafeHook, unsafeRenderEffect, type (&)) import Unsafe.Coerce (unsafeCoerce) import Unsafe.Reference (unsafeRefEq)
--| A simple type alias to clean up component definitions. type Component props = Effect (props -> JSX)
--| Create a component function given a display name and render function. --| Creating components is effectful because React uses the function --| instance as the component's "identity" or "type". Components should --| be created during a bootstrap phase and not within component --| lifecycles or render functions. component :: forall hooks props. String -> (props -> Render Unit hooks JSX) -> Component props component name renderFn = Prelude.do c <- reactComponent name (renderFn <<< .nested) pure (element c <<< { nested: })
--| Create a React component given a display name and render function.
--| Creating components is effectful because React uses the function
--| instance as the component's "identity" or "type". Components should
--| be created during a bootstrap phase and not within component
--| lifecycles or render functions. See componentWithChildren
if
--| you need to use the children
prop.
reactComponent ::
forall hooks props.
Lacks "children" props =>
Lacks "key" props =>
Lacks "ref" props =>
String ->
({ | props } -> Render Unit hooks JSX) ->
Effect (ReactComponent { | props })
reactComponent = unsafeReactComponent
--| Create a React component given a display name and render function.
--| This is the same as component
but allows the use of the children
--| prop.
reactComponentWithChildren ::
forall hooks props children.
Lacks "key" props =>
Lacks "ref" props =>
String ->
({ children :: ReactChildren children | props } -> Render Unit hooks JSX) ->
Effect (ReactComponent { children :: ReactChildren children | props })
reactComponentWithChildren = unsafeReactComponent
-- | Convert a hook to a render-prop component. The value returned from the -- | hook will be passed to the render prop, a function from that value
-- |
to JSX . |
---|---|---|---|
-- | This function is useful for consuming a hook within a non-hook component. |
reactComponentFromHook :: forall hooks props r. Lacks "children" props => Lacks "key" props => Lacks "ref" props => String -> ({ render :: r -> JSX | props } -> Hook hooks r) -> Effect (ReactComponent { render :: r -> JSX | props }) reactComponentFromHook name propsToHook = do reactComponent name \props -> map props.render $ propsToHook props
unsafeReactComponent :: forall hooks props. Lacks "key" props => Lacks "ref" props => String -> ({ | props } -> Render Unit hooks JSX) -> Effect (ReactComponent { | props }) unsafeReactComponent name renderFn = let c = unsafeReactFunctionComponent ( mkEffectFn1 ( \props -> unsafeDiscardRenderEffects (renderFn props) ) ) in runEffectFn2 unsafeSetDisplayName name c
unsafeDiscardRenderEffects :: forall x y a. Render x y a -> Effect a unsafeDiscardRenderEffects = unsafeCoerce
unsafeReactFunctionComponent :: forall props. EffectFn1 props JSX -> ReactComponent props unsafeReactFunctionComponent = unsafeCoerce
data ReactChildren :: forall k. k -> Type data ReactChildren a
foreign import reactChildrenToArray :: forall a. ReactChildren a -> Array a
reactChildrenFromArray :: forall a. Array a -> ReactChildren a reactChildrenFromArray = unsafeCoerce
--| Prevents a component from re-rendering if its new props are referentially
--| equal to its old props (not value-based equality -- this is due to the
--| underlying React implementation).
--| Prefer memo'
for more PureScript-friendldy behavior.
memo ::
forall props.
Effect (ReactComponent props) ->
Effect (ReactComponent props)
memo = flip Prelude.bind (runEffectFn1 memo_)
-- | Similar to memo but takes a function to compare previous and new props.
-- |
For example: |
---|---|---|
-- | ```purs | |
-- | mkMyComponent :: Effect (ReactComponent { id :: Int }) | |
-- | mkMyComponent = | |
-- | memo' eq do | |
-- | reactComponent "MyComponent" { id } -> React.do | |
-- | ... | |
-- | ``` |
memo' :: forall props. (props -> props -> Boolean) -> Effect (ReactComponent props) -> Effect (ReactComponent props) memo' arePropsEqual comp = Prelude.do c <- comp runEffectFn2 memoEq_ c (mkFn2 arePropsEqual)
useState :: forall state. state -> Hook (UseState state) (state /\ ((state -> state) -> Effect Unit)) useState initialState = unsafeHook do runEffectFn2 useState_ (mkFn2 Tuple) initialState
useState' :: forall state. state -> Hook (UseState state) (state /\ (state -> Effect Unit)) useState' initialState = useState initialState <#> rmap (_ <<< const)
foreign import data UseState :: Type -> Type -> Type
-- | Runs the given effect when the component is mounted and any time the given -- | dependencies change. The effect should return its cleanup function. For -- | example, if the effect registers a global event listener, it should return -- | an Effect which removes the listener. |
---|---|---|---|---|
-- | ```purs | |||
-- | useEffect deps do | |||
-- | timeoutId <- setTimeout 1000 (logShow deps) | |||
-- | pure (clearTimeout timeoutId) | |||
-- | ``` | |||
-- | ||||
-- | If no cleanup is needed, use pure (pure unit) or pure mempty to return |
|||
-- | a no-op Effect | |||
-- | ||||
-- | ```purs | |||
-- | useEffect deps do | |||
-- | logShow deps | |||
-- | pure mempty | |||
-- | ``` |
useEffect :: forall deps. Eq deps => deps -> Effect (Effect Unit) -> Hook (UseEffect deps) Unit useEffect deps effect = unsafeHook do runEffectFn3 useEffect_ (mkFn2 eq) deps effect
--| Like useEffect
, but the effect is only performed a single time per component
--| instance. Prefer useEffect
with a proper dependency list whenever possible!
useEffectOnce :: Effect (Effect Unit) -> Hook (UseEffect Unit) Unit
useEffectOnce effect = unsafeHook (runEffectFn3 useEffect (mkFn2 _ -> true) unit effect)
--| Like useEffect
, but the effect is performed on every render. Prefer useEffect
--| with a proper dependency list whenever possible!
useEffectAlways :: Effect (Effect Unit) -> Hook (UseEffect Unit) Unit
useEffectAlways effect = unsafeHook (runEffectFn1 useEffectAlways_ effect)
foreign import data UseEffect :: Type -> Type -> Type
--| Like useEffect
, but the effect is performed synchronously after the browser has
--| calculated layout. Useful for reading properties from the DOM that are not available
--| before layout, such as element sizes and positions. Prefer useEffect
whenever
--| possible to avoid blocking browser painting.
useLayoutEffect ::
forall deps.
Eq deps =>
deps ->
Effect (Effect Unit) ->
Hook (UseLayoutEffect deps) Unit
useLayoutEffect deps effect = unsafeHook (runEffectFn3 useLayoutEffect_ (mkFn2 eq) deps effect)
--| Like useLayoutEffect
, but the effect is only performed a single time per component
--| instance. Prefer useLayoutEffect
with a proper dependency list whenever possible!
useLayoutEffectOnce :: Effect (Effect Unit) -> Hook (UseLayoutEffect Unit) Unit
useLayoutEffectOnce effect = unsafeHook (runEffectFn3 useLayoutEffect (mkFn2 _ -> true) unit effect)
--| Like useLayoutEffect
, but the effect is performed on every render. Prefer useLayoutEffect
--| with a proper dependency list whenever possible!
useLayoutEffectAlways :: Effect (Effect Unit) -> Hook (UseLayoutEffect Unit) Unit
useLayoutEffectAlways effect = unsafeHook (runEffectFn1 useLayoutEffectAlways_ effect)
foreign import data UseLayoutEffect :: Type -> Type -> Type
useInsertionEffect :: forall deps. Eq deps => deps -> Effect (Effect Unit) -> Hook (UseInsertionEffect deps) Unit useInsertionEffect deps effect = unsafeHook (runEffectFn3 useInsertionEffect_ (mkFn2 eq) deps effect)
--| Like useInsertionEffect
, but the effect is only performed a single time per component
--| instance. Prefer useInsertionEffect
with a proper dependency list whenever possible!
useInsertionEffectOnce :: Effect (Effect Unit) -> Hook (UseInsertionEffect Unit) Unit
useInsertionEffectOnce effect = unsafeHook (runEffectFn3 useInsertionEffect (mkFn2 _ -> true) unit effect)
--| Like useInsertionEffect
, but the effect is performed on every render. Prefer useInsertionEffect
--| with a proper dependency list whenever possible!
useInsertionEffectAlways :: Effect (Effect Unit) -> Hook (UseInsertionEffect Unit) Unit
useInsertionEffectAlways effect = unsafeHook (runEffectFn1 useInsertionEffectAlways_ effect)
foreign import data UseInsertionEffect :: Type -> Type -> Type
newtype Reducer state action = Reducer (Fn2 state action state)
--| Creating reducer functions for React is effectful because --| React uses the function instance's reference to optimize --| rendering behavior. mkReducer :: forall state action. (state -> action -> state) -> Effect (Reducer state action) mkReducer = pure <<< Reducer <<< mkFn2
--| Run a wrapped Reducer
function as a normal function (like runFn2
).
--| Useful for testing, simulating actions, or building more complicated
--| hooks on top of useReducer
runReducer :: forall state action. Reducer state action -> state -> action -> state
runReducer (Reducer reducer) = runFn2 reducer
--| Use mkReducer
to construct a reducer function.
useReducer ::
forall state action.
state ->
Reducer state action ->
Hook (UseReducer state action) (state /\ (action -> Effect Unit))
useReducer initialState (Reducer reducer) =
unsafeHook do
runEffectFn3 useReducer_
(mkFn2 Tuple)
reducer
initialState
foreign import data UseReducer :: Type -> Type -> Type -> Type
useRef :: forall a. a -> Hook (UseRef a) (Ref a) useRef initialValue = unsafeHook do runEffectFn1 useRef_ initialValue
readRef :: forall a. Ref a -> Effect a readRef = runEffectFn1 readRef_
readRefMaybe :: forall a. Ref (Nullable a) -> Effect (Maybe a) readRefMaybe a = map toMaybe (readRef a)
writeRef :: forall a. Ref a -> a -> Effect Unit writeRef = runEffectFn2 writeRef_
foreign import data UseRef :: Type -> Type -> Type
useContext :: forall a. ReactContext a -> Hook (UseContext a) a useContext context = unsafeHook (runEffectFn1 useContext_ context)
foreign import data UseContext :: Type -> Type -> Type
-- | Cache an instance of a value, replacing it when eq returns false . |
---|---|
-- | This is a low-level performance optimization tool. It can be useful |
-- | for optimizing a component's props for use with memo , where |
-- | JavaScript instance equality matters. |
useEqCache :: forall a. Eq a => a -> Hook (UseEqCache a) a useEqCache a = unsafeHook do runEffectFn2 useEqCache_ (mkFn2 eq) a
foreign import data UseEqCache :: Type -> Type -> Type
--| Lazily compute a value. The result is cached until the deps
change.
useMemo ::
forall deps a.
Eq deps =>
deps ->
(Unit -> a) ->
Hook (UseMemo deps a) a
useMemo deps computeA =
unsafeHook do
runEffectFn3 useMemo_ (mkFn2 eq) deps computeA
foreign import data UseMemo :: Type -> Type -> Type -> Type
--| Use this hook to display a label for custom hooks in React DevTools useDebugValue :: forall a. a -> (a -> String) -> Hook (UseDebugValue a) Unit useDebugValue debugValue display = unsafeHook (runEffectFn2 useDebugValue_ debugValue display)
foreign import data UseDebugValue :: Type -> Type -> Type
foreign import data UseId :: Type -> Type useId :: Hook UseId String useId = unsafeHook useId_
foreign import data UseTransition :: Type -> Type useTransition :: Hook UseTransition (Boolean /\ ((Effect Unit) -> Effect Unit)) useTransition = unsafeHook $ runEffectFn1 useTransition_ (mkFn2 Tuple)
foreign import data UseDeferredValue :: Type -> Type -> Type useDeferredValue :: forall a. a -> Hook (UseDeferredValue a) a useDeferredValue a = unsafeHook $ runEffectFn1 useDeferredValue_ a
foreign import data UseSyncExternalStore :: Type -> Type -> Type useSyncExternalStore :: forall a. ((Effect Unit) -> Effect (Effect Unit)) -> (Effect a) -> (Effect a) -> Hook (UseSyncExternalStore a) a useSyncExternalStore subscribe getSnapshot getServerSnapshot = unsafeHook $ runEffectFn3 useSyncExternalStore3 (mkEffectFn1 subscribe) getSnapshot getServerSnapshot useSyncExternalStore' :: forall a. ((Effect Unit) -> Effect (Effect Unit)) -> (Effect a) -> Hook (UseSyncExternalStore a) a useSyncExternalStore' subscribe getSnapshot = unsafeHook $ runEffectFn2 useSyncExternalStore2 (mkEffectFn1 subscribe) getSnapshot
newtype UnsafeReference a = UnsafeReference a
derive instance newtypeUnsafeReference :: Newtype (UnsafeReference a) _
instance eqUnsafeReference :: Eq (UnsafeReference a) where eq = unsafeRefEq
-- | Retrieve the Display Name from a ReactComponent . Useful for debugging and improving
-- |
error messages in logs. |
---|---|---|
-- | See also: component |
foreign import displayName :: forall props. ReactComponent props -> String
-- | -- | Internal utility or FFI functions |
---|
foreign import memo_ :: forall props. EffectFn1 (ReactComponent props) (ReactComponent props)
foreign import memoEq_ :: forall props. EffectFn2 (ReactComponent props) (Fn2 props props Boolean) (ReactComponent props)
foreign import unsafeSetDisplayName :: forall props. EffectFn2 String (ReactComponent props) (ReactComponent props)
foreign import useState_ :: forall state. EffectFn2 (forall a b. Fn2 a b (a /\ b)) state (state /\ ((state -> state) -> Effect Unit))
foreign import useEffect_ :: forall deps. EffectFn3 (Fn2 deps deps Boolean) deps (Effect (Effect Unit)) Unit
foreign import useEffectAlways_ :: EffectFn1 (Effect (Effect Unit)) Unit
foreign import useLayoutEffect_ :: forall deps. EffectFn3 (Fn2 deps deps Boolean) deps (Effect (Effect Unit)) Unit
foreign import useLayoutEffectAlways_ :: EffectFn1 (Effect (Effect Unit)) Unit
foreign import useInsertionEffect_ :: forall deps. EffectFn3 (Fn2 deps deps Boolean) deps (Effect (Effect Unit)) Unit
foreign import useInsertionEffectAlways_ :: EffectFn1 (Effect (Effect Unit)) Unit
foreign import useReducer_ :: forall state action. EffectFn3 (forall a b. Fn2 a b (a /\ b)) (Fn2 state action state) state (state /\ (action -> Effect Unit))
foreign import readRef_ :: forall a. EffectFn1 (Ref a) a
foreign import writeRef_ :: forall a. EffectFn2 (Ref a) a Unit
foreign import useRef_ :: forall a. EffectFn1 a (Ref a)
foreign import useContext_ :: forall a. EffectFn1 (ReactContext a) a
foreign import useEqCache_ :: forall a. EffectFn2 (Fn2 a a Boolean) a a
foreign import useMemo_ :: forall deps a. EffectFn3 (Fn2 deps deps Boolean) deps (Unit -> a) a
foreign import useDebugValue_ :: forall a. EffectFn2 a (a -> String) Unit
foreign import useId_ :: Effect String
foreign import useTransition_ :: forall a b. EffectFn1 (Fn2 a b (a /\ b)) (Boolean /\ ((Effect Unit) -> Effect Unit))
foreign import useDeferredValue_ :: forall a. EffectFn1 a a
foreign import useSyncExternalStore2_ :: forall a. EffectFn2 (EffectFn1 (Effect Unit) (Effect Unit)) -- subscribe (Effect a) -- getSnapshot a
foreign import useSyncExternalStore3_ :: forall a. EffectFn3 (EffectFn1 (Effect Unit) (Effect Unit)) -- subscribe (Effect a) -- getSnapshot (Effect a) -- getServerSnapshot a at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202) at com.intellij.psi.impl.PsiElementBase.notNullChild(PsiElementBase.java:284) at com.intellij.psi.impl.PsiElementBase.findNotNullChildByClass(PsiElementBase.java:307) at org.purescript.psi.declaration.data.DataDeclaration$Psi.getIdentifier$Purescript(DataDeclaration.kt:48) at org.purescript.psi.declaration.data.DataDeclaration$Psi.getNameIdentifier(DataDeclaration.kt:69) at org.purescript.psi.declaration.data.DataDeclaration$Psi.getName(DataDeclaration.kt:71) at org.purescript.psi.exports.ExportedDataReference.resolve(ExportedDataReference.kt:17) at org.purescript.psi.exports.ExportedData$Psi.getNewTypeDeclaration(ExportedItem.kt:41) at org.purescript.psi.module.Module$Psi.getExportedNewTypeConstructors(Module.kt:228) at org.purescript.psi.declaration.imports.Import.getImportedNewTypeConstructors(Import.kt:224) at org.purescript.psi.module.Module$Psi.getExportedNewTypeConstructors(Module.kt:238) at org.purescript.psi.declaration.imports.Import.getImportedNewTypeConstructors(Import.kt:224) at org.purescript.psi.expression.ConstructorReference$candidates$1.invokeSuspend(ConstructorReference.kt:44) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlin.sequences.SequenceBuilderIterator.hasNext(SequenceBuilder.kt:129) at org.purescript.psi.expression.ConstructorReference.resolve(ConstructorReference.kt:92) at org.purescript.psi.expression.ConstructorReference.resolve(ConstructorReference.kt:16) at com.intellij.codeInsight.TargetElementUtilBase.getReferencedElement(TargetElementUtilBase.java:177) at com.intellij.codeInsight.TargetElementUtilBase.doGetReferenceOrReferencedElement(TargetElementUtilBase.java:165) at com.intellij.codeInsight.TargetElementUtilBase.getReferenceOrReferencedElement(TargetElementUtilBase.java:210) at com.intellij.codeInsight.TargetElementUtilBase.getReferencedElement(TargetElementUtilBase.java:254) at com.intellij.codeInsight.TargetElementUtilBase.doFindTargetElement(TargetElementUtilBase.java:233) at com.intellij.codeInsight.TargetElementUtilBase.findTargetElement(TargetElementUtilBase.java:298) at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:147) at com.intellij.model.psi.impl.TargetsKt.fromTargetEvaluator(targets.kt:175) at com.intellij.model.psi.impl.TargetsKt.declarationsOrReferences(targets.kt:136) at com.intellij.model.psi.impl.TargetsKt.declaredReferencedData(targets.kt:42) at com.intellij.model.psi.impl.TargetsKt.targetSymbols(targets.kt:24) at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.getTargetSymbols(IdentifierHighlighterPass.java:194) at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.highlightReferencesAndDeclarations(IdentifierHighlighterPass.java:186) at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.doCollectInformation(IdentifierHighlighterPass.java:91) at com.intellij.codeInsight.highlighting.BackgroundHighlighter.lambda$submitIdentifierHighlighterPass$5(BackgroundHighlighter.java:203) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor.callWrapped(NonBlockingReadActionImpl.java:746) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor$MonitoredComputation.call(NonBlockingReadActionImpl.java:778) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:573) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$3(NonBlockingReadActionImpl.java:537) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1091) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:72) at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:129) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:110) at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$1(ProgressManager.java:70) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173) at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:70) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:107) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:72) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:537) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:444) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699) at java.base/java.lang.Thread.run(Thread.java:833)
Impressive, i understand at least some of them!
First error at org.purescript.psi.declaration.fixity.FixityDeclaration.getOperatorName(FixityDeclaration.kt:71)
means that a parsed fixity declaration did not have a operator name which i think never should happen, do you have any more insight into this error?
The second dont seam to be related to the plugin
The third java.lang.NullPointerException at org.purescript.psi.declaration.foreign.ForeignValueDecl.getNameIdentifier(ForeignValueDecl.kt:62)
is about a value declaration missing a name, that also should not be possible. Do you have any insight in this?
What doese this code do?
data ReactChildren :: forall k. k -> Type
data ReactChildren a
This might be the code behind the error:
at org.purescript.psi.declaration.data.DataDeclaration$Psi.getIdentifier$Purescript(DataDeclaration.kt:48)
This seems to only have happened right after the update and not again.
What doese this code do?
It's a warning when you use phantom types (type variables that don't appear in any constructor) that somehow the code is meant to be more readable with this type signature:
8 exceptions in total:
java.lang.Throwable: apply = Proxy parent=module Control.Apply ( class Apply , apply , (<>) , applyFirst , (<) , applySecond , (*>) , lift2 , lift3 , lift4 , lift5 , module Data.Functor ) where
import Data.Functor (class Functor, map, void, ($>), (<#>), (<$), (<$>)) import Data.Function (const) import Control.Category (identity) import Type.Proxy (Proxy(..))
Apply
class provides the(<*>)
which is used to apply a function --Apply
can be used to lift functions of two or more arguments to work onf
. It might also be understoodlift2
function:(<*>)
is recovered fromlift2
aslift2 ($)
. That is,(<*>)
lifts($)
to arguments wrapped with thef
.Functor
(<<<) <$> f <*> g <*> h = f <*> (g <*> h)
Apply
represents a strong lax semi-monoidal endofunctor.class Functor f <= Apply f where apply :: forall a b. f (a -> b) -> f a -> f b
infixl 4 apply as <*>
instance applyFn :: Apply ((->) r) where apply f g x = f x (g x)
instance applyArray :: Apply Array where apply = arrayApply
foreign import arrayApply :: forall a b. Array (a -> b) -> Array a -> Array b
instance applyProxy :: Apply Proxy where apply = Proxy
-- | Combine two effectful actions, keeping only the result of the first. applyFirst :: forall a b f. Apply f => f a -> f b -> f a applyFirst a b = const <$> a <*> b
infixl 4 applyFirst as <*
-- | Combine two effectful actions, keeping only the result of the second. applySecond :: forall a b f. Apply f => f a -> f b -> f b applySecond a b = const identity <$> a <*> b
infixl 4 applySecond as *>
f
.lift2 :: forall a b c f. Apply f => (a -> b -> c) -> f a -> f b -> f c lift2 f a b = f <$> a <*> b
-- | Lift a function of three arguments to a function which accepts and returns -- | values wrapped with the type constructor
f
. lift3 :: forall a b c d f. Apply f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d lift3 f a b c = f <$> a <> b <> c-- | Lift a function of four arguments to a function which accepts and returns -- | values wrapped with the type constructor
f
. lift4 :: forall a b c d e f. Apply f => (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e lift4 f a b c d = f <$> a <> b <> c <*> d-- | Lift a function of five arguments to a function which accepts and returns -- | values wrapped with the type constructor
f
. lift5 :: forall a b c d e f g. Apply f => (a -> b -> c -> d -> e -> g) -> f a -> f b -> f c -> f d -> f e -> f g lift5 f a b c d e = f <$> a <> b <> c <> d <> e