Skip to content

Commit

Permalink
Export the plugin in LiquidHaskell
Browse files Browse the repository at this point in the history
This commit re-exports the source plugin under the 'LiquidHaskell'
module, so that users can simply use `-fplugin=LiquidHaskell`.
  • Loading branch information
adinapoli committed Jun 8, 2020
1 parent eaf8a5c commit baf82a2
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion liquid-base/liquid-base.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ library
default-extensions: PackageImports
NoImplicitPrelude
if impl(ghc >= 8.10)
ghc-options: -fplugin=Language.Haskell.Liquid.GHC.Plugin
ghc-options: -fplugin=LiquidHaskell
2 changes: 1 addition & 1 deletion liquid-bytestring/liquid-bytestring.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ library
default-language: Haskell98
default-extensions: PackageImports
if impl(ghc >= 8.10)
ghc-options: -fplugin=Language.Haskell.Liquid.GHC.Plugin
ghc-options: -fplugin=LiquidHaskell
2 changes: 1 addition & 1 deletion liquid-containers/liquid-containers.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ library
default-language: Haskell98
default-extensions: PackageImports
if impl(ghc >= 8.10)
ghc-options: -fplugin=Language.Haskell.Liquid.GHC.Plugin
ghc-options: -fplugin=LiquidHaskell
2 changes: 1 addition & 1 deletion liquid-ghc-prim/liquid-ghc-prim.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ library
NoImplicitPrelude
MagicHash
if impl(ghc >= 8.10)
ghc-options: -fplugin=Language.Haskell.Liquid.GHC.Plugin
ghc-options: -fplugin=LiquidHaskell
2 changes: 1 addition & 1 deletion liquid-parallel/liquid-parallel.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ library
default-language: Haskell98
default-extensions: PackageImports
if impl(ghc >= 8.10)
ghc-options: -fplugin=Language.Haskell.Liquid.GHC.Plugin
ghc-options: -fplugin=LiquidHaskell
6 changes: 3 additions & 3 deletions liquid-platform/src/Liquid.hs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ main = do

let p = proc ghcPath $ [ "-O0"
, "-no-link"
, "-fplugin=Language.Haskell.Liquid.GHC.Plugin"
, "-fplugin=LiquidHaskell"
, "-plugin-package", "liquidhaskell"
, "-package", "liquid-ghc-prim"
, "-package", "liquid-base"
Expand All @@ -76,9 +76,9 @@ main = do
, "-hide-package", "containers"
, "-hide-package", "vector"
, "-hide-package", "bytestring"
, "-fplugin-opt=Language.Haskell.Liquid.GHC.Plugin:--normal" -- normal logging.
, "-fplugin-opt=LiquidHaskell:--normal" -- normal logging.
]
<> map (mappend "-fplugin-opt=Language.Haskell.Liquid.GHC.Plugin:") liquidArgs
<> map (mappend "-fplugin-opt=LiquidHaskell:") liquidArgs
<> ghcArgs
<> targets

Expand Down
2 changes: 1 addition & 1 deletion liquid-prelude/liquid-prelude.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ library
, liquidhaskell >= 0.8.10.1
default-language: Haskell98
if impl(ghc >= 8.10)
ghc-options: -fplugin=Language.Haskell.Liquid.GHC.Plugin
ghc-options: -fplugin=LiquidHaskell
2 changes: 1 addition & 1 deletion liquid-vector/liquid-vector.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ library
default-language: Haskell98
default-extensions: PackageImports
if impl(ghc >= 8.10)
ghc-options: -fplugin=Language.Haskell.Liquid.GHC.Plugin
ghc-options: -fplugin=LiquidHaskell
4 changes: 2 additions & 2 deletions src/Language/Haskell/Liquid/GHC/Plugin/Tutorial.hs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ library
liquid-base
, liquidhaskell
default-language: Haskell2010
ghc-options: -fplugin=Language.Haskell.Liquid.GHC.Plugin -- Add this!
ghc-options: -fplugin=LiquidHaskell -- Add this!
@
We will talk about the use (and need) for @liquid-base@ in the next section, but let's ignore it for now.
Expand Down Expand Up @@ -150,7 +150,7 @@ For example let's image we want to skip verification of our 'Toy.A' module. At t
name: toy-package-a
..
default-language: Haskell2010
ghc-options: -fplugin=Language.Haskell.Liquid.GHC.Plugin -fplugin-opt=Language.Haskell.Liquid.GHC.Plugin:--compilespec
ghc-options: -fplugin=LiquidHaskell -fplugin-opt=LiquidHaskell:--compilespec
@
-}
Expand Down
3 changes: 3 additions & 0 deletions src/LiquidHaskell.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
module LiquidHaskell (
-- * LiquidHaskell Specification QuasiQuoter
lq
-- * LiquidHaskell as a compiler plugin
, plugin
) where

import Language.Haskell.Liquid.UX.QuasiQuoter
import Language.Haskell.Liquid.GHC.Plugin (plugin)

0 comments on commit baf82a2

Please sign in to comment.