Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update jupyterlab-ihaskell for 4.x #1426

Merged
merged 11 commits into from
Apr 21, 2024
Merged

Update jupyterlab-ihaskell for 4.x #1426

merged 11 commits into from
Apr 21, 2024

Conversation

vaibhavsagar
Copy link
Member

No description provided.

Copy link

@krassowski krassowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Came here from community forum, some super quick notes from reading code alone.

jupyterlab-ihaskell/src/index.ts Outdated Show resolved Hide resolved
jupyterlab-ihaskell/src/index.ts Outdated Show resolved Hide resolved
jupyterlab-ihaskell/src/index.ts Outdated Show resolved Hide resolved
jupyterlab-ihaskell/src/index.ts Outdated Show resolved Hide resolved
name: 'ihaskell',
mime: 'text/x-ihaskell',
load: async () => {
const hs = await Promise.resolve(import('@codemirror/legacy-modes/mode/haskell'));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why wrap with Promise.resolve?

Suggested change
const hs = await Promise.resolve(import('@codemirror/legacy-modes/mode/haskell'));
const hs = await import('@codemirror/legacy-modes/mode/haskell');

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your code (which I based this off) had Promise.all with multiple imports, but I only care about one import. I've moved to importing this at the top of my file but that doesn't seem to be making a difference.

@vaibhavsagar
Copy link
Member Author

Thanks for your help! I think I've made all the changes you suggested here but I'm still getting a blank screen and exactly the same error message. Any more ideas?

@erkin98
Copy link

erkin98 commented Jan 18, 2024

did you fix it @vaibhavsagar ?

@vaibhavsagar
Copy link
Member Author

No, this PR doesn't work yet.

@erkin98
Copy link

erkin98 commented Jan 18, 2024

No, this PR doesn't work yet.

how can i reproduce?

@vaibhavsagar
Copy link
Member Author

You can run

$ nix build -L .#ihaskell-env-ghc94

on this branch to build a JupyterLab environment with IHaskell and jupyterlab-ihaskell installed. To make changes to jupyterlab-ihaskell, follow the instructions in that directory's README.

@vaibhavsagar
Copy link
Member Author

I need to reinstate the R modes and the :! behaviour, but for now this is good enough and already an improvement over the existing lack of syntax highlighting.

@vaibhavsagar vaibhavsagar changed the title [WIP] Update jupyterlab-ihaskell for 4.x Update jupyterlab-ihaskell for 4.x Apr 21, 2024
@vaibhavsagar vaibhavsagar merged commit 0d647a9 into master Apr 21, 2024
27 checks passed
@vaibhavsagar vaibhavsagar deleted the jupyterlab-4-ihaskell branch April 21, 2024 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants