module Sound.Tidal.ID (ID(..)) where
import GHC.Exts ( IsString(..) )
newtype ID = ID { ID -> String
fromID :: String }
noOv :: String -> a
noOv :: String -> a
noOv String
meth = String -> a
forall a. HasCallStack => String -> a
error (String -> a) -> String -> a
forall a b. (a -> b) -> a -> b
$ String
meth String -> String -> String
forall a. [a] -> [a] -> [a]
++ String
": not supported for ids"
instance Num ID where
fromInteger :: Integer -> ID
fromInteger = String -> ID
ID (String -> ID) -> (Integer -> String) -> Integer -> ID
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> String
forall a. Show a => a -> String
show
+ :: ID -> ID -> ID
(+) = String -> ID -> ID -> ID
forall a. String -> a
noOv String
"+"
* :: ID -> ID -> ID
(*) = String -> ID -> ID -> ID
forall a. String -> a
noOv String
"*"
abs :: ID -> ID
abs = String -> ID -> ID
forall a. String -> a
noOv String
"abs"
signum :: ID -> ID
signum = String -> ID -> ID
forall a. String -> a
noOv String
"signum"
(-) = String -> ID -> ID -> ID
forall a. String -> a
noOv String
"-"
instance IsString ID where
fromString :: String -> ID
fromString = String -> ID
ID