Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit d77527b

Browse files
committed
Make it so!
0 parents  commit d77527b

File tree

7 files changed

+85
-0
lines changed

7 files changed

+85
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/dist
2+
/.ghc.environment.*
3+
/.stack-work

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Revision history for hslua-module-json
2+
3+
## 0.1.0 -- YYYY-mm-dd
4+
5+
* First version. Released on an unsuspecting world.

LICENSE

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

Setup.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import Distribution.Simple
2+
main = defaultMain

hslua-module-aeson.cabal

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: hslua-module-aeson
2+
version: 0.1.0
3+
synopsis: Lua wrapper around Aeson.
4+
description: Allow to encode and decode Lua values from and to JSON.
5+
homepage: https://github.com/hslua/hslua-module-aeson
6+
license: MIT
7+
license-file: LICENSE
8+
author: Albert Krewinkel
9+
maintainer: [email protected]
10+
copyright: Albert Krewinkel <[email protected]>
11+
category: Foreign
12+
build-type: Simple
13+
extra-source-files: CHANGELOG.md
14+
cabal-version: >=1.10
15+
tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5
16+
17+
source-repository head
18+
type: git
19+
location: https://github.com/hslua/hslua-module-aeson.git
20+
21+
library
22+
build-depends: base >= 4.9 && < 5
23+
, aeson >= 0.11 && < 1.5
24+
, hslua >= 1.0.3 && < 1.2
25+
, hslua-aeson >= 1.0.0 && < 1.1
26+
exposed-modules: Foreign.Lua.Module.Aeson
27+
hs-source-dirs: src
28+
default-language: Haskell2010
29+
ghc-options: -Wall

src/Foreign/Lua/Module/Aeson.hs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{-|
2+
Module : Foreign.Lua.Module.Aeson
3+
Copyright : © 2019 Albert Krewinkel
4+
License : MIT
5+
Maintainer : Albert Krewinkel <[email protected]>
6+
Stability : alpha
7+
Portability : Requires GHC 8 or later.
8+
9+
Use Aeson to encode and decode Lua values.
10+
-}
11+
module Foreign.Lua.Module.Aeson
12+
( pushModule )
13+
where
14+
15+
import Foreign.Lua (Lua, NumResults)
16+
import qualified Foreign.Lua as Lua
17+
18+
pushModule :: Lua NumResults
19+
pushModule = do
20+
Lua.newtable
21+
return 1

stack.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
resolver: lts-13.18
2+
packages:
3+
- .
4+
extra-deps:
5+
- hslua-1.0.3

0 commit comments

Comments
 (0)