elm/compiler/SourceSyntax/Helpers.hs
2013-07-16 21:37:48 +02:00

14 lines
No EOL
263 B
Haskell

module SourceSyntax.Helpers where
import qualified Data.Char as Char
brkt s = "{ " ++ s ++ " }"
isTuple name =
take 6 name == "_Tuple" && all Char.isDigit (drop 6 name)
isOp = all isSymbol
isSymbol c =
Char.isSymbol c || elem c "+-/*=.$<>:&|^?%#@~!"