From 412148ce5f7911e818c6fe1e50981c2cd94858b1 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Sun, 3 Dec 2017 01:08:37 +0100 Subject: ghc-session: Add backpack test project --- tests/bkpregex/regex-example/Main.hs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/bkpregex/regex-example/Main.hs (limited to 'tests/bkpregex/regex-example') diff --git a/tests/bkpregex/regex-example/Main.hs b/tests/bkpregex/regex-example/Main.hs new file mode 100644 index 0000000..76d2974 --- /dev/null +++ b/tests/bkpregex/regex-example/Main.hs @@ -0,0 +1,12 @@ +{-# LANGUAGE OverloadedStrings #-} +module Main where + +import Regex.Types +import qualified Regex.String +import qualified Regex.ByteString + +nocs = Rep (Alt (Sym 'a') (Sym 'b')) +onec = Seq nocs (Sym 'c') +evencs = Seq (Rep (Seq onec onec)) nocs +main = print (Regex.String.accept evencs "acc") >> + print (Regex.ByteString.accept evencs "acc") -- cgit v1.2.3