Skip to content

Commit dd27d64

Browse files
committed
Make it so! πŸš€β˜†
0 parents  commit dd27d64

File tree

11 files changed

+276
-0
lines changed

11 files changed

+276
-0
lines changed

β€Ž.github/workflows/ci.ymlβ€Ž

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
3+
# Trigger the workflow on push or pull request, but only for the master branch
4+
on:
5+
pull_request:
6+
push:
7+
branches: [master]
8+
9+
jobs:
10+
build:
11+
name: ghc ${{ matrix.ghc }}
12+
runs-on: ubuntu-16.04
13+
strategy:
14+
matrix:
15+
cabal: ["2.4"]
16+
ghc:
17+
- "8.0.2"
18+
- "8.2.2"
19+
- "8.4.4"
20+
- "8.6.5"
21+
- "8.8.3"
22+
23+
steps:
24+
- uses: actions/checkout@v2
25+
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
26+
27+
- uses: actions/setup-haskell@v1
28+
name: Setup Haskell
29+
with:
30+
ghc-version: ${{ matrix.ghc }}
31+
cabal-version: ${{ matrix.cabal }}
32+
33+
- uses: actions/cache@v1
34+
name: Cache ~/.cabal/store
35+
with:
36+
path: ~/.cabal/store
37+
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal
38+
39+
- name: Build
40+
run: |
41+
cabal v2-update
42+
cabal v2-build --enable-tests --enable-benchmarks
43+
44+
- name: Test
45+
run: |
46+
cabal v2-test --enable-tests

β€Ž.gitignoreβ€Ž

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
### Haskell
2+
dist
3+
dist-*
4+
cabal-dev
5+
*.o
6+
*.hi
7+
*.chi
8+
*.chs.h
9+
*.dyn_o
10+
*.dyn_hi
11+
*.prof
12+
*.aux
13+
*.hp
14+
*.eventlog
15+
.virtualenv
16+
.hsenv
17+
.hpc
18+
.cabal-sandbox/
19+
cabal.sandbox.config
20+
cabal.config
21+
cabal.project.local
22+
.ghc.environment.*
23+
.HTF/
24+
# Stack
25+
.stack-work/
26+
stack.yaml.lock
27+
28+
### IDE/support
29+
# Vim
30+
[._]*.s[a-v][a-z]
31+
[._]*.sw[a-p]
32+
[._]s[a-v][a-z]
33+
[._]sw[a-p]
34+
*~
35+
tags
36+
37+
# IntellijIDEA
38+
.idea/
39+
.ideaHaskellLib/
40+
*.iml
41+
42+
# Atom
43+
.haskell-ghc-mod.json
44+
45+
# VS
46+
.vscode/
47+
48+
# Emacs
49+
*#
50+
.dir-locals.el
51+
TAGS
52+
53+
# other
54+
.DS_Store

β€Ž.travis.ymlβ€Ž

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
sudo: true
2+
language: haskell
3+
ghc: 8.8.4
4+
5+
git:
6+
depth: 5
7+
8+
cache:
9+
directories:
10+
- "$HOME/.cabal/store"
11+
- "$HOME/.stack"
12+
- "$TRAVIS_BUILD_DIR/.stack-work"
13+
14+
install:
15+
# HLint check
16+
- curl -sSL https://raw.github.com/ndmitchell/neil/master/misc/travis.sh | sh -s -- hlint .
17+
18+
- |
19+
curl -sSL https://get.haskellstack.org/ | sh
20+
stack --version
21+
stack build --system-ghc \
22+
--test --no-run-tests \
23+
--ghc-options=-Werror
24+
25+
script:
26+
- >-
27+
stack test --system-ghc
28+
29+
notifications:
30+
email: false

β€ŽCHANGELOG.mdβ€Ž

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
3+
`ast-migrator` uses [PVP Versioning][1].
4+
The changelog is available [on GitHub][2].
5+
6+
## 0.0.0.0
7+
8+
* Initially created.
9+
10+
[1]: https://pvp.haskell.org
11+
[2]: https://github.com/tarleb/ast-migrator/releases

β€ŽLICENSEβ€Ž

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Albert Krewinkel
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

