summaryrefslogtreecommitdiff
path: root/src/Grasp/Types/GNode.hs
blob: 92c070e0eba9362823a49f509b57143abb460d0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
module Grasp.Types.GNode (
	GNode,

    mk,

	toNode,
	toInst,
	toLNode
	) where




import Grasp.Graph( Node, LNode )
import Grasp.Types.Instruction( Instruction )




newtype GNode = GNode (LNode Instruction)
    deriving (Show, Eq)




mk :: LNode Instruction -> GNode
mk = GNode

toNode :: GNode -> Node
toNode (GNode n) = fst n

toInst :: GNode -> Instruction
toInst (GNode n) = snd n

toLNode :: GNode -> LNode Instruction
toLNode (GNode n) = n