From 2aa0bab498cffbc12d485d2c59f7aed04c69c409 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Fri, 5 Dec 2014 19:59:04 +1100 Subject: GNode and GEdge types now have their own files... again... --- src/Grasp/Parser.hs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/Grasp/Parser.hs') diff --git a/src/Grasp/Parser.hs b/src/Grasp/Parser.hs index 8c0e4b4..86a1858 100644 --- a/src/Grasp/Parser.hs +++ b/src/Grasp/Parser.hs @@ -6,7 +6,12 @@ module Grasp.Parser ( import Control.Applicative( some ) import Data.Char( toLower, toUpper ) import Text.ParserCombinators.Parsec -import Grasp.Types( Instruction(..), EdgeLabel(..), GNode(..), GEdge(..) ) + +import Grasp.GNode( GNode ) +import qualified Grasp.GNode as GN + +import Grasp.GEdge( GEdge ) +import qualified Grasp.GEdge as GE @@ -125,7 +130,7 @@ node = do a <- attrList optional (char ';') whiteSpace - return (GNode (n, Instruction a)) + return (GN.mkGNode (n, GN.mkInst a)) edge = do @@ -135,7 +140,7 @@ edge = do c <- attrList optional (char ';') whiteSpace - return (GEdge (a,b, EdgeLabel c)) + return (GE.mkGEdge (a,b, GE.mkLabel c)) edgeOp = string "->" >> whiteSpace >> return "->" -- cgit