Giter Club home page Giter Club logo

large-hashable's Introduction

LargeHashable

Build Status Hackage

Efficiently hash Haskell values with MD5, SHA256, SHA512 and other hashing algorithms.

Install

  • Using cabal: cabal install large-hashable
  • Using Stack: stack install large-hashable

Building from git repository

  • clone the repository
  • Install the stack tool (http://haskellstack.org)
  • stack build builds the code
  • stack test builds the code and runs the tests
  • run-benchmarks.sh runs the benchmark suite

large-hashable's People

Contributors

agrafix avatar skogsbaer avatar sternenseemann avatar tvh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

large-hashable's Issues

Missing header file in 0.1.0.2

> /tmp/stackage-build8$ stack unpack large-hashable-0.1.0.2
Unpacked large-hashable-0.1.0.2 to /tmp/stackage-build8/large-hashable-0.1.0.2/
> /tmp/stackage-build8/large-hashable-0.1.0.2$ runghc -clear-package-db -global-package-db -package-db=/var/stackage/work/builds/nightly/pkgdb Setup configure --package-db=clear --package-db=global --package-db=/var/stackage/work/builds/nightly/pkgdb --libdir=/var/stackage/work/builds/nightly/lib --bindir=/var/stackage/work/builds/nightly/bin --datadir=/var/stackage/work/builds/nightly/share --libexecdir=/var/stackage/work/builds/nightly/libexec --sysconfdir=/var/stackage/work/builds/nightly/etc --docdir=/var/stackage/work/builds/nightly/doc/large-hashable-0.1.0.2 --htmldir=/var/stackage/work/builds/nightly/doc/large-hashable-0.1.0.2 --haddockdir=/var/stackage/work/builds/nightly/doc/large-hashable-0.1.0.2 --flags=
Configuring large-hashable-0.1.0.2...
> /tmp/stackage-build8/large-hashable-0.1.0.2$ runghc -clear-package-db -global-package-db -package-db=/var/stackage/work/builds/nightly/pkgdb Setup build
Building large-hashable-0.1.0.2...
Preprocessing library large-hashable-0.1.0.2...
[1 of 6] Compiling Data.LargeHashable.Intern ( src/Data/LargeHashable/Intern.hs, dist/build/Data/LargeHashable/Intern.o )
[2 of 6] Compiling Data.LargeHashable.Class ( src/Data/LargeHashable/Class.hs, dist/build/Data/LargeHashable/Class.o )
[3 of 6] Compiling Data.LargeHashable.TH ( src/Data/LargeHashable/TH.hs, dist/build/Data/LargeHashable/TH.o )

src/Data/LargeHashable/TH.hs:191:21: warning: [-Wincomplete-patterns]
    Pattern match(es) are non-exhaustive
    In a case alternative:
        Patterns not matched:
            (GadtC [] _ _)
            (GadtC (_:_:_) _ _)
            (RecGadtC [] _ _)
            (RecGadtC (_:_:_) _ _)
[4 of 6] Compiling Data.LargeHashable.LargeWord ( src/Data/LargeHashable/LargeWord.hs, dist/build/Data/LargeHashable/LargeWord.o )
[5 of 6] Compiling Data.LargeHashable.MD5 ( src/Data/LargeHashable/MD5.hs, dist/build/Data/LargeHashable/MD5.o )
[6 of 6] Compiling Data.LargeHashable ( src/Data/LargeHashable.hs, dist/build/Data/LargeHashable.o )

cbits/md5.c:27:19: error:
     fatal error: bitfn.h: No such file or directory
compilation terminated.
`gcc' failed in phase `C Compiler'. (Exit code: 1)

large-hashable-0.1.0.3 build fails on x86 platform

Citing from https://build.opensuse.org/package/live_build_log/devel:languages:haskell:lts:8/ghc-large-hashable/openSUSE_Tumbleweed/i586:

[   69s] src/Data/LargeHashable/MD5.hs:97:20: error:
[   69s]     • Couldn't match expected type ‘Word32’ with actual type ‘Word64’
[   69s]     • In the first argument of ‘f’, namely ‘(w128_first h)’
[   69s]       In a stmt of a 'do' block: f (w128_first h)
[   69s]       In the expression:
[   69s]         do { f (w128_first h);
[   69s]              f (w128_second h) }
[   69s] 
[   69s] src/Data/LargeHashable/MD5.hs:98:20: error:
[   69s]     • Couldn't match expected type ‘Word32’ with actual type ‘Word64’
[   69s]     • In the first argument of ‘f’, namely ‘(w128_second h)’
[   69s]       In a stmt of a 'do' block: f (w128_second h)
[   69s]       In the expression:
[   69s]         do { f (w128_first h);
[   69s]              f (w128_second h) }
[   69s] [4 of 6] Compiling Data.LargeHashable.Class ( src/Data/LargeHashable/Class.hs, dist/build/Data/LargeHashable/Class.o )
[   69s] 
[   69s] src/Data/LargeHashable/Class.hs:177:18: error:
[   69s]     • Couldn't match type ‘Int64’ with ‘Int32’
[   69s]       Expected type: Int64 -> LH ()
[   69s]         Actual type: Int32 -> LH ()
[   69s]     • In the expression: updateHashWithFun hu_updateLong . CLong
[   69s]       In an equation for ‘updateHash’:
[   69s]           updateHash = updateHashWithFun hu_updateLong . CLong
[   69s]       In the instance declaration for ‘LargeHashable Int64’
[   69s] 
[   69s] src/Data/LargeHashable/Class.hs:192:18: error:
[   69s]     • Couldn't match type ‘Word64’ with ‘Word32’
[   69s]       Expected type: Word64 -> LH ()
[   69s]         Actual type: Word32 -> LH ()
[   69s]     • In the expression: updateHashWithFun hu_updateULong . CULong
[   69s]       In an equation for ‘updateHash’:
[   69s]           updateHash = updateHashWithFun hu_updateULong . CULong
[   69s]       In the instance declaration for ‘LargeHashable Word64’
[   69s] error: Bad exit status from /var/tmp/rpm-tmp.gg9nkp (%build)

Compilation is broken on aarch64

Seems like the content of CChar is platform dependent.

[1 of 6] Compiling Data.LargeHashable.Intern ( src/Data/LargeHashable/Intern.hs, dist/build/Data/LargeHashable/Intern.o, dist/build/Data/LargeHashable/Intern.dyn_o )
[2 of 6] Compiling Data.LargeHashable.Class ( src/Data/LargeHashable/Class.hs, dist/build/Data/LargeHashable/Class.o, dist/build/Data/LargeHashable/Class.dyn_o )

src/Data/LargeHashable/Class.hs:195:60: error:
    • Couldn't match expected type ‘Int8’ with actual type ‘Word8’
    • In the second argument of ‘updateHashWithFun’, namely ‘i’
      In the expression: updateHashWithFun hu_updateChar i
      In an equation for ‘updateHash’:
          updateHash (CChar i) = updateHashWithFun hu_updateChar i
    |
195 |     updateHash (CChar i) = updateHashWithFun hu_updateChar i
    |                                                            ^
[3 of 6] Compiling Data.LargeHashable.LargeWord ( src/Data/LargeHashable/LargeWord.hs, dist/build/Data/LargeHashable/LargeWord.o, dist/build/Data/LargeHashable/LargeWord.dyn_o )
[4 of 6] Compiling Data.LargeHashable.MD5 ( src/Data/LargeHashable/MD5.hs, dist/build/Data/LargeHashable/MD5.o, dist/build/Data/LargeHashable/MD5.dyn_o )

v0.1.0.4 is incompatible with GHC 8.8 and up

src/Data/LargeHashable/TH.hs:73:53: error:
    • Couldn't match expected type ‘Name’
                  with actual type ‘Maybe [TyVarBndr]’
    • In the first argument of ‘ConT’, namely ‘name’
      In the second argument of ‘foldl’, namely ‘(ConT name)’
      In the first argument of ‘buildInstance’, namely
        ‘(foldl AppT (ConT name) types)’
   |
73 |                     buildInstance (foldl AppT (ConT name) types) context [] cons
   |                                                     ^^^^

src/Data/LargeHashable/TH.hs:73:59: error:
    • Couldn't match expected type ‘t0 Type’ with actual type ‘Type’
    • In the third argument of ‘foldl’, namely ‘types’
      In the first argument of ‘buildInstance’, namely
        ‘(foldl AppT (ConT name) types)’
      In the expression:
        buildInstance (foldl AppT (ConT name) types) context [] cons
   |
73 |                     buildInstance (foldl AppT (ConT name) types) context [] cons
   |                                                           ^^^^^

src/Data/LargeHashable/TH.hs:79:53: error:
    • Couldn't match expected type ‘Name’
                  with actual type ‘Maybe [TyVarBndr]’
    • In the first argument of ‘ConT’, namely ‘name’
      In the second argument of ‘foldl’, namely ‘(ConT name)’
      In the first argument of ‘buildInstance’, namely
        ‘(foldl AppT (ConT name) types)’
   |
79 |                     buildInstance (foldl AppT (ConT name) types) context [] [con]
   |                                                     ^^^^

src/Data/LargeHashable/TH.hs:79:59: error:
    • Couldn't match expected type ‘t1 Type’ with actual type ‘Type’
    • In the third argument of ‘foldl’, namely ‘types’
      In the first argument of ‘buildInstance’, namely
        ‘(foldl AppT (ConT name) types)’
      In the expression:
        buildInstance (foldl AppT (ConT name) types) context [] [con]
   |
79 |                     buildInstance (foldl AppT (ConT name) types) context [] [con]
   |                                                           ^^^^^
cabal: Failed to build large-hashable-0.1.0.4. See the build log above for
details.

Apparently this was fixed in #16, which hasn't been released yet.

large hashable for Data.Text is broken

Under certain conditions, largeHash returns different hash values for the same text value.

Source code:

module Control.Test (test, main, pack) where

import Data.LargeHashable
import qualified Data.Text as T

pack :: String -> T.Text
pack = T.pack

test :: T.Text -> IO ()
test x = do
  print $ largeHash md5HashAlgorithm (T.pack "x")
  print $ largeHash md5HashAlgorithm (T.pack "x")
  print $ largeHash md5HashAlgorithm x
  print $ largeHash md5HashAlgorithm x

main :: IO ()
main = test (T.pack "x")

Interactive session with ghci:

$ stack ghci src/Control/Test.hs
Using configuration for incremental-computations:lib to load /Users/swehr/devel/incremental-computations/src/Control/Test.hs
incremental-computations> initial-build-steps (lib)
Configuring GHCi with the following packages: incremental-computations
GHCi, version 9.4.5: https://www.haskell.org/ghc/  :? for help
Loaded GHCi configuration from /Users/swehr/.ghci
[1 of 1] Compiling Control.Test     ( /Users/swehr/devel/incremental-computations/src/Control/Test.hs, interpreted )
Ok, one module loaded.
Loaded GHCi configuration from /private/var/folders/8r/25v12lxd02zdm7lpky3xcnh80000gn/T/haskell-stack-ghci/a15819e2/ghci-script
>>> main
fae8a0e297ee780aa2cd400861e40652
c2fb76d37033e4b52cccf47e19edf3c4
6ca7abe5158e8298bc579c6b1bc45c00
73c36f458440f90466fd11ed297e5dc3

GHC version 9.4.5, text version 2.0.2

I think it has something to do with text 2 now using utf-8. The updateHashTextData function looks fishy, it relies on a two byte encoding:

updateHashTextData :: T.Text -> LH ()
updateHashTextData !t = do
    updates <- hashUpdates
    ioInLH $ do
	TF.useAsPtr t $ \valPtr units ->
            hu_updatePtr updates (castPtr valPtr) (fromIntegral (2 * units))
	return ()

Missing build tool dependency on `cpphs`

Failed to build large-hashable-0.1.0.4.
Build log (
/home/simon/.cabal/logs/ghc-9.0.1/large-hashable-0.1.0.4-32a4f5cfdba8b1b9eb381b52594b3f9418d00f43f872c832e7653a1fc602f7fa.log
):
Configuring library for large-hashable-0.1.0.4..
Preprocessing library for large-hashable-0.1.0.4..
Building library for large-hashable-0.1.0.4..
ghc: could not execute: cpphs
cabal: Failed to build large-hashable-0.1.0.4. See the build log above for
details.

This should be fixed by adding cpphs to the build-tool-depends.

Test suite fails on master in Data.LargeHashable.Tests.Inspection:genericSumGetsOptimized

$ stack test

[TEST] Data.LargeHashable.Tests.Inspection:genericSumGetsOptimized (test/Data/LargeHashable/Tests/Inspection.hs:40)
assertFailure test/Data/LargeHashable/Tests/Inspection.hs:41:11: genericUpdateHashSum mentions none of GHC.Generics.V1, GHC.Generics.U1, GHC.Generics.M1, GHC.Generics.K1, GHC.Generics.:+:, GHC.Generics.:*:, GHC.Generics.:.:, GHC.Generics.Rec1, GHC.Generics.Par1 failed:
genericUpdateHashSum :: SumTest -> LH ()
[LclIdX,
 Arity=1,
 Str=<S,1*U>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [220] 512 240}]
genericUpdateHashSum
  = \ (eta [Dmd=<S,1*U>] :: SumTest) ->
      case eta of {
        A g1 ->
          ($j_s1GzQ
             (L1
                @(*)
                @(M1
                    C
                    ('MetaCons "A" 'PrefixI 'False)
                    (M1
                       S
                       ('MetaSel
                          'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
                       (K1 R Int)))
                @(M1
                    C
                    ('MetaCons "B" 'PrefixI 'False)
                    (M1
                       S
                       ('MetaSel
                          'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
                       (K1 R Char)))
                @Any
                (g1
                 `cast` (Sym (N:K1[0] <*>_N <R>_P <Int>_R <Any>_P) ; (Sym (N:M1[0]
                                                                               <*>_N
                                                                               <S>_P
                                                                               <'MetaSel
                                                                                  'Nothing
                                                                                  'NoSourceUnpackedness
                                                                                  'NoSourceStrictness
                                                                                  'DecidedLazy>_P
                                                                               <K1
                                                                                  R
                                                                                  Int>_R) ; Sym (N:M1[0]
                                                                                                     <*>_N
                                                                                                     <C>_P
                                                                                                     <'MetaCons
                                                                                                        "A"
                                                                                                        'PrefixI
                                                                                                        'False>_P
                                                                                                     <M1
                                                                                                        S
                                                                                                        ('MetaSel
                                                                                                           'Nothing
                                                                                                           'NoSourceUnpackedness
                                                                                                           'NoSourceStrictness
                                                                                                           'DecidedLazy)
                                                                                                        (K1
                                                                                                           R
                                                                                                           Int)>_R)) <Any>_N
                         :: Coercible
                              Int
                              (M1
                                 C
                                 ('MetaCons "A" 'PrefixI 'False)
                                 (M1
                                    S
                                    ('MetaSel
                                       'Nothing
                                       'NoSourceUnpackedness
                                       'NoSourceStrictness
                                       'DecidedLazy)
                                    (K1 R Int))
                                 Any)))))
          `cast` ((<LHEnv>_R
                   %<'Many>_N ->_R Sym (N:IO[0] <()>_R)) ; Sym (N:LH[0] <()>_R)
                  :: Coercible
                       (LHEnv -> State# RealWorld -> (# State# RealWorld, () #)) (LH ()));
        B g1 ->
          ($j_s1GzQ
             (R1
                @(*)
                @(M1
                    C
                    ('MetaCons "A" 'PrefixI 'False)
                    (M1
                       S
                       ('MetaSel
                          'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
                       (K1 R Int)))
                @(M1
                    C
                    ('MetaCons "B" 'PrefixI 'False)
                    (M1
                       S
                       ('MetaSel
                          'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
                       (K1 R Char)))
                @Any
                (g1
                 `cast` (Sym (N:K1[0] <*>_N <R>_P <Char>_R <Any>_P) ; (Sym (N:M1[0]
                                                                                <*>_N
                                                                                <S>_P
                                                                                <'MetaSel
                                                                                   'Nothing
                                                                                   'NoSourceUnpackedness
                                                                                   'NoSourceStrictness
                                                                                   'DecidedLazy>_P
                                                                                <K1
                                                                                   R
                                                                                   Char>_R) ; Sym (N:M1[0]
                                                                                                       <*>_N
                                                                                                       <C>_P
                                                                                                       <'MetaCons
                                                                                                          "B"
                                                                                                          'PrefixI
                                                                                                          'False>_P
                                                                                                       <M1
                                                                                                          S
                                                                                                          ('MetaSel
                                                                                                             'Nothing
                                                                                                             'NoSourceUnpackedness
                                                                                                             'NoSourceStrictness
                                                                                                             'DecidedLazy)
                                                                                                          (K1
                                                                                                             R
                                                                                                             Char)>_R)) <Any>_N
                         :: Coercible
                              Char
                              (M1
                                 C
                                 ('MetaCons "B" 'PrefixI 'False)
                                 (M1
                                    S
                                    ('MetaSel
                                       'Nothing
                                       'NoSourceUnpackedness
                                       'NoSourceStrictness
                                       'DecidedLazy)
                                    (K1 R Char))
                                 Any)))))
          `cast` ((<LHEnv>_R
                   %<'Many>_N ->_R Sym (N:IO[0] <()>_R)) ; Sym (N:LH[0] <()>_R)
                  :: Coercible
                       (LHEnv -> State# RealWorld -> (# State# RealWorld, () #)) (LH ()));
        C g1 ->
          let {
            ds1 [Dmd=<L,C(C1(U))>] :: LH ()
            [LclId,
             Unf=Unf{Src=<vanilla>, TopLvl=False, Value=False, ConLike=False,
                     WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 20 0}]
            ds1 = updateHashInteger g1 } in
          (\ (env [Dmd=<L,U(U(U,U,U,U,U),U)>] :: LHEnv)
             (s :: State# RealWorld) ->
             case env of wild1
             { LHEnv ds2 [Dmd=<S(LLLLC(C(S))),U(U,U,U,U,U)>] ds3 ->
             case ds2 of
             { HashUpdates ds4 [Dmd=<L,A>] ds5 [Dmd=<L,A>] ds6 [Dmd=<L,A>]
                           ds7 [Dmd=<L,A>] ds8 [Dmd=<C(C(S)),1*C1(C1(U(U,A)))>] ->
             case ((ds8 x_s1Fkm)
                   `cast` (N:IO[0] <()>_R
                           :: Coercible
                                (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
                    s
             of
             { (# ipv1, ipv2 [Dmd=<L,A>] #) ->
             (((ds1
                `cast` (N:LH[0] <()>_R :: Coercible (LH ()) (LHEnv -> IO ())))
                 wild1)
              `cast` (N:IO[0] <()>_R
                      :: Coercible
                           (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
               ipv1
             }
             }
             })
          `cast` ((<LHEnv>_R
                   %<'Many>_N ->_R Sym (N:IO[0] <()>_R)) ; Sym (N:LH[0] <()>_R)
                  :: Coercible
                       (LHEnv -> State# RealWorld -> (# State# RealWorld, () #)) (LH ()));
        D g1 ->
          (\ (env [Dmd=<L,U(U(A,A,A,C(C1(U)),C(C1(U(U,U)))),A)>] :: LHEnv)
             (s :: State# RealWorld) ->
             case env of
             { LHEnv ds [Dmd=<S(LLLLC(C(S))),1*U(A,A,A,1*C1(C1(U)),C(C1(U(U,U))))>]
                     ds2 [Dmd=<L,A>] ->
             case ds of
             { HashUpdates ds3 [Dmd=<L,A>] ds4 [Dmd=<L,A>] ds5 [Dmd=<L,A>]
                           ds6 [Dmd=<L,1*C1(C1(U))>] ds7 [Dmd=<C(C(S)),C(C1(U(U,U)))>] ->
             case ((ds7 x_s1FkL)
                   `cast` (N:IO[0] <()>_R
                           :: Coercible
                                (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
                    s
             of
             { (# ipv1, ipv2 [Dmd=<L,A>] #) ->
             case g1 of {
               Left l [Dmd=<S,1*U(U)>] ->
                 case l of { I# ipv ->
                 case ((ds7 $fLargeHashableEither2)
                       `cast` (N:IO[0] <()>_R
                               :: Coercible
                                    (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
                        ipv1
                 of
                 { (# ipv, ipv1 [Dmd=<L,A>] #) ->
                 ((ds7 (W64# (int2Word# ipv)))
                  `cast` (N:IO[0] <()>_R
                          :: Coercible
                               (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
                   ipv
                 }
                 };
               Right r [Dmd=<S,1*U(U)>] ->
                 case r of { C# ipv ->
                 case ((ds7 $fLargeHashableEither1)
                       `cast` (N:IO[0] <()>_R
                               :: Coercible
                                    (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
                        ipv1
                 of
                 { (# ipv, ipv1 [Dmd=<L,A>] #) ->
                 ((ds6
                     (let {
                        i# :: Int#
                        [LclId,
                         Unf=Unf{Src=<vanilla>, TopLvl=False, Value=False, ConLike=False,
                                 WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 0 0}]
                        i# = ord# ipv } in
                      case >=# i# 0# of {
                        __DEFAULT -> $wlvl1 i#;
                        1# ->
                          case <=# i# 4294967295# of {
                            __DEFAULT -> $wlvl1 i#;
                            1# -> W32# (int2Word# i#)
                          }
                      }))
                  `cast` (N:IO[0] <()>_R
                          :: Coercible
                               (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
                   ipv
                 }
                 }
             }
             }
             }
             })
          `cast` ((<LHEnv>_R
                   %<'Many>_N ->_R Sym (N:IO[0] <()>_R)) ; Sym (N:LH[0] <()>_R)
                  :: Coercible
                       (LHEnv -> State# RealWorld -> (# State# RealWorld, () #)) (LH ()))
      }

x_s1FjX :: Word64
[LclId,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
x_s1FjX = W64# 0##

x_s1Fkm :: Word64
[LclId,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
x_s1Fkm = W64# 1##

x_s1FkL :: Word64
[LclId,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
x_s1FkL = W64# 2##

$j_s1GzQ
  :: (:+:)
       (C1
          ('MetaCons "A" 'PrefixI 'False)
          (S1
             ('MetaSel
                'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
             (Rec0 Int)))
       (C1
          ('MetaCons "B" 'PrefixI 'False)
          (S1
             ('MetaSel
                'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
             (Rec0 Char)))
       Any
     -> LHEnv -> State# RealWorld -> (# State# RealWorld, () #)
[LclId,
 Arity=3,
 Str=<L,1*U><S(S(LLLLC(C(S)))L),1*U(1*U(A,A,A,1*C1(C1(U)),C(C1(U(U,U)))),A)><L,U>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
         WorkFree=True, Expandable=True, Guidance=IF_ARGS [100 20 0] 292 0}]
$j_s1GzQ
  = \ (x [Dmd=<L,1*U>, OS=OneShot]
         :: (:+:)
              (C1
                 ('MetaCons "A" 'PrefixI 'False)
                 (S1
                    ('MetaSel
                       'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
                    (Rec0 Int)))
              (C1
                 ('MetaCons "B" 'PrefixI 'False)
                 (S1
                    ('MetaSel
                       'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy)
                    (Rec0 Char)))
              Any)
      (env [Dmd=<S(S(LLLLC(C(S)))L),1*U(1*U(A,A,A,1*C1(C1(U)),C(C1(U(U,U)))),A)>]
         :: LHEnv)
      (s :: State# RealWorld) ->
      case env of
      { LHEnv ds [Dmd=<S(LLLLC(C(S))),1*U(A,A,A,1*C1(C1(U)),C(C1(U(U,U))))>]
              ds2 [Dmd=<L,A>] ->
      case ds of
      { HashUpdates ds3 [Dmd=<L,A>] ds4 [Dmd=<L,A>] ds5 [Dmd=<L,A>]
                    ds6 [Dmd=<L,1*C1(C1(U))>] ds7 [Dmd=<C(C(S)),C(C1(U(U,U)))>] ->
      case ((ds7 x_s1FjX)
            `cast` (N:IO[0] <()>_R
                    :: Coercible
                         (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
             s
      of
      { (# ipv, ipv1 [Dmd=<L,A>] #) ->
      case x of {
        L1 x [Dmd=<L,1*U(U)>] ->
          case ((ds7 x_s1FjX)
                `cast` (N:IO[0] <()>_R
                        :: Coercible
                             (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
                 ipv
          of
          { (# ipv, ipv1 [Dmd=<L,A>] #) ->
          ((ds7
              (case x
                    `cast` ((N:M1[0]
                                 <*>_N
                                 <C>_P
                                 <'MetaCons "A" 'PrefixI 'False>_P
                                 <M1
                                    S
                                    ('MetaSel
                                       'Nothing
                                       'NoSourceUnpackedness
                                       'NoSourceStrictness
                                       'DecidedLazy)
                                    (Rec0 Int)>_R ; N:M1[0]
                                                        <*>_N
                                                        <S>_P
                                                        <'MetaSel
                                                           'Nothing
                                                           'NoSourceUnpackedness
                                                           'NoSourceStrictness
                                                           'DecidedLazy>_P
                                                        <K1 R Int>_R) <Any>_N ; (N:K1[0]
                                                                                     <*>_N
                                                                                     <R>_P
                                                                                     <Int>_R
                                                                                     <Any>_P ; Nth:3
                                                                                                   (<Int>_R
                                                                                                    %<'Many>_N ->_R N:LH[0]
                                                                                                                        <()>_R ; (<LHEnv>_R
                                                                                                                                  %<'Many>_N ->_R N:IO[0]
                                                                                                                                                      <()>_R)))
                            :: Coercible
                                 (M1
                                    C
                                    ('MetaCons "A" 'PrefixI 'False)
                                    (M1
                                       S
                                       ('MetaSel
                                          'Nothing
                                          'NoSourceUnpackedness
                                          'NoSourceStrictness
                                          'DecidedLazy)
                                       (Rec0 Int))
                                    Any)
                                 Int)
               of
               { I# x# ->
               W64# (int2Word# x#)
               }))
           `cast` (N:IO[0] <()>_R
                   :: Coercible
                        (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
            ipv
          };
        R1 x [Dmd=<L,1*U(U)>] ->
          case ((ds7 x_s1Fkm)
                `cast` (N:IO[0] <()>_R
                        :: Coercible
                             (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
                 ipv
          of
          { (# ipv1, ipv2 [Dmd=<L,A>] #) ->
          ((ds6
              (case x
                    `cast` ((N:M1[0]
                                 <*>_N
                                 <C>_P
                                 <'MetaCons "B" 'PrefixI 'False>_P
                                 <M1
                                    S
                                    ('MetaSel
                                       'Nothing
                                       'NoSourceUnpackedness
                                       'NoSourceStrictness
                                       'DecidedLazy)
                                    (Rec0 Char)>_R ; N:M1[0]
                                                         <*>_N
                                                         <S>_P
                                                         <'MetaSel
                                                            'Nothing
                                                            'NoSourceUnpackedness
                                                            'NoSourceStrictness
                                                            'DecidedLazy>_P
                                                         <K1 R Char>_R) <Any>_N ; (N:K1[0]
                                                                                       <*>_N
                                                                                       <R>_P
                                                                                       <Char>_R
                                                                                       <Any>_P ; Nth:3
                                                                                                     (<Char>_R
                                                                                                      %<'Many>_N ->_R N:LH[0]
                                                                                                                          <()>_R ; (<LHEnv>_R
                                                                                                                                    %<'Many>_N ->_R N:IO[0]
                                                                                                                                                        <()>_R)))
                            :: Coercible
                                 (M1
                                    C
                                    ('MetaCons "B" 'PrefixI 'False)
                                    (M1
                                       S
                                       ('MetaSel
                                          'Nothing
                                          'NoSourceUnpackedness
                                          'NoSourceStrictness
                                          'DecidedLazy)
                                       (Rec0 Char))
                                    Any)
                                 Char)
               of
               { C# c# ->
               let {
                 i# :: Int#
                 [LclId,
                  Unf=Unf{Src=<vanilla>, TopLvl=False, Value=False, ConLike=False,
                          WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 0 0}]
                 i# = ord# c# } in
               case >=# i# 0# of {
                 __DEFAULT -> $wlvl1 i#;
                 1# ->
                   case <=# i# 4294967295# of {
                     __DEFAULT -> $wlvl1 i#;
                     1# -> W32# (int2Word# i#)
                   }
               }
               }))
           `cast` (N:IO[0] <()>_R
                   :: Coercible
                        (IO ()) (State# RealWorld -> (# State# RealWorld, () #))))
            ipv1
          }
      }
      }
      }
      }
  at test/Data/LargeHashable/Tests/Inspection.hs:43
*** Failed! (11ms)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.