forked from ucsd-progsys/liquidhaskell
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ucsd-progsys#1706 from ucsd-progsys/adinapoli/liqu…
…id-dev-mode Liquid-Dev-Mode prototype
- Loading branch information
Showing
17 changed files
with
141 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Main where | ||
|
||
import Language.Haskell.Liquid.Cabal (liquidHaskellMain) | ||
|
||
main :: IO () | ||
main = liquidHaskellMain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Main where | ||
|
||
import Language.Haskell.Liquid.Cabal (liquidHaskellMain) | ||
|
||
main :: IO () | ||
main = liquidHaskellMain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Main where | ||
|
||
import Language.Haskell.Liquid.Cabal (liquidHaskellMain) | ||
|
||
main :: IO () | ||
main = liquidHaskellMain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Main where | ||
|
||
import Language.Haskell.Liquid.Cabal (liquidHaskellMain) | ||
|
||
main :: IO () | ||
main = liquidHaskellMain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Main where | ||
|
||
import Language.Haskell.Liquid.Cabal (liquidHaskellMain) | ||
|
||
main :: IO () | ||
main = liquidHaskellMain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Main where | ||
|
||
import Language.Haskell.Liquid.Cabal (liquidHaskellMain) | ||
|
||
main :: IO () | ||
main = liquidHaskellMain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Main where | ||
|
||
import Language.Haskell.Liquid.Cabal (liquidHaskellMain) | ||
|
||
main :: IO () | ||
main = liquidHaskellMain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{- | This module provides a drop-in replacement for Cabal's 'defaultMain', to be used inside 'Setup.hs' | ||
modules of packages that wants to use the \"dev mode\". For more information, visit the documentation, | ||
especially the \"Developers' guide\". | ||
-} | ||
|
||
{-# LANGUAGE LambdaCase #-} | ||
module Language.Haskell.Liquid.Cabal (liquidHaskellMain) where | ||
|
||
import Distribution.Simple | ||
import System.Environment | ||
|
||
liquidHaskellMain :: IO () | ||
liquidHaskellMain = do | ||
mbDevMode <- lookupEnv "LIQUID_DEV_MODE" | ||
defaultMainWithHooks (devModeHooks mbDevMode) | ||
|
||
devModeHooks :: Maybe String -> UserHooks | ||
devModeHooks = \case | ||
Nothing -> simpleUserHooks | ||
Just x | x == "false" -> simpleUserHooks | ||
Just _ -> simpleUserHooks { buildHook = \_ _ _ _ -> return () } |