Skip to content

Support for stack-powered scripts? #3435

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

Closed
oskarpyk opened this issue Jan 3, 2023 · 2 comments
Closed

Support for stack-powered scripts? #3435

oskarpyk opened this issue Jan 3, 2023 · 2 comments

Comments

@oskarpyk
Copy link

oskarpyk commented Jan 3, 2023

I occasionally use stack's JIT-compiled scripting feature when I need to get something done quickly. A stupid example:

#!/usr/bin/env stack
{- stack script --resolver lts-17.9
  --package process
  --package wreq
  --package turtle
  --package aeson
  --package lens
  --package aeson-lens

-}

{-# LANGUAGE OverloadedStrings #-}


import Turtle.Prelude
import Data.Aeson

main :: IO ()
main = do 
  res <- single $ inshell "dmenu" "hi"
  print res

However, HLS doesn't really understand what's going on here. Is it possible to make this work?

@fendor
Copy link
Collaborator

fendor commented Jan 3, 2023

Duplicate of #111

tl;dr currently not really.

@oskarpyk
Copy link
Author

oskarpyk commented Jan 3, 2023

Ah, okay. Thanks.

@oskarpyk oskarpyk closed this as completed Jan 3, 2023
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

No branches or pull requests

2 participants