whitespace: eol marker at end of all files
Ignore-this: 3b03abece3edb25c656f84db9cef7734 darcs-hash:20121017171258-76d51-76a4e9057c0a4c3c1370485f3dc072c18caafddf
This commit is contained in:
parent
e170c32ac3
commit
3f8c3bbb26
@ -12,4 +12,4 @@ bounds (StaticArray s e _) = (s,e)
|
||||
|
||||
(!) :: (StaticElement e,Ix i) => StaticArray i e -> i -> e
|
||||
(!) (StaticArray s e addr) i = let (I# ri) = index (s,e) i
|
||||
in extract addr ri
|
||||
in extract addr ri
|
||||
|
||||
@ -9,4 +9,4 @@ buildStaticArray (s,e) els = "StaticArray ("++show s++") ("++show e++") \""
|
||||
++"\"#"
|
||||
|
||||
buildStaticArray' :: (StaticElement e) => [e] -> String
|
||||
buildStaticArray' els = buildStaticArray (0,length els-1) els
|
||||
buildStaticArray' els = buildStaticArray (0,length els-1) els
|
||||
|
||||
@ -70,4 +70,4 @@ mapMember c DeadEnd = False
|
||||
mapMember c (LeafMap1 mp) = member c mp
|
||||
mapMember c (LeafMap2 mp) = member c mp
|
||||
mapMember c (LeafMap4 mp) = member c mp
|
||||
mapMember c _ = True
|
||||
mapMember c _ = True
|
||||
|
||||
@ -61,4 +61,4 @@ buildCharMap lst = let slst = sortBy (comparing (fst.charRange)) lst
|
||||
in "Node ("++show el++") ("++build' l bl (pred el)++") ("++
|
||||
build' r el br++")"
|
||||
|
||||
in build' grps minBound maxBound
|
||||
in build' grps minBound maxBound
|
||||
|
||||
@ -18,4 +18,4 @@ instance Encoding ASCII where
|
||||
encodeChar enc c
|
||||
| encodeable enc c = pushWord8 . fromIntegral . ord $ c
|
||||
| otherwise = throwException . HasNoRepresentation $ c
|
||||
encodeable _ c = c < '\128'
|
||||
encodeable _ c = c < '\128'
|
||||
|
||||
@ -98,4 +98,4 @@ decodeWithArray2 arr = do
|
||||
then throwException $ IllegalCharacter w1
|
||||
else return $ chr res
|
||||
)
|
||||
else throwException $ IllegalCharacter w1
|
||||
else throwException $ IllegalCharacter w1
|
||||
|
||||
@ -182,4 +182,4 @@ instance Encoding BootString where
|
||||
Nothing -> punyDecode base nbase
|
||||
Just ww -> throwException (IllegalCharacter ww)
|
||||
Nothing -> punyDecode [] wrds
|
||||
encodeable bs c = True -- XXX: hm, really?
|
||||
encodeable bs c = True -- XXX: hm, really?
|
||||
|
||||
@ -189,4 +189,4 @@ instance ByteSink (ReaderT Handle IO) where
|
||||
pushWord8 x = do
|
||||
h <- ask
|
||||
liftIO $ do
|
||||
hPutChar h (chr $ fromIntegral x)
|
||||
hPutChar h (chr $ fromIntegral x)
|
||||
|
||||
@ -49,4 +49,4 @@ instance ISO2022 ISO2022JP where
|
||||
| encodeable ASCII c = Just (DynEncoding ASCII,[27,40,66])
|
||||
| encodeable JISX0201 c = Just (DynEncoding JISX0201,[27,40,74])
|
||||
| encodeable JISX0208 c = Just (DynEncoding JISX0208,[27,36,66])
|
||||
| otherwise = Nothing
|
||||
| otherwise = Nothing
|
||||
|
||||
@ -20,4 +20,4 @@ instance Encoding ISO88591 where
|
||||
decodeChar _ = do
|
||||
w <- fetchWord8
|
||||
return (chr $ fromIntegral w)
|
||||
encodeable _ c = c <= '\255'
|
||||
encodeable _ c = c <= '\255'
|
||||
|
||||
@ -57,4 +57,4 @@ instance Encoding KOI8R where
|
||||
| otherwise = case lookup ch koi8rMap of
|
||||
Just w -> pushWord8 w
|
||||
Nothing -> throwException (HasNoRepresentation ch)
|
||||
encodeable _ c = member c koi8rMap
|
||||
encodeable _ c = member c koi8rMap
|
||||
|
||||
@ -57,4 +57,4 @@ instance Encoding KOI8U where
|
||||
| otherwise = case lookup ch koi8uMap of
|
||||
Just w -> pushWord8 w
|
||||
Nothing -> throwException (HasNoRepresentation ch)
|
||||
encodeable _ c = member c koi8uMap
|
||||
encodeable _ c = member c koi8uMap
|
||||
|
||||
@ -157,4 +157,4 @@ preprocessMapping tp src trg mods name = do
|
||||
," Just c -> return c"
|
||||
," encodeChar _ c = mapEncode c "++mpname
|
||||
," encodeable _ c = mapMember c "++mpname
|
||||
]
|
||||
]
|
||||
|
||||
@ -313,4 +313,4 @@ buildGroups ((c,bs):rest) = (EncodingGroup c end (bs:wrds)):buildGroups oth
|
||||
group n all@((c,bs):rest)
|
||||
| succ n == c = let (e,res,oth) = group c rest
|
||||
in (e,bs:res,oth)
|
||||
| otherwise = (n,[],all)
|
||||
| otherwise = (n,[],all)
|
||||
|
||||
@ -79,4 +79,4 @@ instance Encoding UTF16 where
|
||||
return (c:cs)
|
||||
Right bom -> decode bom
|
||||
decode enc = untilM sourceEmpty (decodeChar enc)
|
||||
encodeable _ c = (c > '\xDFFF' && c <= '\x10FFFF') || c < '\xD800'
|
||||
encodeable _ c = (c > '\xDFFF' && c <= '\x10FFFF') || c < '\xD800'
|
||||
|
||||
@ -44,4 +44,4 @@ instance Encoding UTF32 where
|
||||
rest <- untilM sourceEmpty (decodeChar UTF32)
|
||||
return ((chr $ fromIntegral ch):rest)
|
||||
decode enc = untilM sourceEmpty (decodeChar enc)
|
||||
encodeable _ _ = True
|
||||
encodeable _ _ = True
|
||||
|
||||
@ -25,4 +25,4 @@ member ind (StaticMap idx _) = lookup' 1
|
||||
else case compare ind (idx!n) of
|
||||
LT -> lookup' (n * 2)
|
||||
GT -> lookup' ((n * 2) + 1)
|
||||
EQ -> True
|
||||
EQ -> True
|
||||
|
||||
@ -64,4 +64,4 @@ instance StaticElement a => StaticElement (a,a,a,a) where
|
||||
x3 = extract addr (i *# 4# +# 2#)
|
||||
x4 = extract addr (i *# 4# +# 3#)
|
||||
in (x1,x2,x3,x4)
|
||||
gen (x1,x2,x3,x4) = gen x1 ++ gen x2 ++ gen x3 ++ gen x4
|
||||
gen (x1,x2,x3,x4) = gen x1 ++ gen x2 ++ gen x3 ++ gen x4
|
||||
|
||||
@ -79,4 +79,4 @@ decodingIdentity e wrd
|
||||
Right res' -> property (bstr==res')
|
||||
where
|
||||
bstr = BS.pack wrd
|
||||
decoded = decodeStrictByteStringExplicit e bstr
|
||||
decoded = decodeStrictByteStringExplicit e bstr
|
||||
|
||||
@ -282,4 +282,4 @@ gb18030Tests = TestList $ map test $
|
||||
|
||||
{-big5Tests :: Test
|
||||
big5Tests = test (EncodingFileTest BIG5 "data/BIG5" "data/BIG5.UTF-8")-}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user