Skip to content

Commit 6345ae1

Browse files
committed
output to stdout
1 parent ee45bec commit 6345ae1

File tree

5 files changed

+14
-10
lines changed

5 files changed

+14
-10
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
# implicit-hie
2+
```bash
3+
cd your-stack-or-cabal-package
4+
implicit-hie > hie.yaml
5+
```

app/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ main = do
2222
when (null path) $ error "No .cabal file found!\n You may need to run stack build."
2323
file <- T.readFile $ head path
2424
case parseOnly parsePackage file of
25-
Right r -> T.writeFile "hie.yaml" $ sOrC r
25+
Right r -> T.putStr $ sOrC r
2626
_ -> error "Could not parse *.cabal file"

hie.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ cradle:
33
- path: "src"
44
component: "implicit-hie:lib"
55
- path: "app"
6-
component: "implicit-hie:exe:implicit-hie-exe"
6+
component: "implicit-hie:exe:gen-hie"
77
- path: "test"
88
component: "implicit-hie:test:implicit-hie-test"

implicit-hie.cabal

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ cabal-version: 1.12
44
--
55
-- see: https://github.com/sol/hpack
66
--
7-
-- hash: f941332727b491b78a5ecc8465f43d3597766e4d3363a1d76d459e4a84515b5f
7+
-- hash: ee9bceb3ed6e6ee053acc1dc9dde3033fed8e9f565a8c8bbdfa52f9be9c507aa
88

99
name: implicit-hie
1010
version: 0.1.0.0
11-
description: Please see the README on GitHub at <https://github.com/Avi-D-coder/implicit-hie#readme>
11+
description: Auto generate a stack or cabal multi component hie.yaml file
1212
homepage: https://github.com/Avi-D-coder/implicit-hie#readme
1313
bug-reports: https://github.com/Avi-D-coder/implicit-hie/issues
1414
author: Avi Dessauer
@@ -33,21 +33,21 @@ library
3333
Paths_implicit_hie
3434
hs-source-dirs:
3535
src
36-
ghc-options: -fspecialize-aggressively -Wall -Wincomplete-record-updates -Wincomplete-uni-patterns -fno-warn-unused-imports -fno-warn-unused-binds -fno-warn-name-shadowing -fwarn-redundant-constraints
36+
ghc-options: -O2 -flate-specialise -fexpose-all-unfoldings -fspecialize-aggressively -Wall -Wincomplete-record-updates -Wincomplete-uni-patterns -fno-warn-unused-imports -fno-warn-unused-binds -fno-warn-name-shadowing -fwarn-redundant-constraints
3737
build-depends:
3838
attoparsec
3939
, base >=4.7 && <5
4040
, text
4141
, yaml
4242
default-language: Haskell2010
4343

44-
executable implicit-hie-exe
44+
executable gen-hie
4545
main-is: Main.hs
4646
other-modules:
4747
Paths_implicit_hie
4848
hs-source-dirs:
4949
app
50-
ghc-options: -fspecialize-aggressively -Wall -Wincomplete-record-updates -Wincomplete-uni-patterns -fno-warn-unused-imports -fno-warn-unused-binds -fno-warn-name-shadowing -fwarn-redundant-constraints -threaded -rtsopts -with-rtsopts=-N
50+
ghc-options: -O2 -flate-specialise -fexpose-all-unfoldings -fspecialize-aggressively -Wall -Wincomplete-record-updates -Wincomplete-uni-patterns -fno-warn-unused-imports -fno-warn-unused-binds -fno-warn-name-shadowing -fwarn-redundant-constraints -threaded -rtsopts -with-rtsopts=-N
5151
build-depends:
5252
attoparsec
5353
, base >=4.7 && <5
@@ -65,7 +65,7 @@ test-suite implicit-hie-test
6565
Paths_implicit_hie
6666
hs-source-dirs:
6767
test
68-
ghc-options: -fspecialize-aggressively -Wall -Wincomplete-record-updates -Wincomplete-uni-patterns -fno-warn-unused-imports -fno-warn-unused-binds -fno-warn-name-shadowing -fwarn-redundant-constraints -threaded -rtsopts -with-rtsopts=-N
68+
ghc-options: -O2 -flate-specialise -fexpose-all-unfoldings -fspecialize-aggressively -Wall -Wincomplete-record-updates -Wincomplete-uni-patterns -fno-warn-unused-imports -fno-warn-unused-binds -fno-warn-name-shadowing -fwarn-redundant-constraints -threaded -rtsopts -with-rtsopts=-N
6969
build-depends:
7070
attoparsec
7171
, base >=4.7 && <5

package.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ extra-source-files:
1717
# To avoid duplicated efforts in documentation and dealing with the
1818
# complications of embedding Haddock markup inside cabal files, it is
1919
# common to point users to the README.md file.
20-
description: Please see the README on GitHub at <https://github.com/Avi-D-coder/implicit-hie#readme>
20+
description: "Auto generate a stack or cabal multi component hie.yaml file"
2121

2222
dependencies:
2323
- base >= 4.7 && < 5
@@ -42,7 +42,7 @@ library:
4242
source-dirs: src
4343

4444
executables:
45-
implicit-hie-exe:
45+
gen-hie:
4646
main: Main.hs
4747
source-dirs: app
4848
ghc-options:

0 commit comments

Comments
 (0)