diff options
author | Jed Barber <jjbarber@y7mail.com> | 2014-12-06 00:32:49 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2014-12-06 00:32:49 +1100 |
commit | d3a9803cf89ea94975934dd8abb18bbc12408a7e (patch) | |
tree | 321ddb45e29a10d3dc1cd1c0ac9387d447db5afc /src/Grasp/GNode.hs | |
parent | 2aa0bab498cffbc12d485d2c59f7aed04c69c409 (diff) |
All newtype stubs now in their own files in their own subdir
Diffstat (limited to 'src/Grasp/GNode.hs')
-rw-r--r-- | src/Grasp/GNode.hs | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/src/Grasp/GNode.hs b/src/Grasp/GNode.hs deleted file mode 100644 index 3c8161e..0000000 --- a/src/Grasp/GNode.hs +++ /dev/null @@ -1,60 +0,0 @@ -module Grasp.GNode ( - GNode, - Instruction, - - mkGNode, - mkInst, - - toNode, - toInst, - toLNode, - - instToFloat - ) where - - - - -import Grasp.Graph( Node, LNode ) -import Text.Read( readMaybe ) - - - - -newtype Instruction = Instruction String - deriving (Show, Eq) - -newtype GNode = GNode (LNode Instruction) - deriving (Show, Eq) - - - - -mkGNode :: LNode Instruction -> GNode -mkGNode = GNode - - - -mkInst :: String -> Instruction -mkInst = Instruction - - - -toNode :: GNode -> Node -toNode (GNode n) = fst n - - - -toInst :: GNode -> Instruction -toInst (GNode n) = snd n - - - -toLNode :: GNode -> LNode Instruction -toLNode (GNode n) = n - - - -instToFloat :: Instruction -> Maybe Float -instToFloat (Instruction i) = readMaybe i - |