Created
July 8, 2022 00:27
-
-
Save 0rphee/a76874d6b496c88f4d611fb093aa99f0 to your computer and use it in GitHub Desktop.
Helix code lens and code actions for Haskell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Follow instructions from (https://www.haskell.org/ghcup/) to install Haskell-Language-Server | |
-- Neither do code actions nor code lenses are available when selecting eligible code, while in other | |
-- editors they are available | |
-- More code actions are available in other editors | |
-- func xs = sum xs | |
-- func = sum | |
func :: (Foldable t, Num a)=> t a -> a | |
func xs = foldl (+) 0 xs | |
-- The type signature can be added in other editors through code lens | |
-- f :: Num a => a -> a -> a | |
f x y = x * y + 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment