-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Hi, and thanks for this project!
I noticed the "info" command cannot be executed without both "main" and "module" specified.
To reproduce:
-
Add file c.hs
f = 'c'
-
run hdevtools info
hdevtools admin --stop-server hdevtools admin --start-server hdevtools info c.hs f
-
get error, instead of the correct type
f :: Charhs:1:1: The IO action ‘main’ is not defined in module ‘Main’ Error loading targets
BTW GHCi can guess the type of f:
echo ":type f" | ghci c.hs
GHCi, version 7.10.3: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Main ( c.hs, interpreted )
Ok, modules loaded: Main.
ghci> f :: Char
To get the type of f, both "main" and "module" need to be defined:
-
add file a.hs
module Main where main = undefined f = 'a'
-
run info (same commands as in 2. above)
-
get correct output
f :: Char -- Defined at /private/tmp/a.hs:5:1
I haven't checked if the type command has this same issue.
This version of hdevtools is:
hdevtools --version
hdevtools: version 0.1.3.1 (ghc-7.10.3-x86_64-darwin, cabal-1.22.5.0)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels