mirror of
https://github.com/sol/hpack.git
synced 2024-10-04 11:47:15 +03:00
Add executable section to cabal file (manually for now)
This commit is contained in:
parent
36593be7cd
commit
ab526d1b57
@ -8,6 +8,7 @@ library
|
||||
hs-source-dirs: src
|
||||
exposed-modules:
|
||||
Cabalize
|
||||
other-modules:
|
||||
Config
|
||||
Util
|
||||
build-depends:
|
||||
@ -18,3 +19,11 @@ library
|
||||
, interpolate
|
||||
, yaml
|
||||
default-language: Haskell2010
|
||||
|
||||
executable cabalize
|
||||
hs-source-dirs: driver
|
||||
main-is: Main.hs
|
||||
build-depends:
|
||||
base == 4.*
|
||||
, cabalize
|
||||
default-language: Haskell2010
|
||||
|
6
driver/Main.hs
Normal file
6
driver/Main.hs
Normal file
@ -0,0 +1,6 @@
|
||||
module Main (main) where
|
||||
|
||||
import Cabalize
|
||||
|
||||
main :: IO ()
|
||||
main = cabalize >>= uncurry writeFile
|
38
test/CabalizeSpec.hs
Normal file
38
test/CabalizeSpec.hs
Normal file
@ -0,0 +1,38 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
module CabalizeSpec (main, spec) where
|
||||
|
||||
import Test.Hspec
|
||||
import Data.String.Interpolate
|
||||
import Data.String.Interpolate.Util
|
||||
|
||||
import Cabalize
|
||||
|
||||
main :: IO ()
|
||||
main = hspec spec
|
||||
|
||||
spec :: Spec
|
||||
spec = do
|
||||
describe "cabalize" $ do
|
||||
it "creates cabal file" $ do
|
||||
cabalize `shouldReturn` ("cabalize.cabal", unindent [i|
|
||||
-- This file has been generated from .package.yaml by Cabalize.
|
||||
name: cabalize
|
||||
version: 0.0.0
|
||||
build-type: Simple
|
||||
cabal-version: >= 1.10
|
||||
|
||||
library
|
||||
hs-source-dirs: src
|
||||
exposed-modules:
|
||||
Cabalize
|
||||
Config
|
||||
Util
|
||||
build-depends:
|
||||
base == 4.*
|
||||
, base-compat
|
||||
, directory
|
||||
, filepath
|
||||
, interpolate
|
||||
, yaml
|
||||
default-language: Haskell2010
|
||||
|])
|
1
test/Spec.hs
Normal file
1
test/Spec.hs
Normal file
@ -0,0 +1 @@
|
||||
{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
|
Loading…
Reference in New Issue
Block a user