Giter VIP home page Giter VIP logo

ghcid-bug-repro's Introduction

example code to reproduce bug ndmitchell/ghcid#57 (comment)

Setup

project consist of

  • package 'a' in a/

    • library Exposing module A
    • executable
  • package 'b' in b/

    • depends on 'a'
    • library Exposing module B (B import stuff from module A in pakcage a)
    • executable
  • package 'ghcid-test' in .

    • depends on 'a' and 'b'
    • library Exposing module Test

no .ghci file is present

problem:

All example above are run from the ghcid-test folder

  1. simple ghcid invocation : No reloading
$ ghcid
Loading stack ghci --test --ghci-options=-fno-code ...
The following GHC options are incompatible with GHCi and have not been passed to it: -threaded

* * * * * * * *
The main module to load is ambiguous. Candidates are:
1. Package `a' component exe:a-exe with main-is file: /Users/rvion/dev/ghcid-test/a/app/Main.hs
2. Package `b' component exe:b-exe with main-is file: /Users/rvion/dev/ghcid-test/b/app/Main.hs
You can specify which one to pick by:
 * Specifying targets to stack ghci e.g. stack ghci a:exe:a-exe
 * Specifying what the main is e.g. stack ghci --main-is a:exe:a-exe
Specify main module to use (press enter to load none): Not loading any main modules, as no valid module selected
 * Choosing from the candidate above [1..2]

* * * * * * * *

Configuring GHCi with the following packages: ghcid-test, a, b
GHCi, version 7.10.3: http://www.haskell.org/ghc/  :? for help
[1 of 3] Compiling A                ( /Users/rvion/dev/ghcid-test/a/src/A.hs, nothing )
[2 of 3] Compiling B                ( /Users/rvion/dev/ghcid-test/b/src/B.hs, nothing )
[3 of 3] Compiling Test             ( Test.hs, nothing )
Ok, modules loaded: Test, B, A.

when I change any file, nothing reload.


here is the output of my stack ghci invocation:

$ stack ghci
The following GHC options are incompatible with GHCi and have not been passed to it: -threaded

* * * * * * * *
The main module to load is ambiguous. Candidates are:
1. Package `a' component exe:a-exe with main-is file: /Users/rvion/dev/ghcid-test/a/app/Main.hs
2. Package `b' component exe:b-exe with main-is file: /Users/rvion/dev/ghcid-test/b/app/Main.hs
You can specify which one to pick by:
 * Specifying targets to stack ghci e.g. stack ghci a:exe:a-exe
 * Specifying what the main is e.g. stack ghci --main-is a:exe:a-exe
 * Choosing from the candidate above [1..2]
* * * * * * * *

Specify main module to use (press enter to load none):

then I press enter at the prompt, then

Not loading any main modules, as no valid module selected

Configuring GHCi with the following packages: ghcid-test, a, b
GHCi, version 7.10.3: http://www.haskell.org/ghc/  :? for help
[1 of 3] Compiling A                ( /Users/rvion/dev/ghcid-test/a/src/A.hs, interpreted )
[2 of 3] Compiling B                ( /Users/rvion/dev/ghcid-test/b/src/B.hs, interpreted )
[3 of 3] Compiling Test             ( Test.hs, interpreted )
Ok, modules loaded: Test, B, A.

ghcid-bug-repro's People

Contributors

rvion avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.