β€ŽREADME.mdβ€Ž

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# ast-migrator
2+
3+
[![GitHub CI][CI badge]](https://github.com/tarleb/ast-migrator/actions)
4+
[![Build status][Travis badge]](https://travis-ci.com/tarleb/ast-migrator)
5+
[![Hackage][Hackage badge]](https://hackage.haskell.org/package/ast-migrator)
6+
[![Stackage Lts][Stackage Lts badge]](http://stackage.org/lts/package/ast-migrator)
7+
[![Stackage Nightly][Stackage Nightly badge]](http://stackage.org/nightly/package/ast-migrator)
8+
[![MIT license][License badge]](LICENSE)
9+
10+
[CI badge]: https://github.com/tarleb/ast-migrator/workflows/CI/badge.svg
11+
[Travis badge]: https://img.shields.io/travis/tarleb/ast-migrator.svg?logo=travis
12+
[Hackage badge]: https://img.shields.io/hackage/v/ast-migrator.svg?logo=haskell
13+
[Stackage Lts badge]: http://stackage.org/package/ast-migrator/badge/lts
14+
[Stackage Nightly badge]: http://stackage.org/package/ast-migrator/badge/nightly
15+
[License badge]: https://img.shields.io/badge/license-MIT-blue.svg
16+
17+
Migrate documents from one pandoc AST schema to another.

β€Žapp/Main.hsβ€Ž

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module Main (main) where
2+
3+
import AstMigrator (someFunc)
4+
5+
6+
main :: IO ()
7+
main = someFunc

β€Žast-migrator.cabalβ€Ž

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
cabal-version: 2.4
2+
name: ast-migrator
3+
version: 0.0.0.0
4+
synopsis: Migrate documents from one pandoc AST schema to another
5+
description: Migrate documents from one pandoc AST schema to another
6+
homepage: https://github.com/tarleb/ast-migrator
7+
bug-reports: https://github.com/tarleb/ast-migrator/issues
8+
license: MIT
9+
license-file: LICENSE
10+
author: Albert Krewinkel
11+
maintainer: Albert Krewinkel <albert@zeitkraut.de>
12+
copyright: 2020 Albert Krewinkel
13+
category: Text
14+
build-type: Simple
15+
extra-doc-files: README.md
16+
CHANGELOG.md
17+
tested-with: GHC == 8.0.2
18+
GHC == 8.2.2
19+
GHC == 8.4.4
20+
GHC == 8.6.5
21+
GHC == 8.8.3
22+
23+
source-repository head
24+
type: git
25+
location: https://github.com/tarleb/ast-migrator.git
26+
27+
common common-options
28+
build-depends: base >= 4.9.1.0 && < 4.14
29+
30+
ghc-options: -Wall
31+
-Wcompat
32+
-Widentities
33+
-Wincomplete-uni-patterns
34+
-Wincomplete-record-updates
35+
if impl(ghc >= 8.0)
36+
ghc-options: -Wredundant-constraints
37+
if impl(ghc >= 8.2)
38+
ghc-options: -fhide-source-paths
39+
if impl(ghc >= 8.4)
40+
ghc-options: -Wmissing-export-lists
41+
-Wpartial-fields
42+
if impl(ghc >= 8.8)
43+
ghc-options: -Wmissing-deriving-strategies
44+
45+
default-language: Haskell2010
46+
47+
library
48+
import: common-options
49+
hs-source-dirs: src
50+
exposed-modules: AstMigrator
51+
52+
executable ast-migrator
53+
import: common-options
54+
hs-source-dirs: app
55+
main-is: Main.hs
56+
build-depends: ast-migrator
57+
ghc-options: -threaded
58+
-rtsopts
59+
-with-rtsopts=-N
60+
61+
test-suite ast-migrator-test
62+
import: common-options
63+
type: exitcode-stdio-1.0
64+
hs-source-dirs: test
65+
main-is: Spec.hs
66+
build-depends: ast-migrator
67+
ghc-options: -threaded
68+
-rtsopts
69+
-with-rtsopts=-N

β€Žsrc/AstMigrator.hsβ€Ž

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{- |
2+
Copyright: (c) 2020 Albert Krewinkel
3+
SPDX-License-Identifier: MIT
4+
Maintainer: Albert Krewinkel <albert@zeitkraut.de>
5+
6+
Migrate documents from one pandoc AST schema to another
7+
-}
8+
9+
module AstMigrator
10+
( someFunc
11+
) where
12+
13+
14+
someFunc :: IO ()
15+
someFunc = putStrLn ("someFunc" :: String)

β€Žstack.yamlβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
resolver: lts-15.5

0 commit comments

Comments
Β (0)