java-character (empty) → 0.0.1
raw patch · 22 files changed
+5180/−0 lines, 22 filesdep +basedep +containerssetup-changed
Dependencies added: base, containers
Files
- LICENSE +27/−0
- Setup.hs +3/−0
- java-character.cabal +57/−0
- src/Language/Java/Character.hs +21/−0
- src/Language/Java/Character/IsDefined.hs +459/−0
- src/Language/Java/Character/IsDigit.hs +85/−0
- src/Language/Java/Character/IsIdentifierIgnorable.hs +77/−0
- src/Language/Java/Character/IsIsoControl.hs +64/−0
- src/Language/Java/Character/IsJavaIdentifierPart.hs +502/−0
- src/Language/Java/Character/IsJavaIdentifierStart.hs +404/−0
- src/Language/Java/Character/IsLetter.hs +387/−0
- src/Language/Java/Character/IsLetterOrDigit.hs +406/−0
- src/Language/Java/Character/IsLowerCase.hs +486/−0
- src/Language/Java/Character/IsMirrored.hs +155/−0
- src/Language/Java/Character/IsSpaceChar.hs +71/−0
- src/Language/Java/Character/IsSupplementaryCodePoint.hs +404/−0
- src/Language/Java/Character/IsTitleCase.hs +72/−0
- src/Language/Java/Character/IsUnicodeIdentifierPart.hs +493/−0
- src/Language/Java/Character/IsUnicodeIdentifierStart.hs +390/−0
- src/Language/Java/Character/IsUpperCase.hs +483/−0
- src/Language/Java/Character/IsValidCodePoint.hs +63/−0
- src/Language/Java/Character/IsWhitespace.hs +71/−0
+ LICENSE view
@@ -0,0 +1,27 @@+Copyright 2012 Tony Morris++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions+are met:+1. Redistributions of source code must retain the above copyright+ notice, this list of conditions and the following disclaimer.+2. Redistributions in binary form must reproduce the above copyright+ notice, this list of conditions and the following disclaimer in the+ documentation and/or other materials provided with the distribution.+3. Neither the name of the author nor the names of his contributors+ may be used to endorse or promote products derived from this software+ without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF+SUCH DAMAGE.
+ Setup.hs view
@@ -0,0 +1,3 @@+import Distribution.Simple+main = defaultMain+
+ java-character.cabal view
@@ -0,0 +1,57 @@+Name: java-character+Version: 0.0.1+License: BSD3+License-File: LICENSE+Author: Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ>+Maintainer: Tony Morris+Copyright: Tony Morris+Synopsis: Functions to simulate Java's Character class.+Category: Development+Description: Functions to simulate the java.lang.Character class of Java. The specification of this class is required to implement some programming language grammars.+Homepage: https://github.com/tonymorris/java-character+Cabal-Version: >= 1.6+Build-Type: Simple++Source-Repository head+ Type: git+ Location: git@github.com:tonymorris/java-character.git++Flag small_base+ Description: Choose the new, split-up base package.++Library+ Build-Depends:+ base < 5 && >= 3+ , containers <= 0.4.0.0++ GHC-Options:+ -Wall++ Hs-Source-Dirs:+ src++ Exposed-Modules:+ Language.Java.Character+ Language.Java.Character.IsDefined+ Language.Java.Character.IsDigit+ Language.Java.Character.IsIdentifierIgnorable+ Language.Java.Character.IsIsoControl+ Language.Java.Character.IsJavaIdentifierPart+ Language.Java.Character.IsJavaIdentifierStart+ Language.Java.Character.IsLetter+ Language.Java.Character.IsLetterOrDigit+ Language.Java.Character.IsLowerCase+ Language.Java.Character.IsMirrored+ Language.Java.Character.IsSpaceChar+ Language.Java.Character.IsSupplementaryCodePoint+ Language.Java.Character.IsTitleCase+ Language.Java.Character.IsUnicodeIdentifierPart+ Language.Java.Character.IsUnicodeIdentifierStart+ Language.Java.Character.IsUpperCase+ Language.Java.Character.IsValidCodePoint+ Language.Java.Character.IsWhitespace++ GHC-Options:+ -Wall+ -funbox-strict-fields+
+ src/Language/Java/Character.hs view
@@ -0,0 +1,21 @@+-- | Simulates methods of @java.lang.Character@. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html>+module Language.Java.Character(module C) where++import Language.Java.Character.IsDefined as C+import Language.Java.Character.IsDigit as C+import Language.Java.Character.IsIdentifierIgnorable as C+import Language.Java.Character.IsIsoControl as C+import Language.Java.Character.IsJavaIdentifierPart as C+import Language.Java.Character.IsJavaIdentifierStart as C+import Language.Java.Character.IsLetter as C+import Language.Java.Character.IsLetterOrDigit as C+import Language.Java.Character.IsLowerCase as C+import Language.Java.Character.IsMirrored as C+import Language.Java.Character.IsSpaceChar as C+import Language.Java.Character.IsSupplementaryCodePoint as C+import Language.Java.Character.IsTitleCase as C+import Language.Java.Character.IsUnicodeIdentifierPart as C+import Language.Java.Character.IsUnicodeIdentifierStart as C+import Language.Java.Character.IsUpperCase as C+import Language.Java.Character.IsValidCodePoint as C+import Language.Java.Character.IsWhitespace as C
+ src/Language/Java/Character/IsDefined.hs view
@@ -0,0 +1,459 @@+-- | Simulates the @isDefined@ Java method. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isDefined%28int%29>+module Language.Java.Character.IsDefined+(+ IsDefined(..)+) where++import Data.Char+import Data.Fixed+import Data.Word+import Data.Set(Set)+import qualified Data.Set as S++-- | Instances simulate Java characters and provide a decision on simulating @isDefined@.+class Enum c => IsDefined c where+ isDefined ::+ c+ -> Bool+ isNotDefined ::+ c+ -> Bool+ isNotDefined =+ not . isDefined++instance IsDefined Char where+ isDefined c =+ ord c `S.member` isDefinedSet++instance IsDefined Int where+ isDefined c =+ c `S.member` isDefinedSet++instance IsDefined Integer where+ isDefined c =+ c `S.member` isDefinedSet++instance IsDefined Word8 where+ isDefined c =+ c `S.member` isDefinedSet++instance IsDefined Word16 where+ isDefined c =+ c `S.member` isDefinedSet++instance IsDefined Word32 where+ isDefined c =+ c `S.member` isDefinedSet++instance IsDefined Word64 where+ isDefined c =+ c `S.member` isDefinedSet++instance HasResolution a => IsDefined (Fixed a) where+ isDefined c =+ c `S.member` isDefinedSet++isDefinedSet ::+ (Num a, Enum a, Ord a) =>+ Set a+isDefinedSet =+ let r = [+ [0..566]+ , [592..855]+ , [861..879]+ , [884..885]+ , [890]+ , [894]+ , [900..906]+ , [908]+ , [910..929]+ , [931..974]+ , [976..1019]+ , [1024..1158]+ , [1160..1230]+ , [1232..1269]+ , [1272..1273]+ , [1280..1295]+ , [1329..1366]+ , [1369..1375]+ , [1377..1415]+ , [1417..1418]+ , [1425..1441]+ , [1443..1465]+ , [1467..1476]+ , [1488..1514]+ , [1520..1524]+ , [1536..1539]+ , [1548..1557]+ , [1563]+ , [1567]+ , [1569..1594]+ , [1600..1624]+ , [1632..1805]+ , [1807..1866]+ , [1869..1871]+ , [1920..1969]+ , [2305..2361]+ , [2364..2381]+ , [2384..2388]+ , [2392..2416]+ , [2433..2435]+ , [2437..2444]+ , [2447..2448]+ , [2451..2472]+ , [2474..2480]+ , [2482]+ , [2486..2489]+ , [2492..2500]+ , [2503..2504]+ , [2507..2509]+ , [2519]+ , [2524..2525]+ , [2527..2531]+ , [2534..2554]+ , [2561..2563]+ , [2565..2570]+ , [2575..2576]+ , [2579..2600]+ , [2602..2608]+ , [2610..2611]+ , [2613..2614]+ , [2616..2617]+ , [2620]+ , [2622..2626]+ , [2631..2632]+ , [2635..2637]+ , [2649..2652]+ , [2654]+ , [2662..2676]+ , [2689..2691]+ , [2693..2701]+ , [2703..2705]+ , [2707..2728]+ , [2730..2736]+ , [2738..2739]+ , [2741..2745]+ , [2748..2757]+ , [2759..2761]+ , [2763..2765]+ , [2768]+ , [2784..2787]+ , [2790..2799]+ , [2801]+ , [2817..2819]+ , [2821..2828]+ , [2831..2832]+ , [2835..2856]+ , [2858..2864]+ , [2866..2867]+ , [2869..2873]+ , [2876..2883]+ , [2887..2888]+ , [2891..2893]+ , [2902..2903]+ , [2908..2909]+ , [2911..2913]+ , [2918..2929]+ , [2946..2947]+ , [2949..2954]+ , [2958..2960]+ , [2962..2965]+ , [2969..2970]+ , [2972]+ , [2974..2975]+ , [2979..2980]+ , [2984..2986]+ , [2990..2997]+ , [2999..3001]+ , [3006..3010]+ , [3014..3016]+ , [3018..3021]+ , [3031]+ , [3047..3066]+ , [3073..3075]+ , [3077..3084]+ , [3086..3088]+ , [3090..3112]+ , [3114..3123]+ , [3125..3129]+ , [3134..3140]+ , [3142..3144]+ , [3146..3149]+ , [3157..3158]+ , [3168..3169]+ , [3174..3183]+ , [3202..3203]+ , [3205..3212]+ , [3214..3216]+ , [3218..3240]+ , [3242..3251]+ , [3253..3257]+ , [3260..3268]+ , [3270..3272]+ , [3274..3277]+ , [3285..3286]+ , [3294]+ , [3296..3297]+ , [3302..3311]+ , [3330..3331]+ , [3333..3340]+ , [3342..3344]+ , [3346..3368]+ , [3370..3385]+ , [3390..3395]+ , [3398..3400]+ , [3402..3405]+ , [3415]+ , [3424..3425]+ , [3430..3439]+ , [3458..3459]+ , [3461..3478]+ , [3482..3505]+ , [3507..3515]+ , [3517]+ , [3520..3526]+ , [3530]+ , [3535..3540]+ , [3542]+ , [3544..3551]+ , [3570..3572]+ , [3585..3642]+ , [3647..3675]+ , [3713..3714]+ , [3716]+ , [3719..3720]+ , [3722]+ , [3725]+ , [3732..3735]+ , [3737..3743]+ , [3745..3747]+ , [3749]+ , [3751]+ , [3754..3755]+ , [3757..3769]+ , [3771..3773]+ , [3776..3780]+ , [3782]+ , [3784..3789]+ , [3792..3801]+ , [3804..3805]+ , [3840..3911]+ , [3913..3946]+ , [3953..3979]+ , [3984..3991]+ , [3993..4028]+ , [4030..4044]+ , [4047]+ , [4096..4129]+ , [4131..4135]+ , [4137..4138]+ , [4140..4146]+ , [4150..4153]+ , [4160..4185]+ , [4256..4293]+ , [4304..4344]+ , [4347]+ , [4352..4441]+ , [4447..4514]+ , [4520..4601]+ , [4608..4614]+ , [4616..4678]+ , [4680]+ , [4682..4685]+ , [4688..4694]+ , [4696]+ , [4698..4701]+ , [4704..4742]+ , [4744]+ , [4746..4749]+ , [4752..4782]+ , [4784]+ , [4786..4789]+ , [4792..4798]+ , [4800]+ , [4802..4805]+ , [4808..4814]+ , [4816..4822]+ , [4824..4846]+ , [4848..4878]+ , [4880]+ , [4882..4885]+ , [4888..4894]+ , [4896..4934]+ , [4936..4954]+ , [4961..4988]+ , [5024..5108]+ , [5121..5750]+ , [5760..5788]+ , [5792..5872]+ , [5888..5900]+ , [5902..5908]+ , [5920..5942]+ , [5952..5971]+ , [5984..5996]+ , [5998..6000]+ , [6002..6003]+ , [6016..6109]+ , [6112..6121]+ , [6128..6137]+ , [6144..6158]+ , [6160..6169]+ , [6176..6263]+ , [6272..6313]+ , [6400..6428]+ , [6432..6443]+ , [6448..6459]+ , [6464]+ , [6468..6509]+ , [6512..6516]+ , [6624..6655]+ , [7424..7531]+ , [7680..7835]+ , [7840..7929]+ , [7936..7957]+ , [7960..7965]+ , [7968..8005]+ , [8008..8013]+ , [8016..8023]+ , [8025]+ , [8027]+ , [8029]+ , [8031..8061]+ , [8064..8116]+ , [8118..8132]+ , [8134..8147]+ , [8150..8155]+ , [8157..8175]+ , [8178..8180]+ , [8182..8190]+ , [8192..8276]+ , [8279]+ , [8287..8291]+ , [8298..8305]+ , [8308..8334]+ , [8352..8369]+ , [8400..8426]+ , [8448..8507]+ , [8509..8523]+ , [8531..8579]+ , [8592..9168]+ , [9216..9254]+ , [9280..9290]+ , [9312..9751]+ , [9753..9853]+ , [9856..9873]+ , [9888..9889]+ , [9985..9988]+ , [9990..9993]+ , [9996..10023]+ , [10025..10059]+ , [10061]+ , [10063..10066]+ , [10070]+ , [10072..10078]+ , [10081..10132]+ , [10136..10159]+ , [10161..10174]+ , [10192..10219]+ , [10224..11021]+ , [11904..11929]+ , [11931..12019]+ , [12032..12245]+ , [12272..12283]+ , [12288..12351]+ , [12353..12438]+ , [12441..12543]+ , [12549..12588]+ , [12593..12686]+ , [12688..12727]+ , [12784..12830]+ , [12832..12867]+ , [12880..12925]+ , [12927..13054]+ , [13056..19893]+ , [19904..40869]+ , [40960..42124]+ , [42128..42182]+ , [44032..55203]+ , [55296..64045]+ , [64048..64106]+ , [64256..64262]+ , [64275..64279]+ , [64285..64310]+ , [64312..64316]+ , [64318]+ , [64320..64321]+ , [64323..64324]+ , [64326..64433]+ , [64467..64831]+ , [64848..64911]+ , [64914..64967]+ , [65008..65021]+ , [65024..65039]+ , [65056..65059]+ , [65072..65106]+ , [65108..65126]+ , [65128..65131]+ , [65136..65140]+ , [65142..65276]+ , [65279]+ , [65281..65470]+ , [65474..65479]+ , [65482..65487]+ , [65490..65495]+ , [65498..65500]+ , [65504..65510]+ , [65512..65518]+ , [65529..65533]+ , [65536..65547]+ , [65549..65574]+ , [65576..65594]+ , [65596..65597]+ , [65599..65613]+ , [65616..65629]+ , [65664..65786]+ , [65792..65794]+ , [65799..65843]+ , [65847..65855]+ , [66304..66334]+ , [66336..66339]+ , [66352..66378]+ , [66432..66461]+ , [66463]+ , [66560..66717]+ , [66720..66729]+ , [67584..67589]+ , [67592]+ , [67594..67637]+ , [67639..67640]+ , [67644]+ , [67647]+ , [118784..119029]+ , [119040..119078]+ , [119082..119261]+ , [119552..119638]+ , [119808..119892]+ , [119894..119964]+ , [119966..119967]+ , [119970]+ , [119973..119974]+ , [119977..119980]+ , [119982..119993]+ , [119995]+ , [119997..120003]+ , [120005..120069]+ , [120071..120074]+ , [120077..120084]+ , [120086..120092]+ , [120094..120121]+ , [120123..120126]+ , [120128..120132]+ , [120134]+ , [120138..120144]+ , [120146..120483]+ , [120488..120777]+ , [120782..120831]+ , [131072..173782]+ , [194560..195101]+ ]+ in S.fromList . concat $ r
+ src/Language/Java/Character/IsDigit.hs view
@@ -0,0 +1,85 @@+-- | Simulates the @isDefined@ Java method. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isDigit%28int%29>+module Language.Java.Character.IsDigit+(+ IsDigit(..)+) where++import Data.Char hiding (isDigit)+import Data.Fixed+import Data.Word+import Data.Set(Set)+import qualified Data.Set as S++-- | Instances simulate Java characters and provide a decision on simulating @isDigit@.+class Enum c => IsDigit c where+ isDigit ::+ c+ -> Bool+ isNotDigit ::+ c+ -> Bool+ isNotDigit =+ not . isDigit++instance IsDigit Char where+ isDigit c =+ ord c `S.member` isDigitSet++instance IsDigit Int where+ isDigit c =+ c `S.member` isDigitSet++instance IsDigit Integer where+ isDigit c =+ c `S.member` isDigitSet++instance IsDigit Word8 where+ isDigit c =+ c `S.member` isDigitSet++instance IsDigit Word16 where+ isDigit c =+ c `S.member` isDigitSet++instance IsDigit Word32 where+ isDigit c =+ c `S.member` isDigitSet++instance IsDigit Word64 where+ isDigit c =+ c `S.member` isDigitSet++instance HasResolution a => IsDigit (Fixed a) where+ isDigit c =+ c `S.member` isDigitSet++isDigitSet ::+ (Num a, Enum a, Ord a) =>+ Set a+isDigitSet =+ let r = [+ [48..57]+ , [1632..1641]+ , [1776..1785]+ , [2406..2415]+ , [2534..2543]+ , [2662..2671]+ , [2790..2799]+ , [2918..2927]+ , [3047..3055]+ , [3174..3183]+ , [3302..3311]+ , [3430..3439]+ , [3664..3673]+ , [3792..3801]+ , [3872..3881]+ , [4160..4169]+ , [4969..4977]+ , [6112..6121]+ , [6160..6169]+ , [6470..6479]+ , [65296..65305]+ , [66720..66729]+ , [120782..120831]+ ]+ in S.fromList . concat $ r
+ src/Language/Java/Character/IsIdentifierIgnorable.hs view
@@ -0,0 +1,77 @@+-- | Simulates the @isDefined@ Java method. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isIdentifierIgnorable%28int%29>+module Language.Java.Character.IsIdentifierIgnorable+(+ IsIdentifierIgnorable(..)+) where++import Data.Char+import Data.Fixed+import Data.Word+import Data.Set(Set)+import qualified Data.Set as S++-- | Instances simulate Java characters and provide a decision on simulating @isIdentifierIgnorable@.+class Enum c => IsIdentifierIgnorable c where+ isIdentifierIgnorable ::+ c+ -> Bool+ isNotIdentifierIgnorable ::+ c+ -> Bool+ isNotIdentifierIgnorable =+ not . isIdentifierIgnorable++instance IsIdentifierIgnorable Char where+ isIdentifierIgnorable c =+ ord c `S.member` isIdentifierIgnorableSet++instance IsIdentifierIgnorable Int where+ isIdentifierIgnorable c =+ c `S.member` isIdentifierIgnorableSet++instance IsIdentifierIgnorable Integer where+ isIdentifierIgnorable c =+ c `S.member` isIdentifierIgnorableSet++instance IsIdentifierIgnorable Word8 where+ isIdentifierIgnorable c =+ c `S.member` isIdentifierIgnorableSet++instance IsIdentifierIgnorable Word16 where+ isIdentifierIgnorable c =+ c `S.member` isIdentifierIgnorableSet++instance IsIdentifierIgnorable Word32 where+ isIdentifierIgnorable c =+ c `S.member` isIdentifierIgnorableSet++instance IsIdentifierIgnorable Word64 where+ isIdentifierIgnorable c =+ c `S.member` isIdentifierIgnorableSet++instance HasResolution a => IsIdentifierIgnorable (Fixed a) where+ isIdentifierIgnorable c =+ c `S.member` isIdentifierIgnorableSet++isIdentifierIgnorableSet ::+ (Num a, Enum a, Ord a) =>+ Set a+isIdentifierIgnorableSet =+ let r = [+ [0..8]+ , [14..27]+ , [127..159]+ , [173]+ , [1536..1539]+ , [1757]+ , [1807]+ , [6068..6069]+ , [8204..8207]+ , [8234..8238]+ , [8288..8291]+ , [8298..8303]+ , [65279]+ , [65529..65531]+ , [119155..119162]+ ]+ in S.fromList . concat $ r
+ src/Language/Java/Character/IsIsoControl.hs view
@@ -0,0 +1,64 @@+-- | Simulates the @isDefined@ Java method. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isISOControl%28int%29>+module Language.Java.Character.IsIsoControl+(+ IsIsoControl(..)+) where++import Data.Char+import Data.Fixed+import Data.Word+import Data.Set(Set)+import qualified Data.Set as S++-- | Instances simulate Java characters and provide a decision on simulating @isISOControl@.+class Enum c => IsIsoControl c where+ isIsoControl ::+ c+ -> Bool+ isNotIsoControl ::+ c+ -> Bool+ isNotIsoControl =+ not . isIsoControl++instance IsIsoControl Char where+ isIsoControl c =+ ord c `S.member` isIsoControlSet++instance IsIsoControl Int where+ isIsoControl c =+ c `S.member` isIsoControlSet++instance IsIsoControl Integer where+ isIsoControl c =+ c `S.member` isIsoControlSet++instance IsIsoControl Word8 where+ isIsoControl c =+ c `S.member` isIsoControlSet++instance IsIsoControl Word16 where+ isIsoControl c =+ c `S.member` isIsoControlSet++instance IsIsoControl Word32 where+ isIsoControl c =+ c `S.member` isIsoControlSet++instance IsIsoControl Word64 where+ isIsoControl c =+ c `S.member` isIsoControlSet++instance HasResolution a => IsIsoControl (Fixed a) where+ isIsoControl c =+ c `S.member` isIsoControlSet++isIsoControlSet ::+ (Num a, Enum a, Ord a) =>+ Set a+isIsoControlSet =+ let r = [+ [0..31]+ , [127..159]+ ]+ in S.fromList . concat $ r
+ src/Language/Java/Character/IsJavaIdentifierPart.hs view
@@ -0,0 +1,502 @@+-- | Simulates the @isDefined@ Java method. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isJavaIdentifierPart%28int%29>+module Language.Java.Character.IsJavaIdentifierPart+(+ IsJavaIdentifierPart(..)+) where++import Data.Char+import Data.Fixed+import Data.Word+import Data.Set(Set)+import qualified Data.Set as S++-- | Instances simulate Java characters and provide a decision on simulating @isJavaIdentifierPart@.+class Enum c => IsJavaIdentifierPart c where+ isJavaIdentifierPart ::+ c+ -> Bool+ isNotJavaIdentifierPart ::+ c+ -> Bool+ isNotJavaIdentifierPart =+ not . isJavaIdentifierPart++instance IsJavaIdentifierPart Char where+ isJavaIdentifierPart c =+ ord c `S.member` isJavaIdentifierPartSet++instance IsJavaIdentifierPart Int where+ isJavaIdentifierPart c =+ c `S.member` isJavaIdentifierPartSet++instance IsJavaIdentifierPart Integer where+ isJavaIdentifierPart c =+ c `S.member` isJavaIdentifierPartSet++instance IsJavaIdentifierPart Word8 where+ isJavaIdentifierPart c =+ c `S.member` isJavaIdentifierPartSet++instance IsJavaIdentifierPart Word16 where+ isJavaIdentifierPart c =+ c `S.member` isJavaIdentifierPartSet++instance IsJavaIdentifierPart Word32 where+ isJavaIdentifierPart c =+ c `S.member` isJavaIdentifierPartSet++instance IsJavaIdentifierPart Word64 where+ isJavaIdentifierPart c =+ c `S.member` isJavaIdentifierPartSet++instance HasResolution a => IsJavaIdentifierPart (Fixed a) where+ isJavaIdentifierPart c =+ c `S.member` isJavaIdentifierPartSet++isJavaIdentifierPartSet ::+ (Num a, Enum a, Ord a) =>+ Set a+isJavaIdentifierPartSet =+ let r = [+ [0..8]+ , [14..27]+ , [36]+ , [48..57]+ , [65..90]+ , [95]+ , [97..122]+ , [127..159]+ , [162..165]+ , [170]+ , [173]+ , [181]+ , [186]+ , [192..214]+ , [216..246]+ , [248..566]+ , [592..705]+ , [710..721]+ , [736..740]+ , [750]+ , [768..855]+ , [861..879]+ , [890]+ , [902]+ , [904..906]+ , [908]+ , [910..929]+ , [931..974]+ , [976..1013]+ , [1015..1019]+ , [1024..1153]+ , [1155..1158]+ , [1162..1230]+ , [1232..1269]+ , [1272..1273]+ , [1280..1295]+ , [1329..1366]+ , [1369]+ , [1377..1415]+ , [1425..1441]+ , [1443..1465]+ , [1467..1469]+ , [1471]+ , [1473..1474]+ , [1476]+ , [1488..1514]+ , [1520..1522]+ , [1536..1539]+ , [1552..1557]+ , [1569..1594]+ , [1600..1624]+ , [1632..1641]+ , [1646..1747]+ , [1749..1757]+ , [1759..1768]+ , [1770..1788]+ , [1791]+ , [1807..1866]+ , [1869..1871]+ , [1920..1969]+ , [2305..2361]+ , [2364..2381]+ , [2384..2388]+ , [2392..2403]+ , [2406..2415]+ , [2433..2435]+ , [2437..2444]+ , [2447..2448]+ , [2451..2472]+ , [2474..2480]+ , [2482]+ , [2486..2489]+ , [2492..2500]+ , [2503..2504]+ , [2507..2509]+ , [2519]+ , [2524..2525]+ , [2527..2531]+ , [2534..2547]+ , [2561..2563]+ , [2565..2570]+ , [2575..2576]+ , [2579..2600]+ , [2602..2608]+ , [2610..2611]+ , [2613..2614]+ , [2616..2617]+ , [2620]+ , [2622..2626]+ , [2631..2632]+ , [2635..2637]+ , [2649..2652]+ , [2654]+ , [2662..2676]+ , [2689..2691]+ , [2693..2701]+ , [2703..2705]+ , [2707..2728]+ , [2730..2736]+ , [2738..2739]+ , [2741..2745]+ , [2748..2757]+ , [2759..2761]+ , [2763..2765]+ , [2768]+ , [2784..2787]+ , [2790..2799]+ , [2801]+ , [2817..2819]+ , [2821..2828]+ , [2831..2832]+ , [2835..2856]+ , [2858..2864]+ , [2866..2867]+ , [2869..2873]+ , [2876..2883]+ , [2887..2888]+ , [2891..2893]+ , [2902..2903]+ , [2908..2909]+ , [2911..2913]+ , [2918..2927]+ , [2929]+ , [2946..2947]+ , [2949..2954]+ , [2958..2960]+ , [2962..2965]+ , [2969..2970]+ , [2972]+ , [2974..2975]+ , [2979..2980]+ , [2984..2986]+ , [2990..2997]+ , [2999..3001]+ , [3006..3010]+ , [3014..3016]+ , [3018..3021]+ , [3031]+ , [3047..3055]+ , [3065]+ , [3073..3075]+ , [3077..3084]+ , [3086..3088]+ , [3090..3112]+ , [3114..3123]+ , [3125..3129]+ , [3134..3140]+ , [3142..3144]+ , [3146..3149]+ , [3157..3158]+ , [3168..3169]+ , [3174..3183]+ , [3202..3203]+ , [3205..3212]+ , [3214..3216]+ , [3218..3240]+ , [3242..3251]+ , [3253..3257]+ , [3260..3268]+ , [3270..3272]+ , [3274..3277]+ , [3285..3286]+ , [3294]+ , [3296..3297]+ , [3302..3311]+ , [3330..3331]+ , [3333..3340]+ , [3342..3344]+ , [3346..3368]+ , [3370..3385]+ , [3390..3395]+ , [3398..3400]+ , [3402..3405]+ , [3415]+ , [3424..3425]+ , [3430..3439]+ , [3458..3459]+ , [3461..3478]+ , [3482..3505]+ , [3507..3515]+ , [3517]+ , [3520..3526]+ , [3530]+ , [3535..3540]+ , [3542]+ , [3544..3551]+ , [3570..3571]+ , [3585..3642]+ , [3647..3662]+ , [3664..3673]+ , [3713..3714]+ , [3716]+ , [3719..3720]+ , [3722]+ , [3725]+ , [3732..3735]+ , [3737..3743]+ , [3745..3747]+ , [3749]+ , [3751]+ , [3754..3755]+ , [3757..3769]+ , [3771..3773]+ , [3776..3780]+ , [3782]+ , [3784..3789]+ , [3792..3801]+ , [3804..3805]+ , [3840]+ , [3864..3865]+ , [3872..3881]+ , [3893]+ , [3895]+ , [3897]+ , [3902..3911]+ , [3913..3946]+ , [3953..3972]+ , [3974..3979]+ , [3984..3991]+ , [3993..4028]+ , [4038]+ , [4096..4129]+ , [4131..4135]+ , [4137..4138]+ , [4140..4146]+ , [4150..4153]+ , [4160..4169]+ , [4176..4185]+ , [4256..4293]+ , [4304..4344]+ , [4352..4441]+ , [4447..4514]+ , [4520..4601]+ , [4608..4614]+ , [4616..4678]+ , [4680]+ , [4682..4685]+ , [4688..4694]+ , [4696]+ , [4698..4701]+ , [4704..4742]+ , [4744]+ , [4746..4749]+ , [4752..4782]+ , [4784]+ , [4786..4789]+ , [4792..4798]+ , [4800]+ , [4802..4805]+ , [4808..4814]+ , [4816..4822]+ , [4824..4846]+ , [4848..4878]+ , [4880]+ , [4882..4885]+ , [4888..4894]+ , [4896..4934]+ , [4936..4954]+ , [4969..4977]+ , [5024..5108]+ , [5121..5740]+ , [5743..5750]+ , [5761..5786]+ , [5792..5866]+ , [5870..5872]+ , [5888..5900]+ , [5902..5908]+ , [5920..5940]+ , [5952..5971]+ , [5984..5996]+ , [5998..6000]+ , [6002..6003]+ , [6016..6099]+ , [6103]+ , [6107..6109]+ , [6112..6121]+ , [6155..6157]+ , [6160..6169]+ , [6176..6263]+ , [6272..6313]+ , [6400..6428]+ , [6432..6443]+ , [6448..6459]+ , [6470..6509]+ , [6512..6516]+ , [7424..7531]+ , [7680..7835]+ , [7840..7929]+ , [7936..7957]+ , [7960..7965]+ , [7968..8005]+ , [8008..8013]+ , [8016..8023]+ , [8025]+ , [8027]+ , [8029]+ , [8031..8061]+ , [8064..8116]+ , [8118..8124]+ , [8126]+ , [8130..8132]+ , [8134..8140]+ , [8144..8147]+ , [8150..8155]+ , [8160..8172]+ , [8178..8180]+ , [8182..8188]+ , [8204..8207]+ , [8234..8238]+ , [8255..8256]+ , [8276]+ , [8288..8291]+ , [8298..8303]+ , [8305]+ , [8319]+ , [8352..8369]+ , [8400..8412]+ , [8417]+ , [8421..8426]+ , [8450]+ , [8455]+ , [8458..8467]+ , [8469]+ , [8473..8477]+ , [8484]+ , [8486]+ , [8488]+ , [8490..8493]+ , [8495..8497]+ , [8499..8505]+ , [8509..8511]+ , [8517..8521]+ , [8544..8579]+ , [12293..12295]+ , [12321..12335]+ , [12337..12341]+ , [12344..12348]+ , [12353..12438]+ , [12441..12442]+ , [12445..12447]+ , [12449..12543]+ , [12549..12588]+ , [12593..12686]+ , [12704..12727]+ , [12784..12799]+ , [13312..19893]+ , [19968..40869]+ , [40960..42124]+ , [44032..55203]+ , [63744..64045]+ , [64048..64106]+ , [64256..64262]+ , [64275..64279]+ , [64285..64296]+ , [64298..64310]+ , [64312..64316]+ , [64318]+ , [64320..64321]+ , [64323..64324]+ , [64326..64433]+ , [64467..64829]+ , [64848..64911]+ , [64914..64967]+ , [65008..65020]+ , [65024..65039]+ , [65056..65059]+ , [65075..65076]+ , [65101..65103]+ , [65129]+ , [65136..65140]+ , [65142..65276]+ , [65279]+ , [65284]+ , [65296..65305]+ , [65313..65338]+ , [65343]+ , [65345..65370]+ , [65381..65470]+ , [65474..65479]+ , [65482..65487]+ , [65490..65495]+ , [65498..65500]+ , [65504..65505]+ , [65509..65510]+ , [65529..65531]+ , [65536..65547]+ , [65549..65574]+ , [65576..65594]+ , [65596..65597]+ , [65599..65613]+ , [65616..65629]+ , [65664..65786]+ , [66304..66334]+ , [66352..66378]+ , [66432..66461]+ , [66560..66717]+ , [66720..66729]+ , [67584..67589]+ , [67592]+ , [67594..67637]+ , [67639..67640]+ , [67644]+ , [67647]+ , [119141..119145]+ , [119149..119170]+ , [119173..119179]+ , [119210..119213]+ , [119808..119892]+ , [119894..119964]+ , [119966..119967]+ , [119970]+ , [119973..119974]+ , [119977..119980]+ , [119982..119993]+ , [119995]+ , [119997..120003]+ , [120005..120069]+ , [120071..120074]+ , [120077..120084]+ , [120086..120092]+ , [120094..120121]+ , [120123..120126]+ , [120128..120132]+ , [120134]+ , [120138..120144]+ , [120146..120483]+ , [120488..120512]+ , [120514..120538]+ , [120540..120570]+ , [120572..120596]+ , [120598..120628]+ , [120630..120654]+ , [120656..120686]+ , [120688..120712]+ , [120714..120744]+ , [120746..120770]+ , [120772..120777]+ , [120782..120831]+ , [131072..173782]+ , [194560..195101]+ ]+ in S.fromList . concat $ r
+ src/Language/Java/Character/IsJavaIdentifierStart.hs view
@@ -0,0 +1,404 @@+-- | Simulates the @isDefined@ Java method. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isJavaIdentifierStart%28int%29>+module Language.Java.Character.IsJavaIdentifierStart+(+ IsJavaIdentifierStart(..)+) where++import Data.Char+import Data.Fixed+import Data.Word+import Data.Set(Set)+import qualified Data.Set as S++-- | Instances simulate Java characters and provide a decision on simulating @isJavaIdentifierStart@.+class Enum c => IsJavaIdentifierStart c where+ isJavaIdentifierStart ::+ c+ -> Bool+ isNotJavaIdentifierStart ::+ c+ -> Bool+ isNotJavaIdentifierStart =+ not . isJavaIdentifierStart++instance IsJavaIdentifierStart Char where+ isJavaIdentifierStart c =+ ord c `S.member` isJavaIdentifierStartSet++instance IsJavaIdentifierStart Int where+ isJavaIdentifierStart c =+ c `S.member` isJavaIdentifierStartSet++instance IsJavaIdentifierStart Integer where+ isJavaIdentifierStart c =+ c `S.member` isJavaIdentifierStartSet++instance IsJavaIdentifierStart Word8 where+ isJavaIdentifierStart c =+ c `S.member` isJavaIdentifierStartSet++instance IsJavaIdentifierStart Word16 where+ isJavaIdentifierStart c =+ c `S.member` isJavaIdentifierStartSet++instance IsJavaIdentifierStart Word32 where+ isJavaIdentifierStart c =+ c `S.member` isJavaIdentifierStartSet++instance IsJavaIdentifierStart Word64 where+ isJavaIdentifierStart c =+ c `S.member` isJavaIdentifierStartSet++instance HasResolution a => IsJavaIdentifierStart (Fixed a) where+ isJavaIdentifierStart c =+ c `S.member` isJavaIdentifierStartSet++isJavaIdentifierStartSet ::+ (Num a, Enum a, Ord a) =>+ Set a+isJavaIdentifierStartSet =+ let r = [+ [36]+ , [65..90]+ , [95]+ , [97..122]+ , [162..165]+ , [170]+ , [181]+ , [186]+ , [192..214]+ , [216..246]+ , [248..566]+ , [592..705]+ , [710..721]+ , [736..740]+ , [750]+ , [890]+ , [902]+ , [904..906]+ , [908]+ , [910..929]+ , [931..974]+ , [976..1013]+ , [1015..1019]+ , [1024..1153]+ , [1162..1230]+ , [1232..1269]+ , [1272..1273]+ , [1280..1295]+ , [1329..1366]+ , [1369]+ , [1377..1415]+ , [1488..1514]+ , [1520..1522]+ , [1569..1594]+ , [1600..1610]+ , [1646..1647]+ , [1649..1747]+ , [1749]+ , [1765..1766]+ , [1774..1775]+ , [1786..1788]+ , [1791]+ , [1808]+ , [1810..1839]+ , [1869..1871]+ , [1920..1957]+ , [1969]+ , [2308..2361]+ , [2365]+ , [2384]+ , [2392..2401]+ , [2437..2444]+ , [2447..2448]+ , [2451..2472]+ , [2474..2480]+ , [2482]+ , [2486..2489]+ , [2493]+ , [2524..2525]+ , [2527..2529]+ , [2544..2547]+ , [2565..2570]+ , [2575..2576]+ , [2579..2600]+ , [2602..2608]+ , [2610..2611]+ , [2613..2614]+ , [2616..2617]+ , [2649..2652]+ , [2654]+ , [2674..2676]+ , [2693..2701]+ , [2703..2705]+ , [2707..2728]+ , [2730..2736]+ , [2738..2739]+ , [2741..2745]+ , [2749]+ , [2768]+ , [2784..2785]+ , [2801]+ , [2821..2828]+ , [2831..2832]+ , [2835..2856]+ , [2858..2864]+ , [2866..2867]+ , [2869..2873]+ , [2877]+ , [2908..2909]+ , [2911..2913]+ , [2929]+ , [2947]+ , [2949..2954]+ , [2958..2960]+ , [2962..2965]+ , [2969..2970]+ , [2972]+ , [2974..2975]+ , [2979..2980]+ , [2984..2986]+ , [2990..2997]+ , [2999..3001]+ , [3065]+ , [3077..3084]+ , [3086..3088]+ , [3090..3112]+ , [3114..3123]+ , [3125..3129]+ , [3168..3169]+ , [3205..3212]+ , [3214..3216]+ , [3218..3240]+ , [3242..3251]+ , [3253..3257]+ , [3261]+ , [3294]+ , [3296..3297]+ , [3333..3340]+ , [3342..3344]+ , [3346..3368]+ , [3370..3385]+ , [3424..3425]+ , [3461..3478]+ , [3482..3505]+ , [3507..3515]+ , [3517]+ , [3520..3526]+ , [3585..3632]+ , [3634..3635]+ , [3647..3654]+ , [3713..3714]+ , [3716]+ , [3719..3720]+ , [3722]+ , [3725]+ , [3732..3735]+ , [3737..3743]+ , [3745..3747]+ , [3749]+ , [3751]+ , [3754..3755]+ , [3757..3760]+ , [3762..3763]+ , [3773]+ , [3776..3780]+ , [3782]+ , [3804..3805]+ , [3840]+ , [3904..3911]+ , [3913..3946]+ , [3976..3979]+ , [4096..4129]+ , [4131..4135]+ , [4137..4138]+ , [4176..4181]+ , [4256..4293]+ , [4304..4344]+ , [4352..4441]+ , [4447..4514]+ , [4520..4601]+ , [4608..4614]+ , [4616..4678]+ , [4680]+ , [4682..4685]+ , [4688..4694]+ , [4696]+ , [4698..4701]+ , [4704..4742]+ , [4744]+ , [4746..4749]+ , [4752..4782]+ , [4784]+ , [4786..4789]+ , [4792..4798]+ , [4800]+ , [4802..4805]+ , [4808..4814]+ , [4816..4822]+ , [4824..4846]+ , [4848..4878]+ , [4880]+ , [4882..4885]+ , [4888..4894]+ , [4896..4934]+ , [4936..4954]+ , [5024..5108]+ , [5121..5740]+ , [5743..5750]+ , [5761..5786]+ , [5792..5866]+ , [5870..5872]+ , [5888..5900]+ , [5902..5905]+ , [5920..5937]+ , [5952..5969]+ , [5984..5996]+ , [5998..6000]+ , [6016..6067]+ , [6103]+ , [6107..6108]+ , [6176..6263]+ , [6272..6312]+ , [6400..6428]+ , [6480..6509]+ , [6512..6516]+ , [7424..7531]+ , [7680..7835]+ , [7840..7929]+ , [7936..7957]+ , [7960..7965]+ , [7968..8005]+ , [8008..8013]+ , [8016..8023]+ , [8025]+ , [8027]+ , [8029]+ , [8031..8061]+ , [8064..8116]+ , [8118..8124]+ , [8126]+ , [8130..8132]+ , [8134..8140]+ , [8144..8147]+ , [8150..8155]+ , [8160..8172]+ , [8178..8180]+ , [8182..8188]+ , [8255..8256]+ , [8276]+ , [8305]+ , [8319]+ , [8352..8369]+ , [8450]+ , [8455]+ , [8458..8467]+ , [8469]+ , [8473..8477]+ , [8484]+ , [8486]+ , [8488]+ , [8490..8493]+ , [8495..8497]+ , [8499..8505]+ , [8509..8511]+ , [8517..8521]+ , [8544..8579]+ , [12293..12295]+ , [12321..12329]+ , [12337..12341]+ , [12344..12348]+ , [12353..12438]+ , [12445..12447]+ , [12449..12543]+ , [12549..12588]+ , [12593..12686]+ , [12704..12727]+ , [12784..12799]+ , [13312..19893]+ , [19968..40869]+ , [40960..42124]+ , [44032..55203]+ , [63744..64045]+ , [64048..64106]+ , [64256..64262]+ , [64275..64279]+ , [64285]+ , [64287..64296]+ , [64298..64310]+ , [64312..64316]+ , [64318]+ , [64320..64321]+ , [64323..64324]+ , [64326..64433]+ , [64467..64829]+ , [64848..64911]+ , [64914..64967]+ , [65008..65020]+ , [65075..65076]+ , [65101..65103]+ , [65129]+ , [65136..65140]+ , [65142..65276]+ , [65284]+ , [65313..65338]+ , [65343]+ , [65345..65370]+ , [65381..65470]+ , [65474..65479]+ , [65482..65487]+ , [65490..65495]+ , [65498..65500]+ , [65504..65505]+ , [65509..65510]+ , [65536..65547]+ , [65549..65574]+ , [65576..65594]+ , [65596..65597]+ , [65599..65613]+ , [65616..65629]+ , [65664..65786]+ , [66304..66334]+ , [66352..66378]+ , [66432..66461]+ , [66560..66717]+ , [67584..67589]+ , [67592]+ , [67594..67637]+ , [67639..67640]+ , [67644]+ , [67647]+ , [119808..119892]+ , [119894..119964]+ , [119966..119967]+ , [119970]+ , [119973..119974]+ , [119977..119980]+ , [119982..119993]+ , [119995]+ , [119997..120003]+ , [120005..120069]+ , [120071..120074]+ , [120077..120084]+ , [120086..120092]+ , [120094..120121]+ , [120123..120126]+ , [120128..120132]+ , [120134]+ , [120138..120144]+ , [120146..120483]+ , [120488..120512]+ , [120514..120538]+ , [120540..120570]+ , [120572..120596]+ , [120598..120628]+ , [120630..120654]+ , [120656..120686]+ , [120688..120712]+ , [120714..120744]+ , [120746..120770]+ , [120772..120777]+ , [131072..173782]+ , [194560..195101]+ ]+ in S.fromList . concat $ r
+ src/Language/Java/Character/IsLetter.hs view
@@ -0,0 +1,387 @@+-- | Simulates the @isDefined@ Java method. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isLetter%28int%29>+module Language.Java.Character.IsLetter+(+ IsLetter(..)+) where++import Data.Char hiding (isLetter)+import Data.Fixed+import Data.Word+import Data.Set(Set)+import qualified Data.Set as S++-- | Instances simulate Java characters and provide a decision on simulating @isLetter@.+class Enum c => IsLetter c where+ isLetter ::+ c+ -> Bool+ isNotLetter ::+ c+ -> Bool+ isNotLetter =+ not . isLetter++instance IsLetter Char where+ isLetter c =+ ord c `S.member` isLetterSet++instance IsLetter Int where+ isLetter c =+ c `S.member` isLetterSet++instance IsLetter Integer where+ isLetter c =+ c `S.member` isLetterSet++instance IsLetter Word8 where+ isLetter c =+ c `S.member` isLetterSet++instance IsLetter Word16 where+ isLetter c =+ c `S.member` isLetterSet++instance IsLetter Word32 where+ isLetter c =+ c `S.member` isLetterSet++instance IsLetter Word64 where+ isLetter c =+ c `S.member` isLetterSet++instance HasResolution a => IsLetter (Fixed a) where+ isLetter c =+ c `S.member` isLetterSet++isLetterSet ::+ (Num a, Enum a, Ord a) =>+ Set a+isLetterSet =+ let r = [+ [65..90]+ , [97..122]+ , [170]+ , [181]+ , [186]+ , [192..214]+ , [216..246]+ , [248..566]+ , [592..705]+ , [710..721]+ , [736..740]+ , [750]+ , [890]+ , [902]+ , [904..906]+ , [908]+ , [910..929]+ , [931..974]+ , [976..1013]+ , [1015..1019]+ , [1024..1153]+ , [1162..1230]+ , [1232..1269]+ , [1272..1273]+ , [1280..1295]+ , [1329..1366]+ , [1369]+ , [1377..1415]+ , [1488..1514]+ , [1520..1522]+ , [1569..1594]+ , [1600..1610]+ , [1646..1647]+ , [1649..1747]+ , [1749]+ , [1765..1766]+ , [1774..1775]+ , [1786..1788]+ , [1791]+ , [1808]+ , [1810..1839]+ , [1869..1871]+ , [1920..1957]+ , [1969]+ , [2308..2361]+ , [2365]+ , [2384]+ , [2392..2401]+ , [2437..2444]+ , [2447..2448]+ , [2451..2472]+ , [2474..2480]+ , [2482]+ , [2486..2489]+ , [2493]+ , [2524..2525]+ , [2527..2529]+ , [2544..2545]+ , [2565..2570]+ , [2575..2576]+ , [2579..2600]+ , [2602..2608]+ , [2610..2611]+ , [2613..2614]+ , [2616..2617]+ , [2649..2652]+ , [2654]+ , [2674..2676]+ , [2693..2701]+ , [2703..2705]+ , [2707..2728]+ , [2730..2736]+ , [2738..2739]+ , [2741..2745]+ , [2749]+ , [2768]+ , [2784..2785]+ , [2821..2828]+ , [2831..2832]+ , [2835..2856]+ , [2858..2864]+ , [2866..2867]+ , [2869..2873]+ , [2877]+ , [2908..2909]+ , [2911..2913]+ , [2929]+ , [2947]+ , [2949..2954]+ , [2958..2960]+ , [2962..2965]+ , [2969..2970]+ , [2972]+ , [2974..2975]+ , [2979..2980]+ , [2984..2986]+ , [2990..2997]+ , [2999..3001]+ , [3077..3084]+ , [3086..3088]+ , [3090..3112]+ , [3114..3123]+ , [3125..3129]+ , [3168..3169]+ , [3205..3212]+ , [3214..3216]+ , [3218..3240]+ , [3242..3251]+ , [3253..3257]+ , [3261]+ , [3294]+ , [3296..3297]+ , [3333..3340]+ , [3342..3344]+ , [3346..3368]+ , [3370..3385]+ , [3424..3425]+ , [3461..3478]+ , [3482..3505]+ , [3507..3515]+ , [3517]+ , [3520..3526]+ , [3585..3632]+ , [3634..3635]+ , [3648..3654]+ , [3713..3714]+ , [3716]+ , [3719..3720]+ , [3722]+ , [3725]+ , [3732..3735]+ , [3737..3743]+ , [3745..3747]+ , [3749]+ , [3751]+ , [3754..3755]+ , [3757..3760]+ , [3762..3763]+ , [3773]+ , [3776..3780]+ , [3782]+ , [3804..3805]+ , [3840]+ , [3904..3911]+ , [3913..3946]+ , [3976..3979]+ , [4096..4129]+ , [4131..4135]+ , [4137..4138]+ , [4176..4181]+ , [4256..4293]+ , [4304..4344]+ , [4352..4441]+ , [4447..4514]+ , [4520..4601]+ , [4608..4614]+ , [4616..4678]+ , [4680]+ , [4682..4685]+ , [4688..4694]+ , [4696]+ , [4698..4701]+ , [4704..4742]+ , [4744]+ , [4746..4749]+ , [4752..4782]+ , [4784]+ , [4786..4789]+ , [4792..4798]+ , [4800]+ , [4802..4805]+ , [4808..4814]+ , [4816..4822]+ , [4824..4846]+ , [4848..4878]+ , [4880]+ , [4882..4885]+ , [4888..4894]+ , [4896..4934]+ , [4936..4954]+ , [5024..5108]+ , [5121..5740]+ , [5743..5750]+ , [5761..5786]+ , [5792..5866]+ , [5888..5900]+ , [5902..5905]+ , [5920..5937]+ , [5952..5969]+ , [5984..5996]+ , [5998..6000]+ , [6016..6067]+ , [6103]+ , [6108]+ , [6176..6263]+ , [6272..6312]+ , [6400..6428]+ , [6480..6509]+ , [6512..6516]+ , [7424..7531]+ , [7680..7835]+ , [7840..7929]+ , [7936..7957]+ , [7960..7965]+ , [7968..8005]+ , [8008..8013]+ , [8016..8023]+ , [8025]+ , [8027]+ , [8029]+ , [8031..8061]+ , [8064..8116]+ , [8118..8124]+ , [8126]+ , [8130..8132]+ , [8134..8140]+ , [8144..8147]+ , [8150..8155]+ , [8160..8172]+ , [8178..8180]+ , [8182..8188]+ , [8305]+ , [8319]+ , [8450]+ , [8455]+ , [8458..8467]+ , [8469]+ , [8473..8477]+ , [8484]+ , [8486]+ , [8488]+ , [8490..8493]+ , [8495..8497]+ , [8499..8505]+ , [8509..8511]+ , [8517..8521]+ , [12293..12294]+ , [12337..12341]+ , [12347..12348]+ , [12353..12438]+ , [12445..12447]+ , [12449..12538]+ , [12540..12543]+ , [12549..12588]+ , [12593..12686]+ , [12704..12727]+ , [12784..12799]+ , [13312..19893]+ , [19968..40869]+ , [40960..42124]+ , [44032..55203]+ , [63744..64045]+ , [64048..64106]+ , [64256..64262]+ , [64275..64279]+ , [64285]+ , [64287..64296]+ , [64298..64310]+ , [64312..64316]+ , [64318]+ , [64320..64321]+ , [64323..64324]+ , [64326..64433]+ , [64467..64829]+ , [64848..64911]+ , [64914..64967]+ , [65008..65019]+ , [65136..65140]+ , [65142..65276]+ , [65313..65338]+ , [65345..65370]+ , [65382..65470]+ , [65474..65479]+ , [65482..65487]+ , [65490..65495]+ , [65498..65500]+ , [65536..65547]+ , [65549..65574]+ , [65576..65594]+ , [65596..65597]+ , [65599..65613]+ , [65616..65629]+ , [65664..65786]+ , [66304..66334]+ , [66352..66377]+ , [66432..66461]+ , [66560..66717]+ , [67584..67589]+ , [67592]+ , [67594..67637]+ , [67639..67640]+ , [67644]+ , [67647]+ , [119808..119892]+ , [119894..119964]+ , [119966..119967]+ , [119970]+ , [119973..119974]+ , [119977..119980]+ , [119982..119993]+ , [119995]+ , [119997..120003]+ , [120005..120069]+ , [120071..120074]+ , [120077..120084]+ , [120086..120092]+ , [120094..120121]+ , [120123..120126]+ , [120128..120132]+ , [120134]+ , [120138..120144]+ , [120146..120483]+ , [120488..120512]+ , [120514..120538]+ , [120540..120570]+ , [120572..120596]+ , [120598..120628]+ , [120630..120654]+ , [120656..120686]+ , [120688..120712]+ , [120714..120744]+ , [120746..120770]+ , [120772..120777]+ , [131072..173782]+ , [194560..195101]+ ]+ in S.fromList . concat $ r
+ src/Language/Java/Character/IsLetterOrDigit.hs view
@@ -0,0 +1,406 @@+-- | Simulates the @isDefined@ Java method. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isLetterOrDigit%28int%29>+module Language.Java.Character.IsLetterOrDigit+(+ IsLetterOrDigit(..)+) where++import Data.Char+import Data.Fixed+import Data.Word+import Data.Set(Set)+import qualified Data.Set as S++-- | Instances simulate Java characters and provide a decision on simulating @isLetterOrDigit@.+class Enum c => IsLetterOrDigit c where+ isLetterOrDigit ::+ c+ -> Bool+ isNotLetterOrDigit ::+ c+ -> Bool+ isNotLetterOrDigit =+ not . isLetterOrDigit++instance IsLetterOrDigit Char where+ isLetterOrDigit c =+ ord c `S.member` isLetterOrDigitSet++instance IsLetterOrDigit Int where+ isLetterOrDigit c =+ c `S.member` isLetterOrDigitSet++instance IsLetterOrDigit Integer where+ isLetterOrDigit c =+ c `S.member` isLetterOrDigitSet++instance IsLetterOrDigit Word8 where+ isLetterOrDigit c =+ c `S.member` isLetterOrDigitSet++instance IsLetterOrDigit Word16 where+ isLetterOrDigit c =+ c `S.member` isLetterOrDigitSet++instance IsLetterOrDigit Word32 where+ isLetterOrDigit c =+ c `S.member` isLetterOrDigitSet++instance IsLetterOrDigit Word64 where+ isLetterOrDigit c =+ c `S.member` isLetterOrDigitSet++instance HasResolution a => IsLetterOrDigit (Fixed a) where+ isLetterOrDigit c =+ c `S.member` isLetterOrDigitSet++isLetterOrDigitSet ::+ (Num a, Enum a, Ord a) =>+ Set a+isLetterOrDigitSet =+ let r = [+ [48..57]+ , [65..90]+ , [97..122]+ , [170]+ , [181]+ , [186]+ , [192..214]+ , [216..246]+ , [248..566]+ , [592..705]+ , [710..721]+ , [736..740]+ , [750]+ , [890]+ , [902]+ , [904..906]+ , [908]+ , [910..929]+ , [931..974]+ , [976..1013]+ , [1015..1019]+ , [1024..1153]+ , [1162..1230]+ , [1232..1269]+ , [1272..1273]+ , [1280..1295]+ , [1329..1366]+ , [1369]+ , [1377..1415]+ , [1488..1514]+ , [1520..1522]+ , [1569..1594]+ , [1600..1610]+ , [1632..1641]+ , [1646..1647]+ , [1649..1747]+ , [1749]+ , [1765..1766]+ , [1774..1788]+ , [1791]+ , [1808]+ , [1810..1839]+ , [1869..1871]+ , [1920..1957]+ , [1969]+ , [2308..2361]+ , [2365]+ , [2384]+ , [2392..2401]+ , [2406..2415]+ , [2437..2444]+ , [2447..2448]+ , [2451..2472]+ , [2474..2480]+ , [2482]+ , [2486..2489]+ , [2493]+ , [2524..2525]+ , [2527..2529]+ , [2534..2545]+ , [2565..2570]+ , [2575..2576]+ , [2579..2600]+ , [2602..2608]+ , [2610..2611]+ , [2613..2614]+ , [2616..2617]+ , [2649..2652]+ , [2654]+ , [2662..2671]+ , [2674..2676]+ , [2693..2701]+ , [2703..2705]+ , [2707..2728]+ , [2730..2736]+ , [2738..2739]+ , [2741..2745]+ , [2749]+ , [2768]+ , [2784..2785]+ , [2790..2799]+ , [2821..2828]+ , [2831..2832]+ , [2835..2856]+ , [2858..2864]+ , [2866..2867]+ , [2869..2873]+ , [2877]+ , [2908..2909]+ , [2911..2913]+ , [2918..2927]+ , [2929]+ , [2947]+ , [2949..2954]+ , [2958..2960]+ , [2962..2965]+ , [2969..2970]+ , [2972]+ , [2974..2975]+ , [2979..2980]+ , [2984..2986]+ , [2990..2997]+ , [2999..3001]+ , [3047..3055]+ , [3077..3084]+ , [3086..3088]+ , [3090..3112]+ , [3114..3123]+ , [3125..3129]+ , [3168..3169]+ , [3174..3183]+ , [3205..3212]+ , [3214..3216]+ , [3218..3240]+ , [3242..3251]+ , [3253..3257]+ , [3261]+ , [3294]+ , [3296..3297]+ , [3302..3311]+ , [3333..3340]+ , [3342..3344]+ , [3346..3368]+ , [3370..3385]+ , [3424..3425]+ , [3430..3439]+ , [3461..3478]+ , [3482..3505]+ , [3507..3515]+ , [3517]+ , [3520..3526]+ , [3585..3632]+ , [3634..3635]+ , [3648..3654]+ , [3664..3673]+ , [3713..3714]+ , [3716]+ , [3719..3720]+ , [3722]+ , [3725]+ , [3732..3735]+ , [3737..3743]+ , [3745..3747]+ , [3749]+ , [3751]+ , [3754..3755]+ , [3757..3760]+ , [3762..3763]+ , [3773]+ , [3776..3780]+ , [3782]+ , [3792..3801]+ , [3804..3805]+ , [3840]+ , [3872..3881]+ , [3904..3911]+ , [3913..3946]+ , [3976..3979]+ , [4096..4129]+ , [4131..4135]+ , [4137..4138]+ , [4160..4169]+ , [4176..4181]+ , [4256..4293]+ , [4304..4344]+ , [4352..4441]+ , [4447..4514]+ , [4520..4601]+ , [4608..4614]+ , [4616..4678]+ , [4680]+ , [4682..4685]+ , [4688..4694]+ , [4696]+ , [4698..4701]+ , [4704..4742]+ , [4744]+ , [4746..4749]+ , [4752..4782]+ , [4784]+ , [4786..4789]+ , [4792..4798]+ , [4800]+ , [4802..4805]+ , [4808..4814]+ , [4816..4822]+ , [4824..4846]+ , [4848..4878]+ , [4880]+ , [4882..4885]+ , [4888..4894]+ , [4896..4934]+ , [4936..4954]+ , [4969..4977]+ , [5024..5108]+ , [5121..5740]+ , [5743..5750]+ , [5761..5786]+ , [5792..5866]+ , [5888..5900]+ , [5902..5905]+ , [5920..5937]+ , [5952..5969]+ , [5984..5996]+ , [5998..6000]+ , [6016..6067]+ , [6103]+ , [6108]+ , [6112..6121]+ , [6160..6169]+ , [6176..6263]+ , [6272..6312]+ , [6400..6428]+ , [6470..6509]+ , [6512..6516]+ , [7424..7531]+ , [7680..7835]+ , [7840..7929]+ , [7936..7957]+ , [7960..7965]+ , [7968..8005]+ , [8008..8013]+ , [8016..8023]+ , [8025]+ , [8027]+ , [8029]+ , [8031..8061]+ , [8064..8116]+ , [8118..8124]+ , [8126]+ , [8130..8132]+ , [8134..8140]+ , [8144..8147]+ , [8150..8155]+ , [8160..8172]+ , [8178..8180]+ , [8182..8188]+ , [8305]+ , [8319]+ , [8450]+ , [8455]+ , [8458..8467]+ , [8469]+ , [8473..8477]+ , [8484]+ , [8486]+ , [8488]+ , [8490..8493]+ , [8495..8497]+ , [8499..8505]+ , [8509..8511]+ , [8517..8521]+ , [12293..12294]+ , [12337..12341]+ , [12347..12348]+ , [12353..12438]+ , [12445..12447]+ , [12449..12538]+ , [12540..12543]+ , [12549..12588]+ , [12593..12686]+ , [12704..12727]+ , [12784..12799]+ , [13312..19893]+ , [19968..40869]+ , [40960..42124]+ , [44032..55203]+ , [63744..64045]+ , [64048..64106]+ , [64256..64262]+ , [64275..64279]+ , [64285]+ , [64287..64296]+ , [64298..64310]+ , [64312..64316]+ , [64318]+ , [64320..64321]+ , [64323..64324]+ , [64326..64433]+ , [64467..64829]+ , [64848..64911]+ , [64914..64967]+ , [65008..65019]+ , [65136..65140]+ , [65142..65276]+ , [65296..65305]+ , [65313..65338]+ , [65345..65370]+ , [65382..65470]+ , [65474..65479]+ , [65482..65487]+ , [65490..65495]+ , [65498..65500]+ , [65536..65547]+ , [65549..65574]+ , [65576..65594]+ , [65596..65597]+ , [65599..65613]+ , [65616..65629]+ , [65664..65786]+ , [66304..66334]+ , [66352..66377]+ , [66432..66461]+ , [66560..66717]+ , [66720..66729]+ , [67584..67589]+ , [67592]+ , [67594..67637]+ , [67639..67640]+ , [67644]+ , [67647]+ , [119808..119892]+ , [119894..119964]+ , [119966..119967]+ , [119970]+ , [119973..119974]+ , [119977..119980]+ , [119982..119993]+ , [119995]+ , [119997..120003]+ , [120005..120069]+ , [120071..120074]+ , [120077..120084]+ , [120086..120092]+ , [120094..120121]+ , [120123..120126]+ , [120128..120132]+ , [120134]+ , [120138..120144]+ , [120146..120483]+ , [120488..120512]+ , [120514..120538]+ , [120540..120570]+ , [120572..120596]+ , [120598..120628]+ , [120630..120654]+ , [120656..120686]+ , [120688..120712]+ , [120714..120744]+ , [120746..120770]+ , [120772..120777]+ , [120782..120831]+ , [131072..173782]+ , [194560..195101]+ ]+ in S.fromList . concat $ r
+ src/Language/Java/Character/IsLowerCase.hs view
@@ -0,0 +1,486 @@+-- | Simulates the @isDefined@ Java method. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#IsLowerCase%28int%29>+module Language.Java.Character.IsLowerCase+(+ IsLowerCase(..)+) where++import Data.Char+import Data.Fixed+import Data.Word+import Data.Set(Set)+import qualified Data.Set as S++-- | Instances simulate Java characters and provide a decision on simulating @IsLowerCase@.+class Enum c => IsLowerCase c where+ isLowerCase ::+ c+ -> Bool+ isNotLowerCase ::+ c+ -> Bool+ isNotLowerCase =+ not . isLowerCase++instance IsLowerCase Char where+ isLowerCase c =+ ord c `S.member` isLowerCaseSet++instance IsLowerCase Int where+ isLowerCase c =+ c `S.member` isLowerCaseSet++instance IsLowerCase Integer where+ isLowerCase c =+ c `S.member` isLowerCaseSet++instance IsLowerCase Word8 where+ isLowerCase c =+ c `S.member` isLowerCaseSet++instance IsLowerCase Word16 where+ isLowerCase c =+ c `S.member` isLowerCaseSet++instance IsLowerCase Word32 where+ isLowerCase c =+ c `S.member` isLowerCaseSet++instance IsLowerCase Word64 where+ isLowerCase c =+ c `S.member` isLowerCaseSet++instance HasResolution a => IsLowerCase (Fixed a) where+ isLowerCase c =+ c `S.member` isLowerCaseSet++isLowerCaseSet ::+ (Num a, Enum a, Ord a) =>+ Set a+isLowerCaseSet =+ let r = [+ [97..122]+ , [170]+ , [181]+ , [186]+ , [223..246]+ , [248..255]+ , [257]+ , [259]+ , [261]+ , [263]+ , [265]+ , [267]+ , [269]+ , [271]+ , [273]+ , [275]+ , [277]+ , [279]+ , [281]+ , [283]+ , [285]+ , [287]+ , [289]+ , [291]+ , [293]+ , [295]+ , [297]+ , [299]+ , [301]+ , [303]+ , [305]+ , [307]+ , [309]+ , [311..312]+ , [314]+ , [316]+ , [318]+ , [320]+ , [322]+ , [324]+ , [326]+ , [328..329]+ , [331]+ , [333]+ , [335]+ , [337]+ , [339]+ , [341]+ , [343]+ , [345]+ , [347]+ , [349]+ , [351]+ , [353]+ , [355]+ , [357]+ , [359]+ , [361]+ , [363]+ , [365]+ , [367]+ , [369]+ , [371]+ , [373]+ , [375]+ , [378]+ , [380]+ , [382..384]+ , [387]+ , [389]+ , [392]+ , [396..397]+ , [402]+ , [405]+ , [409..411]+ , [414]+ , [417]+ , [419]+ , [421]+ , [424]+ , [426..427]+ , [429]+ , [432]+ , [436]+ , [438]+ , [441..442]+ , [445..447]+ , [454]+ , [457]+ , [460]+ , [462]+ , [464]+ , [466]+ , [468]+ , [470]+ , [472]+ , [474]+ , [476..477]+ , [479]+ , [481]+ , [483]+ , [485]+ , [487]+ , [489]+ , [491]+ , [493]+ , [495..496]+ , [499]+ , [501]+ , [505]+ , [507]+ , [509]+ , [511]+ , [513]+ , [515]+ , [517]+ , [519]+ , [521]+ , [523]+ , [525]+ , [527]+ , [529]+ , [531]+ , [533]+ , [535]+ , [537]+ , [539]+ , [541]+ , [543]+ , [545]+ , [547]+ , [549]+ , [551]+ , [553]+ , [555]+ , [557]+ , [559]+ , [561]+ , [563..566]+ , [592..687]+ , [912]+ , [940..974]+ , [976..977]+ , [981..983]+ , [985]+ , [987]+ , [989]+ , [991]+ , [993]+ , [995]+ , [997]+ , [999]+ , [1001]+ , [1003]+ , [1005]+ , [1007..1011]+ , [1013]+ , [1016]+ , [1019]+ , [1072..1119]+ , [1121]+ , [1123]+ , [1125]+ , [1127]+ , [1129]+ , [1131]+ , [1133]+ , [1135]+ , [1137]+ , [1139]+ , [1141]+ , [1143]+ , [1145]+ , [1147]+ , [1149]+ , [1151]+ , [1153]+ , [1163]+ , [1165]+ , [1167]+ , [1169]+ , [1171]+ , [1173]+ , [1175]+ , [1177]+ , [1179]+ , [1181]+ , [1183]+ , [1185]+ , [1187]+ , [1189]+ , [1191]+ , [1193]+ , [1195]+ , [1197]+ , [1199]+ , [1201]+ , [1203]+ , [1205]+ , [1207]+ , [1209]+ , [1211]+ , [1213]+ , [1215]+ , [1218]+ , [1220]+ , [1222]+ , [1224]+ , [1226]+ , [1228]+ , [1230]+ , [1233]+ , [1235]+ , [1237]+ , [1239]+ , [1241]+ , [1243]+ , [1245]+ , [1247]+ , [1249]+ , [1251]+ , [1253]+ , [1255]+ , [1257]+ , [1259]+ , [1261]+ , [1263]+ , [1265]+ , [1267]+ , [1269]+ , [1273]+ , [1281]+ , [1283]+ , [1285]+ , [1287]+ , [1289]+ , [1291]+ , [1293]+ , [1295]+ , [1377..1415]+ , [7424..7467]+ , [7522..7531]+ , [7681]+ , [7683]+ , [7685]+ , [7687]+ , [7689]+ , [7691]+ , [7693]+ , [7695]+ , [7697]+ , [7699]+ , [7701]+ , [7703]+ , [7705]+ , [7707]+ , [7709]+ , [7711]+ , [7713]+ , [7715]+ , [7717]+ , [7719]+ , [7721]+ , [7723]+ , [7725]+ , [7727]+ , [7729]+ , [7731]+ , [7733]+ , [7735]+ , [7737]+ , [7739]+ , [7741]+ , [7743]+ , [7745]+ , [7747]+ , [7749]+ , [7751]+ , [7753]+ , [7755]+ , [7757]+ , [7759]+ , [7761]+ , [7763]+ , [7765]+ , [7767]+ , [7769]+ , [7771]+ , [7773]+ , [7775]+ , [7777]+ , [7779]+ , [7781]+ , [7783]+ , [7785]+ , [7787]+ , [7789]+ , [7791]+ , [7793]+ , [7795]+ , [7797]+ , [7799]+ , [7801]+ , [7803]+ , [7805]+ , [7807]+ , [7809]+ , [7811]+ , [7813]+ , [7815]+ , [7817]+ , [7819]+ , [7821]+ , [7823]+ , [7825]+ , [7827]+ , [7829..7835]+ , [7841]+ , [7843]+ , [7845]+ , [7847]+ , [7849]+ , [7851]+ , [7853]+ , [7855]+ , [7857]+ , [7859]+ , [7861]+ , [7863]+ , [7865]+ , [7867]+ , [7869]+ , [7871]+ , [7873]+ , [7875]+ , [7877]+ , [7879]+ , [7881]+ , [7883]+ , [7885]+ , [7887]+ , [7889]+ , [7891]+ , [7893]+ , [7895]+ , [7897]+ , [7899]+ , [7901]+ , [7903]+ , [7905]+ , [7907]+ , [7909]+ , [7911]+ , [7913]+ , [7915]+ , [7917]+ , [7919]+ , [7921]+ , [7923]+ , [7925]+ , [7927]+ , [7929]+ , [7936..7943]+ , [7952..7957]+ , [7968..7975]+ , [7984..7991]+ , [8000..8005]+ , [8016..8023]+ , [8032..8039]+ , [8048..8061]+ , [8064..8071]+ , [8080..8087]+ , [8096..8103]+ , [8112..8116]+ , [8118..8119]+ , [8126]+ , [8130..8132]+ , [8134..8135]+ , [8144..8147]+ , [8150..8151]+ , [8160..8167]+ , [8178..8180]+ , [8182..8183]+ , [8305]+ , [8319]+ , [8458]+ , [8462..8463]+ , [8467]+ , [8495]+ , [8500]+ , [8505]+ , [8509]+ , [8518..8521]+ , [64256..64262]+ , [64275..64279]+ , [65345..65370]+ , [66600..66639]+ , [119834..119859]+ , [119886..119892]+ , [119894..119911]+ , [119938..119963]+ , [119990..119993]+ , [119995]+ , [119997..120003]+ , [120005..120015]+ , [120042..120067]+ , [120094..120119]+ , [120146..120171]+ , [120198..120223]+ , [120250..120275]+ , [120302..120327]+ , [120354..120379]+ , [120406..120431]+ , [120458..120483]+ , [120514..120538]+ , [120540..120545]+ , [120572..120596]+ , [120598..120603]+ , [120630..120654]+ , [120656..120661]+ , [120688..120712]+ , [120714..120719]+ , [120746..120770]+ , [120772..120777]+ ]+ in S.fromList . concat $ r
+ src/Language/Java/Character/IsMirrored.hs view
@@ -0,0 +1,155 @@+-- | Simulates the @isDefined@ Java method. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isMirrored%28int%29>+module Language.Java.Character.IsMirrored+(+ IsMirrored(..)+) where++import Data.Char+import Data.Fixed+import Data.Word+import Data.Set(Set)+import qualified Data.Set as S++-- | Instances simulate Java characters and provide a decision on simulating @isMirrored@.+class Enum c => IsMirrored c where+ isMirrored ::+ c+ -> Bool+ isNotMirrored ::+ c+ -> Bool+ isNotMirrored =+ not . isMirrored++instance IsMirrored Char where+ isMirrored c =+ ord c `S.member` isMirroredSet++instance IsMirrored Int where+ isMirrored c =+ c `S.member` isMirroredSet++instance IsMirrored Integer where+ isMirrored c =+ c `S.member` isMirroredSet++instance IsMirrored Word8 where+ isMirrored c =+ c `S.member` isMirroredSet++instance IsMirrored Word16 where+ isMirrored c =+ c `S.member` isMirroredSet++instance IsMirrored Word32 where+ isMirrored c =+ c `S.member` isMirroredSet++instance IsMirrored Word64 where+ isMirrored c =+ c `S.member` isMirroredSet++instance HasResolution a => IsMirrored (Fixed a) where+ isMirrored c =+ c `S.member` isMirroredSet++isMirroredSet ::+ (Num a, Enum a, Ord a) =>+ Set a+isMirroredSet =+ let r = [+ [40..41]+ , [60]+ , [62]+ , [91]+ , [93]+ , [123]+ , [125]+ , [171]+ , [187]+ , [8249..8250]+ , [8261..8262]+ , [8317..8318]+ , [8333..8334]+ , [8512]+ , [8705..8708]+ , [8712..8717]+ , [8721]+ , [8725..8726]+ , [8730..8733]+ , [8735..8738]+ , [8740]+ , [8742]+ , [8747..8755]+ , [8761]+ , [8763..8780]+ , [8786..8789]+ , [8799..8800]+ , [8802]+ , [8804..8811]+ , [8814..8844]+ , [8847..8850]+ , [8856]+ , [8866..8867]+ , [8870..8888]+ , [8894..8895]+ , [8905..8909]+ , [8912..8913]+ , [8918..8941]+ , [8944..8959]+ , [8968..8971]+ , [8992..8993]+ , [9001..9002]+ , [10088..10101]+ , [10195..10198]+ , [10204..10206]+ , [10210..10219]+ , [10627..10648]+ , [10651..10671]+ , [10680]+ , [10688..10693]+ , [10697]+ , [10702..10706]+ , [10708..10709]+ , [10712..10716]+ , [10721]+ , [10723..10725]+ , [10728..10729]+ , [10740..10745]+ , [10748..10749]+ , [10762..10780]+ , [10782..10785]+ , [10788]+ , [10790]+ , [10793]+ , [10795..10798]+ , [10804..10805]+ , [10812..10814]+ , [10839..10840]+ , [10852..10853]+ , [10858..10861]+ , [10863..10864]+ , [10867..10868]+ , [10873..10915]+ , [10918..10925]+ , [10927..10966]+ , [10972]+ , [10974]+ , [10978..10982]+ , [10988..10990]+ , [10995]+ , [10999..11003]+ , [11005]+ , [12296..12305]+ , [12308..12315]+ , [65288..65289]+ , [65308]+ , [65310]+ , [65339]+ , [65341]+ , [65371]+ , [65373]+ , [65375..65376]+ , [65378..65379]+ ]+ in S.fromList . concat $ r
+ src/Language/Java/Character/IsSpaceChar.hs view
@@ -0,0 +1,71 @@+-- | Simulates the @isDefined@ Java method. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isSpaceChar%28int%29>+module Language.Java.Character.IsSpaceChar+(+ IsSpaceChar(..)+) where++import Data.Char+import Data.Fixed+import Data.Word+import Data.Set(Set)+import qualified Data.Set as S++-- | Instances simulate Java characters and provide a decision on simulating @isSpaceChar@.+class Enum c => IsSpaceChar c where+ isSpaceChar ::+ c+ -> Bool+ isNotSpaceChar ::+ c+ -> Bool+ isNotSpaceChar =+ not . isSpaceChar++instance IsSpaceChar Char where+ isSpaceChar c =+ ord c `S.member` isSpaceCharSet++instance IsSpaceChar Int where+ isSpaceChar c =+ c `S.member` isSpaceCharSet++instance IsSpaceChar Integer where+ isSpaceChar c =+ c `S.member` isSpaceCharSet++instance IsSpaceChar Word8 where+ isSpaceChar c =+ c `S.member` isSpaceCharSet++instance IsSpaceChar Word16 where+ isSpaceChar c =+ c `S.member` isSpaceCharSet++instance IsSpaceChar Word32 where+ isSpaceChar c =+ c `S.member` isSpaceCharSet++instance IsSpaceChar Word64 where+ isSpaceChar c =+ c `S.member` isSpaceCharSet++instance HasResolution a => IsSpaceChar (Fixed a) where+ isSpaceChar c =+ c `S.member` isSpaceCharSet++isSpaceCharSet ::+ (Num a, Enum a, Ord a) =>+ Set a+isSpaceCharSet =+ let r = [+ [32]+ , [160]+ , [5760]+ , [6158]+ , [8192..8203]+ , [8232..8233]+ , [8239]+ , [8287]+ , [12288]+ ]+ in S.fromList . concat $ r
+ src/Language/Java/Character/IsSupplementaryCodePoint.hs view
@@ -0,0 +1,404 @@+-- | Simulates the @isDefined@ Java method. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isSupplementaryCodePoint%28int%29>+module Language.Java.Character.IsSupplementaryCodePoint+(+ IsSupplementaryCodePoint(..)+) where++import Data.Char+import Data.Fixed+import Data.Word+import Data.Set(Set)+import qualified Data.Set as S++-- | Instances simulate Java characters and provide a decision on simulating @isSupplementaryCodePoint@.+class Enum c => IsSupplementaryCodePoint c where+ isSupplementaryCodePoint ::+ c+ -> Bool+ isNotSupplementaryCodePoint ::+ c+ -> Bool+ isNotSupplementaryCodePoint =+ not . isSupplementaryCodePoint++instance IsSupplementaryCodePoint Char where+ isSupplementaryCodePoint c =+ ord c `S.member` isSupplementaryCodePointSet++instance IsSupplementaryCodePoint Int where+ isSupplementaryCodePoint c =+ c `S.member` isSupplementaryCodePointSet++instance IsSupplementaryCodePoint Integer where+ isSupplementaryCodePoint c =+ c `S.member` isSupplementaryCodePointSet++instance IsSupplementaryCodePoint Word8 where+ isSupplementaryCodePoint c =+ c `S.member` isSupplementaryCodePointSet++instance IsSupplementaryCodePoint Word16 where+ isSupplementaryCodePoint c =+ c `S.member` isSupplementaryCodePointSet++instance IsSupplementaryCodePoint Word32 where+ isSupplementaryCodePoint c =+ c `S.member` isSupplementaryCodePointSet++instance IsSupplementaryCodePoint Word64 where+ isSupplementaryCodePoint c =+ c `S.member` isSupplementaryCodePointSet++instance HasResolution a => IsSupplementaryCodePoint (Fixed a) where+ isSupplementaryCodePoint c =+ c `S.member` isSupplementaryCodePointSet++isSupplementaryCodePointSet ::+ (Num a, Enum a, Ord a) =>+ Set a+isSupplementaryCodePointSet =+ let r = [+ [36]+ , [65..90]+ , [95]+ , [97..122]+ , [162..165]+ , [170]+ , [181]+ , [186]+ , [192..214]+ , [216..246]+ , [248..566]+ , [592..705]+ , [710..721]+ , [736..740]+ , [750]+ , [890]+ , [902]+ , [904..906]+ , [908]+ , [910..929]+ , [931..974]+ , [976..1013]+ , [1015..1019]+ , [1024..1153]+ , [1162..1230]+ , [1232..1269]+ , [1272..1273]+ , [1280..1295]+ , [1329..1366]+ , [1369]+ , [1377..1415]+ , [1488..1514]+ , [1520..1522]+ , [1569..1594]+ , [1600..1610]+ , [1646..1647]+ , [1649..1747]+ , [1749]+ , [1765..1766]+ , [1774..1775]+ , [1786..1788]+ , [1791]+ , [1808]+ , [1810..1839]+ , [1869..1871]+ , [1920..1957]+ , [1969]+ , [2308..2361]+ , [2365]+ , [2384]+ , [2392..2401]+ , [2437..2444]+ , [2447..2448]+ , [2451..2472]+ , [2474..2480]+ , [2482]+ , [2486..2489]+ , [2493]+ , [2524..2525]+ , [2527..2529]+ , [2544..2547]+ , [2565..2570]+ , [2575..2576]+ , [2579..2600]+ , [2602..2608]+ , [2610..2611]+ , [2613..2614]+ , [2616..2617]+ , [2649..2652]+ , [2654]+ , [2674..2676]+ , [2693..2701]+ , [2703..2705]+ , [2707..2728]+ , [2730..2736]+ , [2738..2739]+ , [2741..2745]+ , [2749]+ , [2768]+ , [2784..2785]+ , [2801]+ , [2821..2828]+ , [2831..2832]+ , [2835..2856]+ , [2858..2864]+ , [2866..2867]+ , [2869..2873]+ , [2877]+ , [2908..2909]+ , [2911..2913]+ , [2929]+ , [2947]+ , [2949..2954]+ , [2958..2960]+ , [2962..2965]+ , [2969..2970]+ , [2972]+ , [2974..2975]+ , [2979..2980]+ , [2984..2986]+ , [2990..2997]+ , [2999..3001]+ , [3065]+ , [3077..3084]+ , [3086..3088]+ , [3090..3112]+ , [3114..3123]+ , [3125..3129]+ , [3168..3169]+ , [3205..3212]+ , [3214..3216]+ , [3218..3240]+ , [3242..3251]+ , [3253..3257]+ , [3261]+ , [3294]+ , [3296..3297]+ , [3333..3340]+ , [3342..3344]+ , [3346..3368]+ , [3370..3385]+ , [3424..3425]+ , [3461..3478]+ , [3482..3505]+ , [3507..3515]+ , [3517]+ , [3520..3526]+ , [3585..3632]+ , [3634..3635]+ , [3647..3654]+ , [3713..3714]+ , [3716]+ , [3719..3720]+ , [3722]+ , [3725]+ , [3732..3735]+ , [3737..3743]+ , [3745..3747]+ , [3749]+ , [3751]+ , [3754..3755]+ , [3757..3760]+ , [3762..3763]+ , [3773]+ , [3776..3780]+ , [3782]+ , [3804..3805]+ , [3840]+ , [3904..3911]+ , [3913..3946]+ , [3976..3979]+ , [4096..4129]+ , [4131..4135]+ , [4137..4138]+ , [4176..4181]+ , [4256..4293]+ , [4304..4344]+ , [4352..4441]+ , [4447..4514]+ , [4520..4601]+ , [4608..4614]+ , [4616..4678]+ , [4680]+ , [4682..4685]+ , [4688..4694]+ , [4696]+ , [4698..4701]+ , [4704..4742]+ , [4744]+ , [4746..4749]+ , [4752..4782]+ , [4784]+ , [4786..4789]+ , [4792..4798]+ , [4800]+ , [4802..4805]+ , [4808..4814]+ , [4816..4822]+ , [4824..4846]+ , [4848..4878]+ , [4880]+ , [4882..4885]+ , [4888..4894]+ , [4896..4934]+ , [4936..4954]+ , [5024..5108]+ , [5121..5740]+ , [5743..5750]+ , [5761..5786]+ , [5792..5866]+ , [5870..5872]+ , [5888..5900]+ , [5902..5905]+ , [5920..5937]+ , [5952..5969]+ , [5984..5996]+ , [5998..6000]+ , [6016..6067]+ , [6103]+ , [6107..6108]+ , [6176..6263]+ , [6272..6312]+ , [6400..6428]+ , [6480..6509]+ , [6512..6516]+ , [7424..7531]+ , [7680..7835]+ , [7840..7929]+ , [7936..7957]+ , [7960..7965]+ , [7968..8005]+ , [8008..8013]+ , [8016..8023]+ , [8025]+ , [8027]+ , [8029]+ , [8031..8061]+ , [8064..8116]+ , [8118..8124]+ , [8126]+ , [8130..8132]+ , [8134..8140]+ , [8144..8147]+ , [8150..8155]+ , [8160..8172]+ , [8178..8180]+ , [8182..8188]+ , [8255..8256]+ , [8276]+ , [8305]+ , [8319]+ , [8352..8369]+ , [8450]+ , [8455]+ , [8458..8467]+ , [8469]+ , [8473..8477]+ , [8484]+ , [8486]+ , [8488]+ , [8490..8493]+ , [8495..8497]+ , [8499..8505]+ , [8509..8511]+ , [8517..8521]+ , [8544..8579]+ , [12293..12295]+ , [12321..12329]+ , [12337..12341]+ , [12344..12348]+ , [12353..12438]+ , [12445..12447]+ , [12449..12543]+ , [12549..12588]+ , [12593..12686]+ , [12704..12727]+ , [12784..12799]+ , [13312..19893]+ , [19968..40869]+ , [40960..42124]+ , [44032..55203]+ , [63744..64045]+ , [64048..64106]+ , [64256..64262]+ , [64275..64279]+ , [64285]+ , [64287..64296]+ , [64298..64310]+ , [64312..64316]+ , [64318]+ , [64320..64321]+ , [64323..64324]+ , [64326..64433]+ , [64467..64829]+ , [64848..64911]+ , [64914..64967]+ , [65008..65020]+ , [65075..65076]+ , [65101..65103]+ , [65129]+ , [65136..65140]+ , [65142..65276]+ , [65284]+ , [65313..65338]+ , [65343]+ , [65345..65370]+ , [65381..65470]+ , [65474..65479]+ , [65482..65487]+ , [65490..65495]+ , [65498..65500]+ , [65504..65505]+ , [65509..65510]+ , [65536..65547]+ , [65549..65574]+ , [65576..65594]+ , [65596..65597]+ , [65599..65613]+ , [65616..65629]+ , [65664..65786]+ , [66304..66334]+ , [66352..66378]+ , [66432..66461]+ , [66560..66717]+ , [67584..67589]+ , [67592]+ , [67594..67637]+ , [67639..67640]+ , [67644]+ , [67647]+ , [119808..119892]+ , [119894..119964]+ , [119966..119967]+ , [119970]+ , [119973..119974]+ , [119977..119980]+ , [119982..119993]+ , [119995]+ , [119997..120003]+ , [120005..120069]+ , [120071..120074]+ , [120077..120084]+ , [120086..120092]+ , [120094..120121]+ , [120123..120126]+ , [120128..120132]+ , [120134]+ , [120138..120144]+ , [120146..120483]+ , [120488..120512]+ , [120514..120538]+ , [120540..120570]+ , [120572..120596]+ , [120598..120628]+ , [120630..120654]+ , [120656..120686]+ , [120688..120712]+ , [120714..120744]+ , [120746..120770]+ , [120772..120777]+ , [131072..173782]+ , [194560..195101]+ ]+ in S.fromList . concat $ r
+ src/Language/Java/Character/IsTitleCase.hs view
@@ -0,0 +1,72 @@+-- | Simulates the @isDefined@ Java method. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isTitleCase%28int%29>+module Language.Java.Character.IsTitleCase+(+ IsTitleCase(..)+) where++import Data.Char+import Data.Fixed+import Data.Word+import Data.Set(Set)+import qualified Data.Set as S++-- | Instances simulate Java characters and provide a decision on simulating @isTitleCase@.+class Enum c => IsTitleCase c where+ isTitleCase ::+ c+ -> Bool+ isNotTitleCase ::+ c+ -> Bool+ isNotTitleCase =+ not . isTitleCase++instance IsTitleCase Char where+ isTitleCase c =+ ord c `S.member` isTitleCaseSet++instance IsTitleCase Int where+ isTitleCase c =+ c `S.member` isTitleCaseSet++instance IsTitleCase Integer where+ isTitleCase c =+ c `S.member` isTitleCaseSet++instance IsTitleCase Word8 where+ isTitleCase c =+ c `S.member` isTitleCaseSet++instance IsTitleCase Word16 where+ isTitleCase c =+ c `S.member` isTitleCaseSet++instance IsTitleCase Word32 where+ isTitleCase c =+ c `S.member` isTitleCaseSet++instance IsTitleCase Word64 where+ isTitleCase c =+ c `S.member` isTitleCaseSet++instance HasResolution a => IsTitleCase (Fixed a) where+ isTitleCase c =+ c `S.member` isTitleCaseSet++isTitleCaseSet ::+ (Num a, Enum a, Ord a) =>+ Set a+isTitleCaseSet =+ let r = [+ [453]+ , [456]+ , [459]+ , [498]+ , [8072..8079]+ , [8088..8095]+ , [8104..8111]+ , [8124]+ , [8140]+ , [8188]+ ]+ in S.fromList . concat $ r
+ src/Language/Java/Character/IsUnicodeIdentifierPart.hs view
@@ -0,0 +1,493 @@+-- | Simulates the @isDefined@ Java method. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isUnicodeIdentifierPart%28int%29>+module Language.Java.Character.IsUnicodeIdentifierPart+(+ IsUnicodeIdentifierPart(..)+) where++import Data.Char+import Data.Fixed+import Data.Word+import Data.Set(Set)+import qualified Data.Set as S++-- | Instances simulate Java characters and provide a decision on simulating @isUnicodeIdentifierPart@.+class Enum c => IsUnicodeIdentifierPart c where+ isUnicodeIdentifierPart ::+ c+ -> Bool+ isNotUnicodeIdentifierPart ::+ c+ -> Bool+ isNotUnicodeIdentifierPart =+ not . isUnicodeIdentifierPart++instance IsUnicodeIdentifierPart Char where+ isUnicodeIdentifierPart c =+ ord c `S.member` isUnicodeIdentifierPartSet++instance IsUnicodeIdentifierPart Int where+ isUnicodeIdentifierPart c =+ c `S.member` isUnicodeIdentifierPartSet++instance IsUnicodeIdentifierPart Integer where+ isUnicodeIdentifierPart c =+ c `S.member` isUnicodeIdentifierPartSet++instance IsUnicodeIdentifierPart Word8 where+ isUnicodeIdentifierPart c =+ c `S.member` isUnicodeIdentifierPartSet++instance IsUnicodeIdentifierPart Word16 where+ isUnicodeIdentifierPart c =+ c `S.member` isUnicodeIdentifierPartSet++instance IsUnicodeIdentifierPart Word32 where+ isUnicodeIdentifierPart c =+ c `S.member` isUnicodeIdentifierPartSet++instance IsUnicodeIdentifierPart Word64 where+ isUnicodeIdentifierPart c =+ c `S.member` isUnicodeIdentifierPartSet++instance HasResolution a => IsUnicodeIdentifierPart (Fixed a) where+ isUnicodeIdentifierPart c =+ c `S.member` isUnicodeIdentifierPartSet++isUnicodeIdentifierPartSet ::+ (Num a, Enum a, Ord a) =>+ Set a+isUnicodeIdentifierPartSet =+ let r = [+ [0..8]+ , [14..27]+ , [48..57]+ , [65..90]+ , [95]+ , [97..122]+ , [127..159]+ , [170]+ , [173]+ , [181]+ , [186]+ , [192..214]+ , [216..246]+ , [248..566]+ , [592..705]+ , [710..721]+ , [736..740]+ , [750]+ , [768..855]+ , [861..879]+ , [890]+ , [902]+ , [904..906]+ , [908]+ , [910..929]+ , [931..974]+ , [976..1013]+ , [1015..1019]+ , [1024..1153]+ , [1155..1158]+ , [1162..1230]+ , [1232..1269]+ , [1272..1273]+ , [1280..1295]+ , [1329..1366]+ , [1369]+ , [1377..1415]+ , [1425..1441]+ , [1443..1465]+ , [1467..1469]+ , [1471]+ , [1473..1474]+ , [1476]+ , [1488..1514]+ , [1520..1522]+ , [1536..1539]+ , [1552..1557]+ , [1569..1594]+ , [1600..1624]+ , [1632..1641]+ , [1646..1747]+ , [1749..1757]+ , [1759..1768]+ , [1770..1788]+ , [1791]+ , [1807..1866]+ , [1869..1871]+ , [1920..1969]+ , [2305..2361]+ , [2364..2381]+ , [2384..2388]+ , [2392..2403]+ , [2406..2415]+ , [2433..2435]+ , [2437..2444]+ , [2447..2448]+ , [2451..2472]+ , [2474..2480]+ , [2482]+ , [2486..2489]+ , [2492..2500]+ , [2503..2504]+ , [2507..2509]+ , [2519]+ , [2524..2525]+ , [2527..2531]+ , [2534..2545]+ , [2561..2563]+ , [2565..2570]+ , [2575..2576]+ , [2579..2600]+ , [2602..2608]+ , [2610..2611]+ , [2613..2614]+ , [2616..2617]+ , [2620]+ , [2622..2626]+ , [2631..2632]+ , [2635..2637]+ , [2649..2652]+ , [2654]+ , [2662..2676]+ , [2689..2691]+ , [2693..2701]+ , [2703..2705]+ , [2707..2728]+ , [2730..2736]+ , [2738..2739]+ , [2741..2745]+ , [2748..2757]+ , [2759..2761]+ , [2763..2765]+ , [2768]+ , [2784..2787]+ , [2790..2799]+ , [2817..2819]+ , [2821..2828]+ , [2831..2832]+ , [2835..2856]+ , [2858..2864]+ , [2866..2867]+ , [2869..2873]+ , [2876..2883]+ , [2887..2888]+ , [2891..2893]+ , [2902..2903]+ , [2908..2909]+ , [2911..2913]+ , [2918..2927]+ , [2929]+ , [2946..2947]+ , [2949..2954]+ , [2958..2960]+ , [2962..2965]+ , [2969..2970]+ , [2972]+ , [2974..2975]+ , [2979..2980]+ , [2984..2986]+ , [2990..2997]+ , [2999..3001]+ , [3006..3010]+ , [3014..3016]+ , [3018..3021]+ , [3031]+ , [3047..3055]+ , [3073..3075]+ , [3077..3084]+ , [3086..3088]+ , [3090..3112]+ , [3114..3123]+ , [3125..3129]+ , [3134..3140]+ , [3142..3144]+ , [3146..3149]+ , [3157..3158]+ , [3168..3169]+ , [3174..3183]+ , [3202..3203]+ , [3205..3212]+ , [3214..3216]+ , [3218..3240]+ , [3242..3251]+ , [3253..3257]+ , [3260..3268]+ , [3270..3272]+ , [3274..3277]+ , [3285..3286]+ , [3294]+ , [3296..3297]+ , [3302..3311]+ , [3330..3331]+ , [3333..3340]+ , [3342..3344]+ , [3346..3368]+ , [3370..3385]+ , [3390..3395]+ , [3398..3400]+ , [3402..3405]+ , [3415]+ , [3424..3425]+ , [3430..3439]+ , [3458..3459]+ , [3461..3478]+ , [3482..3505]+ , [3507..3515]+ , [3517]+ , [3520..3526]+ , [3530]+ , [3535..3540]+ , [3542]+ , [3544..3551]+ , [3570..3571]+ , [3585..3642]+ , [3648..3662]+ , [3664..3673]+ , [3713..3714]+ , [3716]+ , [3719..3720]+ , [3722]+ , [3725]+ , [3732..3735]+ , [3737..3743]+ , [3745..3747]+ , [3749]+ , [3751]+ , [3754..3755]+ , [3757..3769]+ , [3771..3773]+ , [3776..3780]+ , [3782]+ , [3784..3789]+ , [3792..3801]+ , [3804..3805]+ , [3840]+ , [3864..3865]+ , [3872..3881]+ , [3893]+ , [3895]+ , [3897]+ , [3902..3911]+ , [3913..3946]+ , [3953..3972]+ , [3974..3979]+ , [3984..3991]+ , [3993..4028]+ , [4038]+ , [4096..4129]+ , [4131..4135]+ , [4137..4138]+ , [4140..4146]+ , [4150..4153]+ , [4160..4169]+ , [4176..4185]+ , [4256..4293]+ , [4304..4344]+ , [4352..4441]+ , [4447..4514]+ , [4520..4601]+ , [4608..4614]+ , [4616..4678]+ , [4680]+ , [4682..4685]+ , [4688..4694]+ , [4696]+ , [4698..4701]+ , [4704..4742]+ , [4744]+ , [4746..4749]+ , [4752..4782]+ , [4784]+ , [4786..4789]+ , [4792..4798]+ , [4800]+ , [4802..4805]+ , [4808..4814]+ , [4816..4822]+ , [4824..4846]+ , [4848..4878]+ , [4880]+ , [4882..4885]+ , [4888..4894]+ , [4896..4934]+ , [4936..4954]+ , [4969..4977]+ , [5024..5108]+ , [5121..5740]+ , [5743..5750]+ , [5761..5786]+ , [5792..5866]+ , [5870..5872]+ , [5888..5900]+ , [5902..5908]+ , [5920..5940]+ , [5952..5971]+ , [5984..5996]+ , [5998..6000]+ , [6002..6003]+ , [6016..6099]+ , [6103]+ , [6108..6109]+ , [6112..6121]+ , [6155..6157]+ , [6160..6169]+ , [6176..6263]+ , [6272..6313]+ , [6400..6428]+ , [6432..6443]+ , [6448..6459]+ , [6470..6509]+ , [6512..6516]+ , [7424..7531]+ , [7680..7835]+ , [7840..7929]+ , [7936..7957]+ , [7960..7965]+ , [7968..8005]+ , [8008..8013]+ , [8016..8023]+ , [8025]+ , [8027]+ , [8029]+ , [8031..8061]+ , [8064..8116]+ , [8118..8124]+ , [8126]+ , [8130..8132]+ , [8134..8140]+ , [8144..8147]+ , [8150..8155]+ , [8160..8172]+ , [8178..8180]+ , [8182..8188]+ , [8204..8207]+ , [8234..8238]+ , [8255..8256]+ , [8276]+ , [8288..8291]+ , [8298..8303]+ , [8305]+ , [8319]+ , [8400..8412]+ , [8417]+ , [8421..8426]+ , [8450]+ , [8455]+ , [8458..8467]+ , [8469]+ , [8473..8477]+ , [8484]+ , [8486]+ , [8488]+ , [8490..8493]+ , [8495..8497]+ , [8499..8505]+ , [8509..8511]+ , [8517..8521]+ , [8544..8579]+ , [12293..12295]+ , [12321..12335]+ , [12337..12341]+ , [12344..12348]+ , [12353..12438]+ , [12441..12442]+ , [12445..12447]+ , [12449..12543]+ , [12549..12588]+ , [12593..12686]+ , [12704..12727]+ , [12784..12799]+ , [13312..19893]+ , [19968..40869]+ , [40960..42124]+ , [44032..55203]+ , [63744..64045]+ , [64048..64106]+ , [64256..64262]+ , [64275..64279]+ , [64285..64296]+ , [64298..64310]+ , [64312..64316]+ , [64318]+ , [64320..64321]+ , [64323..64324]+ , [64326..64433]+ , [64467..64829]+ , [64848..64911]+ , [64914..64967]+ , [65008..65019]+ , [65024..65039]+ , [65056..65059]+ , [65075..65076]+ , [65101..65103]+ , [65136..65140]+ , [65142..65276]+ , [65279]+ , [65296..65305]+ , [65313..65338]+ , [65343]+ , [65345..65370]+ , [65381..65470]+ , [65474..65479]+ , [65482..65487]+ , [65490..65495]+ , [65498..65500]+ , [65529..65531]+ , [65536..65547]+ , [65549..65574]+ , [65576..65594]+ , [65596..65597]+ , [65599..65613]+ , [65616..65629]+ , [65664..65786]+ , [66304..66334]+ , [66352..66378]+ , [66432..66461]+ , [66560..66717]+ , [66720..66729]+ , [67584..67589]+ , [67592]+ , [67594..67637]+ , [67639..67640]+ , [67644]+ , [67647]+ , [119141..119145]+ , [119149..119170]+ , [119173..119179]+ , [119210..119213]+ , [119808..119892]+ , [119894..119964]+ , [119966..119967]+ , [119970]+ , [119973..119974]+ , [119977..119980]+ , [119982..119993]+ , [119995]+ , [119997..120003]+ , [120005..120069]+ , [120071..120074]+ , [120077..120084]+ , [120086..120092]+ , [120094..120121]+ , [120123..120126]+ , [120128..120132]+ , [120134]+ , [120138..120144]+ , [120146..120483]+ , [120488..120512]+ , [120514..120538]+ , [120540..120570]+ , [120572..120596]+ , [120598..120628]+ , [120630..120654]+ , [120656..120686]+ , [120688..120712]+ , [120714..120744]+ , [120746..120770]+ , [120772..120777]+ , [120782..120831]+ , [131072..173782]+ , [194560..195101]+ ]+ in S.fromList . concat $ r
+ src/Language/Java/Character/IsUnicodeIdentifierStart.hs view
@@ -0,0 +1,390 @@+-- | Simulates the @isDefined@ Java method. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isUnicodeIdentifierStart%28int%29>+module Language.Java.Character.IsUnicodeIdentifierStart+(+ IsUnicodeIdentifierStart(..)+) where++import Data.Char+import Data.Fixed+import Data.Word+import Data.Set(Set)+import qualified Data.Set as S++-- | Instances simulate Java characters and provide a decision on simulating @isUnicodeIdentifierStart@.+class Enum c => IsUnicodeIdentifierStart c where+ isUnicodeIdentifierStart ::+ c+ -> Bool+ isNotUnicodeIdentifierStart ::+ c+ -> Bool+ isNotUnicodeIdentifierStart =+ not . isUnicodeIdentifierStart++instance IsUnicodeIdentifierStart Char where+ isUnicodeIdentifierStart c =+ ord c `S.member` isUnicodeIdentifierStartSet++instance IsUnicodeIdentifierStart Int where+ isUnicodeIdentifierStart c =+ c `S.member` isUnicodeIdentifierStartSet++instance IsUnicodeIdentifierStart Integer where+ isUnicodeIdentifierStart c =+ c `S.member` isUnicodeIdentifierStartSet++instance IsUnicodeIdentifierStart Word8 where+ isUnicodeIdentifierStart c =+ c `S.member` isUnicodeIdentifierStartSet++instance IsUnicodeIdentifierStart Word16 where+ isUnicodeIdentifierStart c =+ c `S.member` isUnicodeIdentifierStartSet++instance IsUnicodeIdentifierStart Word32 where+ isUnicodeIdentifierStart c =+ c `S.member` isUnicodeIdentifierStartSet++instance IsUnicodeIdentifierStart Word64 where+ isUnicodeIdentifierStart c =+ c `S.member` isUnicodeIdentifierStartSet++instance HasResolution a => IsUnicodeIdentifierStart (Fixed a) where+ isUnicodeIdentifierStart c =+ c `S.member` isUnicodeIdentifierStartSet++isUnicodeIdentifierStartSet ::+ (Num a, Enum a, Ord a) =>+ Set a+isUnicodeIdentifierStartSet =+ let r = [+ [65..90]+ , [97..122]+ , [170]+ , [181]+ , [186]+ , [192..214]+ , [216..246]+ , [248..566]+ , [592..705]+ , [710..721]+ , [736..740]+ , [750]+ , [890]+ , [902]+ , [904..906]+ , [908]+ , [910..929]+ , [931..974]+ , [976..1013]+ , [1015..1019]+ , [1024..1153]+ , [1162..1230]+ , [1232..1269]+ , [1272..1273]+ , [1280..1295]+ , [1329..1366]+ , [1369]+ , [1377..1415]+ , [1488..1514]+ , [1520..1522]+ , [1569..1594]+ , [1600..1610]+ , [1646..1647]+ , [1649..1747]+ , [1749]+ , [1765..1766]+ , [1774..1775]+ , [1786..1788]+ , [1791]+ , [1808]+ , [1810..1839]+ , [1869..1871]+ , [1920..1957]+ , [1969]+ , [2308..2361]+ , [2365]+ , [2384]+ , [2392..2401]+ , [2437..2444]+ , [2447..2448]+ , [2451..2472]+ , [2474..2480]+ , [2482]+ , [2486..2489]+ , [2493]+ , [2524..2525]+ , [2527..2529]+ , [2544..2545]+ , [2565..2570]+ , [2575..2576]+ , [2579..2600]+ , [2602..2608]+ , [2610..2611]+ , [2613..2614]+ , [2616..2617]+ , [2649..2652]+ , [2654]+ , [2674..2676]+ , [2693..2701]+ , [2703..2705]+ , [2707..2728]+ , [2730..2736]+ , [2738..2739]+ , [2741..2745]+ , [2749]+ , [2768]+ , [2784..2785]+ , [2821..2828]+ , [2831..2832]+ , [2835..2856]+ , [2858..2864]+ , [2866..2867]+ , [2869..2873]+ , [2877]+ , [2908..2909]+ , [2911..2913]+ , [2929]+ , [2947]+ , [2949..2954]+ , [2958..2960]+ , [2962..2965]+ , [2969..2970]+ , [2972]+ , [2974..2975]+ , [2979..2980]+ , [2984..2986]+ , [2990..2997]+ , [2999..3001]+ , [3077..3084]+ , [3086..3088]+ , [3090..3112]+ , [3114..3123]+ , [3125..3129]+ , [3168..3169]+ , [3205..3212]+ , [3214..3216]+ , [3218..3240]+ , [3242..3251]+ , [3253..3257]+ , [3261]+ , [3294]+ , [3296..3297]+ , [3333..3340]+ , [3342..3344]+ , [3346..3368]+ , [3370..3385]+ , [3424..3425]+ , [3461..3478]+ , [3482..3505]+ , [3507..3515]+ , [3517]+ , [3520..3526]+ , [3585..3632]+ , [3634..3635]+ , [3648..3654]+ , [3713..3714]+ , [3716]+ , [3719..3720]+ , [3722]+ , [3725]+ , [3732..3735]+ , [3737..3743]+ , [3745..3747]+ , [3749]+ , [3751]+ , [3754..3755]+ , [3757..3760]+ , [3762..3763]+ , [3773]+ , [3776..3780]+ , [3782]+ , [3804..3805]+ , [3840]+ , [3904..3911]+ , [3913..3946]+ , [3976..3979]+ , [4096..4129]+ , [4131..4135]+ , [4137..4138]+ , [4176..4181]+ , [4256..4293]+ , [4304..4344]+ , [4352..4441]+ , [4447..4514]+ , [4520..4601]+ , [4608..4614]+ , [4616..4678]+ , [4680]+ , [4682..4685]+ , [4688..4694]+ , [4696]+ , [4698..4701]+ , [4704..4742]+ , [4744]+ , [4746..4749]+ , [4752..4782]+ , [4784]+ , [4786..4789]+ , [4792..4798]+ , [4800]+ , [4802..4805]+ , [4808..4814]+ , [4816..4822]+ , [4824..4846]+ , [4848..4878]+ , [4880]+ , [4882..4885]+ , [4888..4894]+ , [4896..4934]+ , [4936..4954]+ , [5024..5108]+ , [5121..5740]+ , [5743..5750]+ , [5761..5786]+ , [5792..5866]+ , [5870..5872]+ , [5888..5900]+ , [5902..5905]+ , [5920..5937]+ , [5952..5969]+ , [5984..5996]+ , [5998..6000]+ , [6016..6067]+ , [6103]+ , [6108]+ , [6176..6263]+ , [6272..6312]+ , [6400..6428]+ , [6480..6509]+ , [6512..6516]+ , [7424..7531]+ , [7680..7835]+ , [7840..7929]+ , [7936..7957]+ , [7960..7965]+ , [7968..8005]+ , [8008..8013]+ , [8016..8023]+ , [8025]+ , [8027]+ , [8029]+ , [8031..8061]+ , [8064..8116]+ , [8118..8124]+ , [8126]+ , [8130..8132]+ , [8134..8140]+ , [8144..8147]+ , [8150..8155]+ , [8160..8172]+ , [8178..8180]+ , [8182..8188]+ , [8305]+ , [8319]+ , [8450]+ , [8455]+ , [8458..8467]+ , [8469]+ , [8473..8477]+ , [8484]+ , [8486]+ , [8488]+ , [8490..8493]+ , [8495..8497]+ , [8499..8505]+ , [8509..8511]+ , [8517..8521]+ , [8544..8579]+ , [12293..12295]+ , [12321..12329]+ , [12337..12341]+ , [12344..12348]+ , [12353..12438]+ , [12445..12447]+ , [12449..12538]+ , [12540..12543]+ , [12549..12588]+ , [12593..12686]+ , [12704..12727]+ , [12784..12799]+ , [13312..19893]+ , [19968..40869]+ , [40960..42124]+ , [44032..55203]+ , [63744..64045]+ , [64048..64106]+ , [64256..64262]+ , [64275..64279]+ , [64285]+ , [64287..64296]+ , [64298..64310]+ , [64312..64316]+ , [64318]+ , [64320..64321]+ , [64323..64324]+ , [64326..64433]+ , [64467..64829]+ , [64848..64911]+ , [64914..64967]+ , [65008..65019]+ , [65136..65140]+ , [65142..65276]+ , [65313..65338]+ , [65345..65370]+ , [65382..65470]+ , [65474..65479]+ , [65482..65487]+ , [65490..65495]+ , [65498..65500]+ , [65536..65547]+ , [65549..65574]+ , [65576..65594]+ , [65596..65597]+ , [65599..65613]+ , [65616..65629]+ , [65664..65786]+ , [66304..66334]+ , [66352..66378]+ , [66432..66461]+ , [66560..66717]+ , [67584..67589]+ , [67592]+ , [67594..67637]+ , [67639..67640]+ , [67644]+ , [67647]+ , [119808..119892]+ , [119894..119964]+ , [119966..119967]+ , [119970]+ , [119973..119974]+ , [119977..119980]+ , [119982..119993]+ , [119995]+ , [119997..120003]+ , [120005..120069]+ , [120071..120074]+ , [120077..120084]+ , [120086..120092]+ , [120094..120121]+ , [120123..120126]+ , [120128..120132]+ , [120134]+ , [120138..120144]+ , [120146..120483]+ , [120488..120512]+ , [120514..120538]+ , [120540..120570]+ , [120572..120596]+ , [120598..120628]+ , [120630..120654]+ , [120656..120686]+ , [120688..120712]+ , [120714..120744]+ , [120746..120770]+ , [120772..120777]+ , [131072..173782]+ , [194560..195101]+ ]+ in S.fromList . concat $ r
+ src/Language/Java/Character/IsUpperCase.hs view
@@ -0,0 +1,483 @@+-- | Simulates the @isDefined@ Java method. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isUpperCase%28int%29>+module Language.Java.Character.IsUpperCase+(+ IsUpperCase(..)+) where++import Data.Char+import Data.Fixed+import Data.Word+import Data.Set(Set)+import qualified Data.Set as S++-- | Instances simulate Java characters and provide a decision on simulating @isUpperCase@.+class Enum c => IsUpperCase c where+ isUpperCase ::+ c+ -> Bool+ isNotUpperCase ::+ c+ -> Bool+ isNotUpperCase =+ not . isUpperCase++instance IsUpperCase Char where+ isUpperCase c =+ ord c `S.member` isUpperCaseSet++instance IsUpperCase Int where+ isUpperCase c =+ c `S.member` isUpperCaseSet++instance IsUpperCase Integer where+ isUpperCase c =+ c `S.member` isUpperCaseSet++instance IsUpperCase Word8 where+ isUpperCase c =+ c `S.member` isUpperCaseSet++instance IsUpperCase Word16 where+ isUpperCase c =+ c `S.member` isUpperCaseSet++instance IsUpperCase Word32 where+ isUpperCase c =+ c `S.member` isUpperCaseSet++instance IsUpperCase Word64 where+ isUpperCase c =+ c `S.member` isUpperCaseSet++instance HasResolution a => IsUpperCase (Fixed a) where+ isUpperCase c =+ c `S.member` isUpperCaseSet++isUpperCaseSet ::+ (Num a, Enum a, Ord a) =>+ Set a+isUpperCaseSet =+ let r = [+ [65..90]+ , [192..214]+ , [216..222]+ , [256]+ , [258]+ , [260]+ , [262]+ , [264]+ , [266]+ , [268]+ , [270]+ , [272]+ , [274]+ , [276]+ , [278]+ , [280]+ , [282]+ , [284]+ , [286]+ , [288]+ , [290]+ , [292]+ , [294]+ , [296]+ , [298]+ , [300]+ , [302]+ , [304]+ , [306]+ , [308]+ , [310]+ , [313]+ , [315]+ , [317]+ , [319]+ , [321]+ , [323]+ , [325]+ , [327]+ , [330]+ , [332]+ , [334]+ , [336]+ , [338]+ , [340]+ , [342]+ , [344]+ , [346]+ , [348]+ , [350]+ , [352]+ , [354]+ , [356]+ , [358]+ , [360]+ , [362]+ , [364]+ , [366]+ , [368]+ , [370]+ , [372]+ , [374]+ , [376..377]+ , [379]+ , [381]+ , [385..386]+ , [388]+ , [390..391]+ , [393..395]+ , [398..401]+ , [403..404]+ , [406..408]+ , [412..413]+ , [415..416]+ , [418]+ , [420]+ , [422..423]+ , [425]+ , [428]+ , [430..431]+ , [433..435]+ , [437]+ , [439..440]+ , [444]+ , [452]+ , [455]+ , [458]+ , [461]+ , [463]+ , [465]+ , [467]+ , [469]+ , [471]+ , [473]+ , [475]+ , [478]+ , [480]+ , [482]+ , [484]+ , [486]+ , [488]+ , [490]+ , [492]+ , [494]+ , [497]+ , [500]+ , [502..504]+ , [506]+ , [508]+ , [510]+ , [512]+ , [514]+ , [516]+ , [518]+ , [520]+ , [522]+ , [524]+ , [526]+ , [528]+ , [530]+ , [532]+ , [534]+ , [536]+ , [538]+ , [540]+ , [542]+ , [544]+ , [546]+ , [548]+ , [550]+ , [552]+ , [554]+ , [556]+ , [558]+ , [560]+ , [562]+ , [902]+ , [904..906]+ , [908]+ , [910..911]+ , [913..929]+ , [931..939]+ , [978..980]+ , [984]+ , [986]+ , [988]+ , [990]+ , [992]+ , [994]+ , [996]+ , [998]+ , [1000]+ , [1002]+ , [1004]+ , [1006]+ , [1012]+ , [1015]+ , [1017..1018]+ , [1024..1071]+ , [1120]+ , [1122]+ , [1124]+ , [1126]+ , [1128]+ , [1130]+ , [1132]+ , [1134]+ , [1136]+ , [1138]+ , [1140]+ , [1142]+ , [1144]+ , [1146]+ , [1148]+ , [1150]+ , [1152]+ , [1162]+ , [1164]+ , [1166]+ , [1168]+ , [1170]+ , [1172]+ , [1174]+ , [1176]+ , [1178]+ , [1180]+ , [1182]+ , [1184]+ , [1186]+ , [1188]+ , [1190]+ , [1192]+ , [1194]+ , [1196]+ , [1198]+ , [1200]+ , [1202]+ , [1204]+ , [1206]+ , [1208]+ , [1210]+ , [1212]+ , [1214]+ , [1216..1217]+ , [1219]+ , [1221]+ , [1223]+ , [1225]+ , [1227]+ , [1229]+ , [1232]+ , [1234]+ , [1236]+ , [1238]+ , [1240]+ , [1242]+ , [1244]+ , [1246]+ , [1248]+ , [1250]+ , [1252]+ , [1254]+ , [1256]+ , [1258]+ , [1260]+ , [1262]+ , [1264]+ , [1266]+ , [1268]+ , [1272]+ , [1280]+ , [1282]+ , [1284]+ , [1286]+ , [1288]+ , [1290]+ , [1292]+ , [1294]+ , [1329..1366]+ , [4256..4293]+ , [7680]+ , [7682]+ , [7684]+ , [7686]+ , [7688]+ , [7690]+ , [7692]+ , [7694]+ , [7696]+ , [7698]+ , [7700]+ , [7702]+ , [7704]+ , [7706]+ , [7708]+ , [7710]+ , [7712]+ , [7714]+ , [7716]+ , [7718]+ , [7720]+ , [7722]+ , [7724]+ , [7726]+ , [7728]+ , [7730]+ , [7732]+ , [7734]+ , [7736]+ , [7738]+ , [7740]+ , [7742]+ , [7744]+ , [7746]+ , [7748]+ , [7750]+ , [7752]+ , [7754]+ , [7756]+ , [7758]+ , [7760]+ , [7762]+ , [7764]+ , [7766]+ , [7768]+ , [7770]+ , [7772]+ , [7774]+ , [7776]+ , [7778]+ , [7780]+ , [7782]+ , [7784]+ , [7786]+ , [7788]+ , [7790]+ , [7792]+ , [7794]+ , [7796]+ , [7798]+ , [7800]+ , [7802]+ , [7804]+ , [7806]+ , [7808]+ , [7810]+ , [7812]+ , [7814]+ , [7816]+ , [7818]+ , [7820]+ , [7822]+ , [7824]+ , [7826]+ , [7828]+ , [7840]+ , [7842]+ , [7844]+ , [7846]+ , [7848]+ , [7850]+ , [7852]+ , [7854]+ , [7856]+ , [7858]+ , [7860]+ , [7862]+ , [7864]+ , [7866]+ , [7868]+ , [7870]+ , [7872]+ , [7874]+ , [7876]+ , [7878]+ , [7880]+ , [7882]+ , [7884]+ , [7886]+ , [7888]+ , [7890]+ , [7892]+ , [7894]+ , [7896]+ , [7898]+ , [7900]+ , [7902]+ , [7904]+ , [7906]+ , [7908]+ , [7910]+ , [7912]+ , [7914]+ , [7916]+ , [7918]+ , [7920]+ , [7922]+ , [7924]+ , [7926]+ , [7928]+ , [7944..7951]+ , [7960..7965]+ , [7976..7983]+ , [7992..7999]+ , [8008..8013]+ , [8025]+ , [8027]+ , [8029]+ , [8031]+ , [8040..8047]+ , [8120..8123]+ , [8136..8139]+ , [8152..8155]+ , [8168..8172]+ , [8184..8187]+ , [8450]+ , [8455]+ , [8459..8461]+ , [8464..8466]+ , [8469]+ , [8473..8477]+ , [8484]+ , [8486]+ , [8488]+ , [8490..8493]+ , [8496..8497]+ , [8499]+ , [8510..8511]+ , [8517]+ , [65313..65338]+ , [66560..66599]+ , [119808..119833]+ , [119860..119885]+ , [119912..119937]+ , [119964]+ , [119966..119967]+ , [119970]+ , [119973..119974]+ , [119977..119980]+ , [119982..119989]+ , [120016..120041]+ , [120068..120069]+ , [120071..120074]+ , [120077..120084]+ , [120086..120092]+ , [120120..120121]+ , [120123..120126]+ , [120128..120132]+ , [120134]+ , [120138..120144]+ , [120172..120197]+ , [120224..120249]+ , [120276..120301]+ , [120328..120353]+ , [120380..120405]+ , [120432..120457]+ , [120488..120512]+ , [120546..120570]+ , [120604..120628]+ , [120662..120686]+ , [120720..120744]+ ]+ in S.fromList . concat $ r
+ src/Language/Java/Character/IsValidCodePoint.hs view
@@ -0,0 +1,63 @@+-- | Simulates the @isDefined@ Java method. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isValidCodePoint%28int%29>+module Language.Java.Character.IsValidCodePoint+(+ IsValidCodePoint(..)+) where++import Data.Char+import Data.Fixed+import Data.Word+import Data.Set(Set)+import qualified Data.Set as S++-- | Instances simulate Java characters and provide a decision on simulating @isValidCodePoint@.+class Enum c => IsValidCodePoint c where+ isValidCodePoint ::+ c+ -> Bool+ isNotValidCodePoint ::+ c+ -> Bool+ isNotValidCodePoint =+ not . isValidCodePoint++instance IsValidCodePoint Char where+ isValidCodePoint c =+ ord c `S.member` isValidCodePointSet++instance IsValidCodePoint Int where+ isValidCodePoint c =+ c `S.member` isValidCodePointSet++instance IsValidCodePoint Integer where+ isValidCodePoint c =+ c `S.member` isValidCodePointSet++instance IsValidCodePoint Word8 where+ isValidCodePoint c =+ c `S.member` isValidCodePointSet++instance IsValidCodePoint Word16 where+ isValidCodePoint c =+ c `S.member` isValidCodePointSet++instance IsValidCodePoint Word32 where+ isValidCodePoint c =+ c `S.member` isValidCodePointSet++instance IsValidCodePoint Word64 where+ isValidCodePoint c =+ c `S.member` isValidCodePointSet++instance HasResolution a => IsValidCodePoint (Fixed a) where+ isValidCodePoint c =+ c `S.member` isValidCodePointSet++isValidCodePointSet ::+ (Num a, Enum a, Ord a) =>+ Set a+isValidCodePointSet =+ let r = [+ [0..1114111]+ ]+ in S.fromList . concat $ r
+ src/Language/Java/Character/IsWhitespace.hs view
@@ -0,0 +1,71 @@+-- | Simulates the @isDefined@ Java method. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isWhitespace%28int%29>+module Language.Java.Character.IsWhitespace+(+ IsWhitespace(..)+) where++import Data.Char+import Data.Fixed+import Data.Word+import Data.Set(Set)+import qualified Data.Set as S++-- | Instances simulate Java characters and provide a decision on simulating @isWhitespace@.+class Enum c => IsWhitespace c where+ isWhitespace ::+ c+ -> Bool+ isNotWhitespace ::+ c+ -> Bool+ isNotWhitespace =+ not . isWhitespace++instance IsWhitespace Char where+ isWhitespace c =+ ord c `S.member` isWhitespaceSet++instance IsWhitespace Int where+ isWhitespace c =+ c `S.member` isWhitespaceSet++instance IsWhitespace Integer where+ isWhitespace c =+ c `S.member` isWhitespaceSet++instance IsWhitespace Word8 where+ isWhitespace c =+ c `S.member` isWhitespaceSet++instance IsWhitespace Word16 where+ isWhitespace c =+ c `S.member` isWhitespaceSet++instance IsWhitespace Word32 where+ isWhitespace c =+ c `S.member` isWhitespaceSet++instance IsWhitespace Word64 where+ isWhitespace c =+ c `S.member` isWhitespaceSet++instance HasResolution a => IsWhitespace (Fixed a) where+ isWhitespace c =+ c `S.member` isWhitespaceSet++isWhitespaceSet ::+ (Num a, Enum a, Ord a) =>+ Set a+isWhitespaceSet =+ let r = [+ [9..13]+ , [28..32]+ , [5760]+ , [6158]+ , [8192..8198]+ , [8200..8203]+ , [8232..8233]+ , [8287]+ , [12288]+ ]+ in S.fromList . concat $ r