Skip to content

Commit 273ab38

Browse files
committed
fix the build
1 parent dfd3461 commit 273ab38

File tree

6 files changed

+17
-15
lines changed

6 files changed

+17
-15
lines changed

optparse.nix

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
{ build-idris-package, fetchFromGitHub, lens, wl-pprint/*, lib*/}:
1+
{ build-idris-package, fetchFromGitHub, lens, contrib /*, lib*/}:
22
build-idris-package {
33
name = "optparse";
4-
version = "2019-06-03";
4+
version = "2019-07-02";
55
src = fetchFromGitHub {
66
owner = "statebox";
77
repo = "optparse-idris";
8-
rev = "bd5d52097f5f414be0f710f2a0cffb01a04e95fd";
9-
sha256 = "0nr0hgmndnwsd65r9g49zgkdqsryrzg3c86pv5w2q88ybxplm0ap"; # lib.fakeSha256; # This makes nix error out and give you the correct hash in stderr
8+
rev = "f5611b1c695299ff0d528cdfc53fd5c51b7fdd84";
9+
sha256 = "1r49476sds7sw5x0z0ya4h2xd2g23a0wx8in219j8ngkihcw10hn"; # lib.fakeSha256; # This makes nix error out and give you the correct hash in stderr
1010
};
11-
idrisDeps = [ lens wl-pprint ];
11+
idrisDeps = [ lens contrib ];
1212

1313
meta = {
1414
description = "Minimal port of optparse-applicative to idris";

parser.js/ParserJS.idr renamed to parser.js/Main.idr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module ParserJS
1+
module Main
22

33
import Text.PrettyPrint.WL
44
import TParsec

parser/Parser.idr renamed to parser/Main.idr

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module Parser
1+
module Main
22

33
import Typedefs
44
import Parse
@@ -9,6 +9,8 @@ import CommandLine
99

1010
import Text.PrettyPrint.WL
1111
import Options.Applicative
12+
import Control.Lens.Setter
13+
import TParsec.Result
1214

1315
processArgs : List String -> Either ParseError CommandLineOpts
1416
processArgs (_ :: opts) = runParserFully parseProgramOptions opts
@@ -32,8 +34,8 @@ runWithOptions (MkTypedefOpts input output) = do
3234
Right typedef <- getInput input
3335
| Left err => putStrLn ("Filesystem error: " ++ show err)
3436
case parseAndGenerateTDef typedef of
35-
Nothing => putStrLn ("Typedef error: " ++ "could not generate typedef")
36-
Just tdef => writeOutput output tdef
37+
Left err => putStrLn ("Typedef error: " ++ err)
38+
Right tdef => writeOutput output tdef
3739

3840
partial
3941
main : IO ()

typedefs-parser-js.ipkg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package typedefs-parser-js
22

3-
modules = ParserJS
3+
modules = Main
44

55
executable = typedefs_parser.js
66

7-
main = ParserJS
7+
main = Main
88

99
sourcedir = parser.js
1010

typedefs-parser.ipkg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package typedefs-parser
22

3-
modules = Parser
3+
modules = CommandLine, Main
44

55
executable = typedefs_parser
66

7-
main = Parser
7+
main = Main
88

99
sourcedir = parser
1010

11-
pkgs = typedefs, contrib, optparse
11+
pkgs = typedefs, contrib, optparse, lens, tparsec

typedefs-parser.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ build-idris-package, typedefs, optparse, }:
1+
{ build-idris-package, typedefs, optparse }:
22

33
build-idris-package {
44
name = "typedefs-parser";

0 commit comments

Comments
 (0)