Skip to content

[DUX-2916] Single file with --enable-eval errors #335

@cideM

Description

@cideM

What happened?

Given this file foo.hs

myGreeting :: String
myGreeting = "Hello"

-- $> putStrLn (myGreeting <> " " <> myGreeting)

I get the following output

❯ ghciwatch foo.hs --enable-eval --clear
GHCi, version 9.6.6: https://www.haskell.org/ghc/  :? for help
[1 of 2] Compiling Main             ( foo.hs, interpreted )
Ok, one module loaded.
• All good! Finished starting up in 6.09s
• foo.hs:4:7: putStrLn (myGreeting <> " " <> myGreeting)
[1 of 2] Compiling Main             ( foo.hs, interpreted )
Ok, one module loaded.
Error:   × Tasks failed:
  │ • run_ghci: Couldn't convert /Users/fbs/private/advent_of_code/aoc2024-haskell/foo to
  │ module name

What did you expect to happen?

See the output from the example:

• src/MyLib.hs:9:7: putStrLn (myGreeting <> " " <> myGreeting)
Hello Hello

Steps to reproduce the issue

No response

The version of ghciwatch with the bug

ghciwatch 1.0.2

DUX-2916

Metadata

Metadata

Assignees

No one assigned

    Labels

    Low priorityCreated by Linear-GitHub SynclinearCreated by Linear-GitHub Sync

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions