-
Notifications
You must be signed in to change notification settings - Fork 205
Conversation
|
||
let candidates' = [hieBin, backupHieBin, "hie"] | ||
candidates = map (++ exeExtension) candidates' | ||
logm $ "hie exe candidates :" ++ show candidates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous impl didn't list all 3 candidates that the program is searching for. Also switched to dropWhileEnd
to avoid the need to reverse twice.
let mLogFileName = case optLogFile opts of | ||
Just f -> Just f | ||
Nothing -> Nothing | ||
let mLogFileName = optLogFile opts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
else do | ||
L.infoM "hie" "Using plain GHC version" | ||
tryCommand "ghc --version" | ||
tryCommand "ghc --numeric-version" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't know this existed, very handy!
test/unit/LiquidSpec.hs
Outdated
msg `shouldSatisfy` isPrefixOf "RESULT\n[{\"start\":{\"line\":9,\"column\":1},\"stop\":{\"line\":9,\"column\":8},\"message\":\"Error: Liquid Type Mismatch\\n Inferred type\\n VV : {v : Int | v == (7 : int)}\\n \\n not a subtype of Required type\\n VV : {VV : Int | VV mod 2 == 0}\\n" | ||
ef `shouldBe` ExitFailure 1 | ||
Just (_, []) -> error "Didn't get any output from liquid binary" | ||
Nothing -> error "This test requires 'liquid' binary to be present on your PATH. Follow the steps in docs/Hacking.md to install it." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attempt to give more informative error than "failed pattern match" when liquid is not installed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did something similar here might be a bit much to crash on this error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks. I'm going to remove the changes to that file from my PR..
I updated the PR, removing the TODO from the test. But I'm still struggling with couple of tests related to Test expects:
Actual result from liquid:
|
So I finally managed to install liquid 0.8.2.4 locally and the tests work for me except for #900 (comment) . I removed rebased this PR onto master and removed my changes to LiquidSpec.hs from this PR |
Hello @alanz I'd like to join in and contribute to this project.
I made some simplifications and typo fixes while getting acquainted with the code base.
However I'm running into problem when running
make test
:Some
LiquidSpec.hs
tests were failing, because I didn't haveliquid
binary (see TODO comment in this PR).I didn't find any instructions in this project on how to set that up, so I followed the install instructions of liquidhaskell but that didn't fix the tests (the output of the latest liquid binary didn't correspond to test expectations).
I'll be happy if you could assist me with making the tests work.