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

Generating case expressions (Ctrl+Alt+M) is broken #206

Closed
corazza opened this issue Jul 7, 2018 · 1 comment
Closed

Generating case expressions (Ctrl+Alt+M) is broken #206

corazza opened this issue Jul 7, 2018 · 1 comment
Labels

Comments

@corazza
Copy link

corazza commented Jul 7, 2018

Ch. 6 in Type-driven development has you case-split on a hole that is inside a type signature:

valToString : (isInt : Bool) -> ?argType -> String

I tried to do this by pressing Ctrl+Alt+M (make-case) with the cursor over ?argType (or having it fully selected)--but this seems to only work when this type signature is not followed by any code on the next line, i.e. when at least one full newline separates it from the definition. When the definition follows the type signature, as it usually does, the whole type signature with the newly-created case expression seems to be inserted into half of the definition.

I think I noticed this before in some regular (non-type-signature) case-expressions as well.

Screenshots for illustration:

  1. Broken

screenshot from 2018-07-07 16-22-26

screenshot from 2018-07-07 16-22-38

  1. Works when a newline separates the signature and the definition

screenshot from 2018-07-07 16-22-47

screenshot from 2018-07-07 16-23-00

I think this may also be related to the broken syntax-highlighting, also visible from the screenshots.

@justjoheinz justjoheinz added the bug label Sep 6, 2018
@justjoheinz
Copy link
Contributor

Thanks for the bug report. I'll look into this. As a suggestion: it would be helpful to include code snippets (enclosed in triple backticks) instead of screenshots. That gives us some code to work with immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants