)
where
import Control.Applicative
-import Data.Attoparsec.Char8 as P
-import Data.Attoparsec.Lazy as LP
+import Data.Attoparsec.Char8
+import qualified Data.Attoparsec.Lazy as LP
import qualified Data.ByteString.Lazy.Char8 as Lazy
import qualified Data.Map as M
import Data.Map (Map)
"pair"
ext ∷ Parser Text
- ext = (decodeUtf8 <$> P.takeWhile1 isAlphaNum)
+ ext = (decodeUtf8 <$> takeWhile1 isAlphaNum)
<?>
"ext"
"linebreak"
compile ∷ Ord k ⇒ [(v, [k])] → Either (k, v, v) (Map k v)
-compile = go (∅) ∘ concat ∘ map tr
+compile = go (∅) ∘ concat ∘ (tr <$>)
where
tr ∷ (v, [k]) → [(k, v)]
tr (v, ks) = [(k, v) | k ← ks]