on df135b8 help sign in
18 lines 388 B history raw
1{-# OPTIONS_GHC -Wall #-}
2module SourceSyntax.Helpers where
4import qualified Data.Char as Char
6brkt :: String -> String
7brkt s = "{ " ++ s ++ " }"
9isTuple :: String -> Bool
10isTuple name =
11 take 6 name == "_Tuple" && all Char.isDigit (drop 6 name)
13isOp :: String -> Bool
14isOp = all isSymbol
16isSymbol :: Char -> Bool
17isSymbol c =
18 Char.isSymbol c || elem c "+-/*=.$<>:&|^?%#@~!"