summaryrefslogtreecommitdiff
path: root/src/Grasp/Types/Instruction.hs
blob: 0ff40022c3f90993823321f5e6085555ff8a348d (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
module Grasp.Types.Instruction (
	Instruction,

	mk,

	toString,
	toFloat
    ) where




import Text.Read( readMaybe )




newtype Instruction = Instruction String
    deriving (Show, Eq)




mk :: String -> Instruction
mk = Instruction

toString :: Instruction -> String
toString (Instruction i) = i

toFloat :: Instruction -> Maybe Float
toFloat (Instruction i) = readMaybe i