diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2015-08-01 11:13:38 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2015-08-01 11:14:35 +0200 |
commit | f2a73374e76e5da8ce893cae0cff6ab21209b152 (patch) | |
tree | a3203a9cdb450ff594721927766c13cbad95d3b8 /src/Main.lhs | |
parent | 88e2760d9964b84ea6f9959df693181448680c2d (diff) | |
download | pesto-f2a73374e76e5da8ce893cae0cff6ab21209b152.tar.gz pesto-f2a73374e76e5da8ce893cae0cff6ab21209b152.tar.bz2 pesto-f2a73374e76e5da8ce893cae0cff6ab21209b152.zip |
Rework metadata
Simplify syntax (no leading dot), only pulled from root node, add
extraction function.
Diffstat (limited to 'src/Main.lhs')
-rw-r--r-- | src/Main.lhs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Main.lhs b/src/Main.lhs index 00123d5..5cc7c64 100644 --- a/src/Main.lhs +++ b/src/Main.lhs @@ -4,9 +4,10 @@ User interface .. class:: nodoc > module Main (main) where +> import System.IO (hPrint, stderr) > import Codec.Pesto.Parse (parse) > import Codec.Pesto.Graph (extract, toGraph, firstNodeId, resolveReferences) -> import Codec.Pesto.Lint (lint) +> import Codec.Pesto.Lint (lint, extractMetadata) > import Codec.Pesto.Dot (toDot) The pesto to dot converter can be run with ``cabal run pesto``. It expects a @@ -28,7 +29,8 @@ add linting information to graph > doc = (head . extract . snd . unzip) stream > nodes = zip [firstNodeId..] doc > edges = toGraph nodes ++ resolveReferences nodes -> --print $ lint nodes edges +> hPrint stderr $ extractMetadata nodes edges +> hPrint stderr $ lint nodes edges > putStrLn $ toDot nodes edges > malformedRecipe = print |