module Text.Regex.Less.Quackers (QLR(..)) where
import qualified Text.Regex.PCRE as R
import Text.Regex.Less.REOpts
class QLR a where
compile :: a -> R.Regex
instance QLR String where
compile a = R.makeRegexOpts (reCtOpts []) (reRtOpts []) a
instance QLR (String,[RECtOpts]) where
compile (a,b) = R.makeRegexOpts (reCtOpts b) (reRtOpts []) a
instance QLR (String,[RERtOpts]) where
compile (a,b) = R.makeRegexOpts (reCtOpts []) (reRtOpts b) a
instance QLR ((String,[RECtOpts]),[RERtOpts]) where
compile ((a,b),c) = R.makeRegexOpts (reCtOpts b) (reRtOpts c) a
instance QLR ((String,[RERtOpts]),[RECtOpts]) where
compile ((a,b),c) = R.makeRegexOpts (reCtOpts c) (reRtOpts b) a
instance QLR (String,([RECtOpts],[RERtOpts])) where
compile (a,(b,c)) = R.makeRegexOpts (reCtOpts b) (reRtOpts c) a
instance QLR (String,([RERtOpts],[RECtOpts])) where
compile (a,(b,c)) = R.makeRegexOpts (reCtOpts c) (reRtOpts b) a