Compiler dying with very strange message `drat' on black screen when
fusion turned on:
module utf
Start = 1
import StdEnv, StdMaybe
class indexBy i a e :: (a e) i -> e
:: Utf8Str a
= Utf8Compressed !{Int}
| Utf8Indexed !{Int} !{#Int}
:: Utf8Char = { uc :: !Int }
instance == Utf8Char where (==) {uc=a} {uc=b} = a == b
instance AsString (Utf8Str Utf8Char)
where
substring str sub = searchSubstring str sub
searchSubstring str sub
= search str 0 sub 0
where
search s i0 u j
#! i = i0 + j
| indexBy s i == indexBy u j = search s (i0 + 1) u 0
= search s i0 u (j + 1)
instance indexBy Int Utf8Str Utf8Char
where
indexBy a=:(Utf8Compressed _) i = indexBy a i
indexBy a=:(Utf8Indexed _ is) i = indexBy a i
class AsString s
where
substring :: s s -> Maybe Int
(all options are by defaut except `fusion')
_______________________________________________
clean-list mailing list
[email protected]
http://mailman.science.ru.nl/mailman/listinfo/clean-list