Search is not available for this dataset
repo_name
string
path
string
license
string
full_code
string
full_size
int64
uncommented_code
string
uncommented_size
int64
function_only_code
string
function_only_size
int64
is_commented
bool
is_signatured
bool
n_ast_errors
int64
ast_max_depth
int64
n_whitespaces
int64
n_ast_nodes
int64
n_ast_terminals
int64
n_ast_nonterminals
int64
loc
int64
cycloplexity
int64
ezyang/ghc
testsuite/tests/numeric/should_run/arith003.hs
bsd-3-clause
non_min_operands = small_operands ++ [ fromIntegral maxInt ]
60
non_min_operands = small_operands ++ [ fromIntegral maxInt ]
60
non_min_operands = small_operands ++ [ fromIntegral maxInt ]
60
false
false
3
7
7
21
8
13
null
null
palf/free-driver
packages/drive-intercom/lib/Drive/Intercom/Handlers.hs
bsd-3-clause
intercomToDescribeI (GetUser (UserID u) a) = D.debug ("requesting user (" <> u <> ")") $> a nullUser
102
intercomToDescribeI (GetUser (UserID u) a) = D.debug ("requesting user (" <> u <> ")") $> a nullUser
102
intercomToDescribeI (GetUser (UserID u) a) = D.debug ("requesting user (" <> u <> ")") $> a nullUser
102
false
false
0
9
18
46
22
24
null
null
ekohl/ganeti
htools/Ganeti/HTools/Node.hs
gpl-2.0
-- | Removes a secondary instance. removeSec :: Node -> Instance.Instance -> Node removeSec t inst = let iname = Instance.idx inst pnode = Instance.pNode inst new_slist = delete iname (sList t) new_dsk = fDsk t + Instance.dsk inst old_peers = peers t old_peem = P.find pnode o...
1,247
removeSec :: Node -> Instance.Instance -> Node removeSec t inst = let iname = Instance.idx inst pnode = Instance.pNode inst new_slist = delete iname (sList t) new_dsk = fDsk t + Instance.dsk inst old_peers = peers t old_peem = P.find pnode old_peers new_peem = if Ins...
1,212
removeSec t inst = let iname = Instance.idx inst pnode = Instance.pNode inst new_slist = delete iname (sList t) new_dsk = fDsk t + Instance.dsk inst old_peers = peers t old_peem = P.find pnode old_peers new_peem = if Instance.auto_balance inst the...
1,165
true
true
0
15
457
340
176
164
null
null
shlevy/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
getDFunTyKey (TyVarTy tv) = getOccName tv
52
getDFunTyKey (TyVarTy tv) = getOccName tv
52
getDFunTyKey (TyVarTy tv) = getOccName tv
52
false
false
0
7
16
18
8
10
null
null
sopvop/snap
src/Snap/Snaplet/Session/Helpers.hs
bsd-3-clause
hiddenCSRFTag :: (MonadSession m) => Splice m hiddenCSRFTag = do embeddedToken <- lift sessionCSRFToken let param = "authenticity_token" return . return $ X.Element "input" [ ("type", "hidden") , ("name", T.decodeUtf8 param) , ("value", T.decodeUtf8 embeddedToken) ] [] ---------------------...
973
hiddenCSRFTag :: (MonadSession m) => Splice m hiddenCSRFTag = do embeddedToken <- lift sessionCSRFToken let param = "authenticity_token" return . return $ X.Element "input" [ ("type", "hidden") , ("name", T.decodeUtf8 param) , ("value", T.decodeUtf8 embeddedToken) ] [] ---------------------...
973
hiddenCSRFTag = do embeddedToken <- lift sessionCSRFToken let param = "authenticity_token" return . return $ X.Element "input" [ ("type", "hidden") , ("name", T.decodeUtf8 param) , ("value", T.decodeUtf8 embeddedToken) ] [] -----------------------------------------------------------------------...
923
false
true
0
13
165
121
69
52
null
null
ml9951/ghc
compiler/main/DynFlags.hs
bsd-3-clause
-- | Is the Safe Haskell safe language in use safeLanguageOn :: DynFlags -> Bool safeLanguageOn dflags = safeHaskell dflags == Sf_Safe
134
safeLanguageOn :: DynFlags -> Bool safeLanguageOn dflags = safeHaskell dflags == Sf_Safe
88
safeLanguageOn dflags = safeHaskell dflags == Sf_Safe
53
true
true
0
6
21
26
13
13
null
null
jwaldmann/s
S/Gen.hs
gpl-3.0
union xs [] = xs
16
union xs [] = xs
16
union xs [] = xs
16
false
false
1
5
4
18
6
12
null
null
lostbean/radio-fm69
src/WiringHs.hs
bsd-3-clause
analogRead :: Pin -> IO Word8 analogRead (Pin pin) = fmap fromIntegral $ c_analogRead (fromIntegral pin)
104
analogRead :: Pin -> IO Word8 analogRead (Pin pin) = fmap fromIntegral $ c_analogRead (fromIntegral pin)
104
analogRead (Pin pin) = fmap fromIntegral $ c_analogRead (fromIntegral pin)
74
false
true
0
8
15
43
20
23
null
null
baldore/haskell-99-exercises
4.hs
mit
myLength :: [a] -> Length myLength [] = 0
41
myLength :: [a] -> Length myLength [] = 0
41
myLength [] = 0
15
false
true
0
6
8
23
12
11
null
null
jyp/MarXup
MarXup/Tex.hs
gpl-2.0
renderSimple :: Tex a -> String renderSimple = renderWithBoxes Map.empty
72
renderSimple :: Tex a -> String renderSimple = renderWithBoxes Map.empty
72
renderSimple = renderWithBoxes Map.empty
40
false
true
0
6
9
23
11
12
null
null
urbanslug/ghc
compiler/cmm/CmmExpr.hs
bsd-3-clause
cmmExprType dflags (CmmReg reg) = cmmRegType dflags reg
62
cmmExprType dflags (CmmReg reg) = cmmRegType dflags reg
62
cmmExprType dflags (CmmReg reg) = cmmRegType dflags reg
62
false
false
0
7
14
22
10
12
null
null
blacktaxi/inversion
src/TemplateParse.hs
bsd-3-clause
chordSpecToIntervals :: ChordSpec -> [IntervalPattern] chordSpecToIntervals (ChordSpec {..}) = root : (catMaybes $ third : fifth : main : added : []) where ipat x y = IntervalPatternValue { interval = x, inversionsAllowed = y } inversions x = ipat x True noInversions x = ipat x False ...
1,345
chordSpecToIntervals :: ChordSpec -> [IntervalPattern] chordSpecToIntervals (ChordSpec {..}) = root : (catMaybes $ third : fifth : main : added : []) where ipat x y = IntervalPatternValue { interval = x, inversionsAllowed = y } inversions x = ipat x True noInversions x = ipat x False ...
1,345
chordSpecToIntervals (ChordSpec {..}) = root : (catMaybes $ third : fifth : main : added : []) where ipat x y = IntervalPatternValue { interval = x, inversionsAllowed = y } inversions x = ipat x True noInversions x = ipat x False root = ExactlyOne $ noInversions (In.Interval 0) ...
1,290
false
true
9
11
634
279
153
126
null
null
evilcandybag/JSHC
hslib/Prelude.hs
mit
-------------------------------------------------------------------------------- undefined = JSHC.Internal.undefined
117
undefined = JSHC.Internal.undefined
35
undefined = JSHC.Internal.undefined
35
true
false
1
6
4
14
6
8
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Types.hs
bsd-3-clause
isApp _ = False
38
isApp _ = False
38
isApp _ = False
38
false
false
0
5
26
9
4
5
null
null
dimara/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
oobPowerOff :: String oobPowerOff = Types.oobCommandToRaw OobPowerOff
69
oobPowerOff :: String oobPowerOff = Types.oobCommandToRaw OobPowerOff
69
oobPowerOff = Types.oobCommandToRaw OobPowerOff
47
false
true
0
6
6
22
9
13
null
null
bernstein/ircfs
Network/IRC/Message/Types.hs
bsd-3-clause
numericMsg 303 = RPL_ISON
25
numericMsg 303 = RPL_ISON
25
numericMsg 303 = RPL_ISON
25
false
false
1
5
3
13
4
9
null
null
rueshyna/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/UpdatemerchantOrderid.hs
mpl-2.0
-- | Multipart request metadata. ouoPayload :: Lens' OrdersUpdatemerchantOrderid OrdersUpdateMerchantOrderIdRequest ouoPayload = lens _ouoPayload (\ s a -> s{_ouoPayload = a})
177
ouoPayload :: Lens' OrdersUpdatemerchantOrderid OrdersUpdateMerchantOrderIdRequest ouoPayload = lens _ouoPayload (\ s a -> s{_ouoPayload = a})
144
ouoPayload = lens _ouoPayload (\ s a -> s{_ouoPayload = a})
61
true
true
0
9
22
42
22
20
null
null
shockkolate/containers
Data/IntSet/Base.hs
bsd-3-clause
-- Helper function for insert and union. insertBM :: Prefix -> BitMap -> IntSet -> IntSet insertBM kx bm t = kx `seq` bm `seq` case t of Bin p m l r | nomatch kx p m -> link kx (Tip kx bm) p t | zero kx m -> Bin p m (insertBM kx bm l) r | otherwise -> Bin p m l (insertBM kx bm r) T...
548
insertBM :: Prefix -> BitMap -> IntSet -> IntSet insertBM kx bm t = kx `seq` bm `seq` case t of Bin p m l r | nomatch kx p m -> link kx (Tip kx bm) p t | zero kx m -> Bin p m (insertBM kx bm l) r | otherwise -> Bin p m l (insertBM kx bm r) Tip kx' bm' | kx' == kx -> Tip kx' (...
507
insertBM kx bm t = kx `seq` bm `seq` case t of Bin p m l r | nomatch kx p m -> link kx (Tip kx bm) p t | zero kx m -> Bin p m (insertBM kx bm l) r | otherwise -> Bin p m l (insertBM kx bm r) Tip kx' bm' | kx' == kx -> Tip kx' (bm .|. bm') | otherwise -> link kx (Tip kx ...
458
true
true
0
12
172
225
108
117
null
null
glutamate/probably
Math/Probably/IterLap.hs
bsd-3-clause
iterLap (n:ns) f x = do newx <- improve n f x iterLap (ns) f newx
71
iterLap (n:ns) f x = do newx <- improve n f x iterLap (ns) f newx
71
iterLap (n:ns) f x = do newx <- improve n f x iterLap (ns) f newx
71
false
false
1
9
21
50
22
28
null
null
nomeata/ghc
compiler/nativeGen/X86/Ppr.hs
bsd-3-clause
pprImm (ImmFloat _) = ptext (sLit "naughty float immediate")
61
pprImm (ImmFloat _) = ptext (sLit "naughty float immediate")
61
pprImm (ImmFloat _) = ptext (sLit "naughty float immediate")
61
false
false
0
7
9
24
11
13
null
null
ksaveljev/hake-2
src/Render/OpenGL/QGLConstants.hs
bsd-3-clause
glLine = 0x1B01 :: Int
23
glLine = 0x1B01 :: Int
23
glLine = 0x1B01 :: Int
23
false
false
2
5
5
15
5
10
null
null
shayan-najd/HsParser
OutputableInstances.hs
gpl-3.0
pprFamilyDecl :: (OutputableBndr name) => TopLevelFlag -> FamilyDecl name -> SDoc pprFamilyDecl top_level (FamilyDecl { fdInfo = info, fdLName = ltycon , fdTyVars = tyvars , fdResultSig = L _ result ...
1,279
pprFamilyDecl :: (OutputableBndr name) => TopLevelFlag -> FamilyDecl name -> SDoc pprFamilyDecl top_level (FamilyDecl { fdInfo = info, fdLName = ltycon , fdTyVars = tyvars , fdResultSig = L _ result ...
1,279
pprFamilyDecl top_level (FamilyDecl { fdInfo = info, fdLName = ltycon , fdTyVars = tyvars , fdResultSig = L _ result , fdInjectivityAnn = mb_inj }) = vcat [ pprFlavour info <+> pp_top_level <+> pp_va...
1,183
false
true
3
13
538
366
178
188
null
null
moonKimura/aeson-0.6.2.1
Data/Aeson/Generic.hs
bsd-3-clause
fromJSON :: (Data a) => Value -> Result a fromJSON = parse parseJSON
68
fromJSON :: (Data a) => Value -> Result a fromJSON = parse parseJSON
68
fromJSON = parse parseJSON
26
false
true
0
7
12
30
15
15
null
null
olsner/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
isEmptyEvBindMap :: EvBindMap -> Bool isEmptyEvBindMap (EvBindMap m) = isEmptyDVarEnv m
87
isEmptyEvBindMap :: EvBindMap -> Bool isEmptyEvBindMap (EvBindMap m) = isEmptyDVarEnv m
87
isEmptyEvBindMap (EvBindMap m) = isEmptyDVarEnv m
49
false
true
0
7
10
27
13
14
null
null
jgoerzen/blogcvt
Drupal.hs
gpl-2.0
delta_htmlfilt = "0"
20
delta_htmlfilt = "0"
20
delta_htmlfilt = "0"
20
false
false
0
4
2
6
3
3
null
null
alexander-at-github/eta
libraries/base/GHC/Base.hs
bsd-3-clause
breakpointCond :: Bool -> a -> a breakpointCond _ r = r
55
breakpointCond :: Bool -> a -> a breakpointCond _ r = r
55
breakpointCond _ r = r
22
false
true
0
6
11
24
12
12
null
null
beni55/cgrep
src/CGrep/Strategy/BoyerMoore.hs
gpl-2.0
checkToken _ _ (_,_) = undefined
32
checkToken _ _ (_,_) = undefined
32
checkToken _ _ (_,_) = undefined
32
false
false
0
6
5
19
10
9
null
null
4ZP6Capstone2015/ampersand
src/Database/Design/Ampersand/ECA2SQL/Equality.hs
gpl-3.0
cong2 :: f :~: g -> a :~: a' -> b :~: b' -> f a b :~: g a' b' cong2 Refl Refl Refl = Refl
90
cong2 :: f :~: g -> a :~: a' -> b :~: b' -> f a b :~: g a' b' cong2 Refl Refl Refl = Refl
89
cong2 Refl Refl Refl = Refl
27
false
true
0
10
27
61
28
33
null
null
medik/lang-hack
Haskell/LearnYouAHaskell/c05/chapter5.hs
gpl-3.0
applyTwice :: (a -> a) -> a -> a applyTwice f x = f (f x)
57
applyTwice :: (a -> a) -> a -> a applyTwice f x = f (f x)
57
applyTwice f x = f (f x)
24
false
true
0
7
15
40
20
20
null
null
suhailshergill/liboleg
Lambda/CCG.hs
bsd-3-clause
sen1_ja = sen1 :: JA S
22
sen1_ja = sen1 :: JA S
22
sen1_ja = sen1 :: JA S
22
false
false
2
5
5
18
6
12
null
null
acowley/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
{- ************************************************************************ * * \subsection{Tau, sigma and rho} * * ******************************************************************...
449
mkSigmaTy :: [TyVar] -> [PredType] -> Type -> Type mkSigmaTy tyvars theta tau = mkForAllTys tyvars (mkPhiTy theta tau)
118
mkSigmaTy tyvars theta tau = mkForAllTys tyvars (mkPhiTy theta tau)
67
true
true
0
7
169
50
26
24
null
null
sbidin/sdl2-mixer
src/SDL/Mixer.hs
bsd-3-clause
musicDecoders :: MonadIO m => m [String] musicDecoders = liftIO $ do num <- SDL.Raw.Mixer.getNumMusicDecoders forM [0 .. num - 1] $ \i -> SDL.Raw.Mixer.getMusicDecoder i >>= peekCString -- | A loaded music file. -- -- 'Music' is played on a separate channel different from the normal mixing -- 'Channel'...
437
musicDecoders :: MonadIO m => m [String] musicDecoders = liftIO $ do num <- SDL.Raw.Mixer.getNumMusicDecoders forM [0 .. num - 1] $ \i -> SDL.Raw.Mixer.getMusicDecoder i >>= peekCString -- | A loaded music file. -- -- 'Music' is played on a separate channel different from the normal mixing -- 'Channel'...
437
musicDecoders = liftIO $ do num <- SDL.Raw.Mixer.getNumMusicDecoders forM [0 .. num - 1] $ \i -> SDL.Raw.Mixer.getMusicDecoder i >>= peekCString -- | A loaded music file. -- -- 'Music' is played on a separate channel different from the normal mixing -- 'Channel's. -- -- To manipulate 'Music' outside of...
396
false
true
2
11
83
89
47
42
null
null
strager/b-shake
B/Shake/Locks.hs
bsd-3-clause
withLock :: Lock -> IO a -> IO a withLock (Lock x) = withMVar x . const
71
withLock :: Lock -> IO a -> IO a withLock (Lock x) = withMVar x . const
71
withLock (Lock x) = withMVar x . const
38
false
true
0
7
16
41
19
22
null
null
dmp1ce/DMSS
src-lib/DMSS/Common.hs
unlicense
isoFormatCurrentUTCTime :: IO String isoFormatCurrentUTCTime = formatTime defaultTimeLocale rfc822DateFormat <$> getCurrentTime
129
isoFormatCurrentUTCTime :: IO String isoFormatCurrentUTCTime = formatTime defaultTimeLocale rfc822DateFormat <$> getCurrentTime
129
isoFormatCurrentUTCTime = formatTime defaultTimeLocale rfc822DateFormat <$> getCurrentTime
92
false
true
0
6
12
29
12
17
null
null
rueshyna/gogol
gogol-pagespeed/gen/Network/Google/Resource/PagespeedOnline/PagespeedAPI/RunPagespeed.hs
mpl-2.0
-- | Indicates if third party resources should be filtered out before -- PageSpeed analysis. parpFilterThirdPartyResources :: Lens' PagespeedAPIRunPagespeed Bool parpFilterThirdPartyResources = lens _parpFilterThirdPartyResources (\ s a -> s{_parpFilterThirdPartyResources = a})
286
parpFilterThirdPartyResources :: Lens' PagespeedAPIRunPagespeed Bool parpFilterThirdPartyResources = lens _parpFilterThirdPartyResources (\ s a -> s{_parpFilterThirdPartyResources = a})
193
parpFilterThirdPartyResources = lens _parpFilterThirdPartyResources (\ s a -> s{_parpFilterThirdPartyResources = a})
124
true
true
0
8
38
44
23
21
null
null
wilbowma/accelerate
Data/Array/Accelerate/Interpreter.hs
bsd-3-clause
evalPreOpenAcc (Scanr' f e acc) aenv = scanr'Op (evalFun f aenv) (evalExp e aenv) (evalOpenAcc acc aenv)
106
evalPreOpenAcc (Scanr' f e acc) aenv = scanr'Op (evalFun f aenv) (evalExp e aenv) (evalOpenAcc acc aenv)
106
evalPreOpenAcc (Scanr' f e acc) aenv = scanr'Op (evalFun f aenv) (evalExp e aenv) (evalOpenAcc acc aenv)
106
false
false
0
7
18
52
25
27
null
null
nkpart/score-writer
src/LilypondProcess.hs
bsd-3-clause
prettyFormat :: Format -> String prettyFormat PNG = "png"
57
prettyFormat :: Format -> String prettyFormat PNG = "png"
57
prettyFormat PNG = "png"
24
false
true
0
5
8
18
9
9
null
null
sdiehl/ghc
compiler/llvmGen/LlvmCodeGen/CodeGen.hs
bsd-3-clause
genCallExtract _ _ _ _ = panic "genCallExtract: unsupported ForeignTarget"
78
genCallExtract _ _ _ _ = panic "genCallExtract: unsupported ForeignTarget"
78
genCallExtract _ _ _ _ = panic "genCallExtract: unsupported ForeignTarget"
78
false
false
1
5
13
18
7
11
null
null
DanielSchiavini/ampersand
src/Database/Design/Ampersand/Output/ToPandoc/ChapterInterfaces.hs
gpl-3.0
fatal :: Int -> String -> a fatal = fatalMsg "Output.ToPandoc.ChapterInterfaces"
80
fatal :: Int -> String -> a fatal = fatalMsg "Output.ToPandoc.ChapterInterfaces"
80
fatal = fatalMsg "Output.ToPandoc.ChapterInterfaces"
52
false
true
0
6
10
22
11
11
null
null
jean-edouard/manager
dbd2/Store.hs
gpl-2.0
checkReadPerm (path,Just uuid) = withPerms $ \pt -> ()
54
checkReadPerm (path,Just uuid) = withPerms $ \pt -> ()
54
checkReadPerm (path,Just uuid) = withPerms $ \pt -> ()
54
false
false
0
7
8
29
15
14
null
null
dorchard/gram_lang
frontend/src/Language/Granule/Checker/Checker.hs
bsd-3-clause
extCtxt :: (?globals :: Globals) => Span -> Ctxt Assumption -> Id -> Assumption -> Checker (Ctxt Assumption) extCtxt s ctxt var (Linear t) = do case lookup var ctxt of Just (Linear t') -> if t == t' then throw LinearityError{ errLoc = s, linearityMismatch = LinearUsedMoreThanOnce var } e...
718
extCtxt :: (?globals :: Globals) => Span -> Ctxt Assumption -> Id -> Assumption -> Checker (Ctxt Assumption) extCtxt s ctxt var (Linear t) = do case lookup var ctxt of Just (Linear t') -> if t == t' then throw LinearityError{ errLoc = s, linearityMismatch = LinearUsedMoreThanOnce var } e...
718
extCtxt s ctxt var (Linear t) = do case lookup var ctxt of Just (Linear t') -> if t == t' then throw LinearityError{ errLoc = s, linearityMismatch = LinearUsedMoreThanOnce var } else throw TypeVariableMismatch{ errLoc = s, errVar = var, errTy1 = t, errTy2 = t' } Just (Discharged t' c) ...
607
false
true
0
19
204
279
147
132
null
null
geekingfrog/advent-of-code
src/Y2018/Day21.hs
bsd-3-clause
mkCpu i r0 = let regs = V.replicate 6 0 // [(0, r0)] in CPU i 0 regs
73
mkCpu i r0 = let regs = V.replicate 6 0 // [(0, r0)] in CPU i 0 regs
73
mkCpu i r0 = let regs = V.replicate 6 0 // [(0, r0)] in CPU i 0 regs
73
false
false
0
11
22
49
24
25
null
null
jstolarek/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
getOperand_generic :: CmmExpr -> NatM (Operand, InstrBlock) getOperand_generic e = do (reg, code) <- getSomeReg e return (OpReg reg, code)
146
getOperand_generic :: CmmExpr -> NatM (Operand, InstrBlock) getOperand_generic e = do (reg, code) <- getSomeReg e return (OpReg reg, code)
146
getOperand_generic e = do (reg, code) <- getSomeReg e return (OpReg reg, code)
86
false
true
0
10
27
63
30
33
null
null
tmielcza/demiurge
test/Parse/Test.hs
apache-2.0
exprErrorTest str = (testCase str . assertBool "Must fail" . null . (exhaustivePattern expr)) str
97
exprErrorTest str = (testCase str . assertBool "Must fail" . null . (exhaustivePattern expr)) str
97
exprErrorTest str = (testCase str . assertBool "Must fail" . null . (exhaustivePattern expr)) str
97
false
false
0
10
14
39
18
21
null
null
chrisdone/goa
GOA.hs
bsd-3-clause
forkLambdabot :: IO (Maybe (Handle,Handle,Handle,ProcessHandle)) forkLambdabot = withLambdabot $ do b <- doesFileExist "./lambdabot" home <- readIORef lambdabotHome args' <- readIORef lambdabotFlags let args | null args' = [] | otherwise = [args'] if not b then do putStrLn $ "...
710
forkLambdabot :: IO (Maybe (Handle,Handle,Handle,ProcessHandle)) forkLambdabot = withLambdabot $ do b <- doesFileExist "./lambdabot" home <- readIORef lambdabotHome args' <- readIORef lambdabotFlags let args | null args' = [] | otherwise = [args'] if not b then do putStrLn $ "...
710
forkLambdabot = withLambdabot $ do b <- doesFileExist "./lambdabot" home <- readIORef lambdabotHome args' <- readIORef lambdabotFlags let args | null args' = [] | otherwise = [args'] if not b then do putStrLn $ "No lambdabot binary found in: " ++ home return No...
645
false
true
0
15
245
207
98
109
null
null
olsner/ghc
testsuite/tests/indexed-types/should_fail/T7354.hs
bsd-3-clause
foo = ana alg
13
foo = ana alg
13
foo = ana alg
13
false
false
1
5
3
13
4
9
null
null
kawu/crf-chain1-constrained
src/Data/CRF/Chain1/Constrained/DAG/Probs.hs
bsd-2-clause
-- | Log-likelihood of the given dataset (no parallelization). likelihood :: Md.Model -> [DAG a (X, Y)] -> L.LogFloat likelihood crf = L.product . map (probability crf)
168
likelihood :: Md.Model -> [DAG a (X, Y)] -> L.LogFloat likelihood crf = L.product . map (probability crf)
105
likelihood crf = L.product . map (probability crf)
50
true
true
0
9
26
56
29
27
null
null
ben-schulz/Idris-dev
src/Util/System.hs
bsd-3-clause
withTempdir :: String -> (FilePath -> IO a) -> IO a withTempdir subdir callback = do dir <- getTemporaryDirectory let tmpDir = normalise dir </> subdir removeLater <- catchIO (createDirectoryIfMissing True tmpDir >> return True) (\ ioError -> if isAlreadyExistsError ioError...
545
withTempdir :: String -> (FilePath -> IO a) -> IO a withTempdir subdir callback = do dir <- getTemporaryDirectory let tmpDir = normalise dir </> subdir removeLater <- catchIO (createDirectoryIfMissing True tmpDir >> return True) (\ ioError -> if isAlreadyExistsError ioError...
545
withTempdir subdir callback = do dir <- getTemporaryDirectory let tmpDir = normalise dir </> subdir removeLater <- catchIO (createDirectoryIfMissing True tmpDir >> return True) (\ ioError -> if isAlreadyExistsError ioError then return False ...
493
false
true
0
13
199
146
65
81
null
null
spire/spire
src/Spire/Surface/Parser.hs
bsd-3-clause
parseKeyword = reserved tokenizer
33
parseKeyword = reserved tokenizer
33
parseKeyword = reserved tokenizer
33
false
false
0
5
3
9
4
5
null
null
beni55/haste-compiler
libraries/haste-lib/src/Haste/Serialize.hs
bsd-3-clause
_ .: _ = Parser $ Left "Tried to do lookup on non-object!"
60
_ .: _ = Parser $ Left "Tried to do lookup on non-object!"
60
_ .: _ = Parser $ Left "Tried to do lookup on non-object!"
60
false
false
2
5
14
21
8
13
null
null
nilthehuman/H-99
BinaryTrees.hs
unlicense
exactlyBalanced (Branch _ l r) = size l == size r
49
exactlyBalanced (Branch _ l r) = size l == size r
49
exactlyBalanced (Branch _ l r) = size l == size r
49
false
false
0
7
10
29
13
16
null
null
reflex-frp/reflex
src/Reflex/Class.hs
bsd-3-clause
mapAccumMaybe_ :: forall t m a b c. (Reflex t, MonadHold t m, MonadFix m) => (a -> b -> (Maybe a, Maybe c)) -> a -> Event t b -> m (Event t c) mapAccumMaybe_ f z e = do (_, result) <- mapAccumMaybeB f z e return result -- | Accumulate occurrences of an 'Event', using a 'PushM' action and producing -- an output occ...
378
mapAccumMaybe_ :: forall t m a b c. (Reflex t, MonadHold t m, MonadFix m) => (a -> b -> (Maybe a, Maybe c)) -> a -> Event t b -> m (Event t c) mapAccumMaybe_ f z e = do (_, result) <- mapAccumMaybeB f z e return result -- | Accumulate occurrences of an 'Event', using a 'PushM' action and producing -- an output occ...
378
mapAccumMaybe_ f z e = do (_, result) <- mapAccumMaybeB f z e return result -- | Accumulate occurrences of an 'Event', using a 'PushM' action and producing -- an output occurrence each time. Discard the underlying 'Accumulator'.
235
false
true
0
12
79
129
67
62
null
null
shayan-najd/QHaskell
QHaskell/CSE.hs
gpl-3.0
hasSubtermEnv :: (TG.Type b , TG.Types d) => Exp s g b -> Env (Exp s g) d -> Bool hasSubtermEnv ex = TG.fld (\ b e -> b || hasSubterm ex e) False
145
hasSubtermEnv :: (TG.Type b , TG.Types d) => Exp s g b -> Env (Exp s g) d -> Bool hasSubtermEnv ex = TG.fld (\ b e -> b || hasSubterm ex e) False
145
hasSubtermEnv ex = TG.fld (\ b e -> b || hasSubterm ex e) False
63
false
true
0
10
33
87
43
44
null
null
conal/ghc-mod
Flag.hs
bsd-3-clause
listFlags :: Options -> IO String listFlags opt = return $ convert opt $ [ "-f" ++ prefix ++ option #if __GLASGOW_HASKELL__ == 702 | (option,_,_,_) <- fFlags #else | (option,_,_) <- fFlags #endif , prefix <- ["","no-"] ]
235
listFlags :: Options -> IO String listFlags opt = return $ convert opt $ [ "-f" ++ prefix ++ option #if __GLASGOW_HASKELL__ == 702 | (option,_,_,_) <- fFlags #else | (option,_,_) <- fFlags #endif , prefix <- ["","no-"] ]
235
listFlags opt = return $ convert opt $ [ "-f" ++ prefix ++ option #if __GLASGOW_HASKELL__ == 702 | (option,_,_,_) <- fFlags #else | (option,_,_) <- fFlags #endif , prefix <- ["","no-"] ]
201
false
true
0
9
53
80
44
36
null
null
apisarek/malus
src/MachineLearning.hs
mit
calculateRatios lengthSpam lengthNonSpam = [lengthSpam / lengthAll, lengthNonSpam / lengthAll] where lengthAll = lengthSpam + lengthNonSpam
141
calculateRatios lengthSpam lengthNonSpam = [lengthSpam / lengthAll, lengthNonSpam / lengthAll] where lengthAll = lengthSpam + lengthNonSpam
141
calculateRatios lengthSpam lengthNonSpam = [lengthSpam / lengthAll, lengthNonSpam / lengthAll] where lengthAll = lengthSpam + lengthNonSpam
141
false
false
0
6
17
37
19
18
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
happyReduction_194 (HappyTerminal (T_id happy_var_1)) = HappyAbsSyn30 (TyName happy_var_1 Nothing )
134
happyReduction_194 (HappyTerminal (T_id happy_var_1)) = HappyAbsSyn30 (TyName happy_var_1 Nothing )
134
happyReduction_194 (HappyTerminal (T_id happy_var_1)) = HappyAbsSyn30 (TyName happy_var_1 Nothing )
134
false
false
0
9
44
32
15
17
null
null
ku-fpg/sunroof-compiler
Language/Sunroof/JS/Browser.hs
bsd-3-clause
-- | Create a element DOM node with the given tag name. -- For use with 'document'. createElement :: JSString -- ^ The tag name of the new element. -> JSObject -> JS t JSObject createElement e = invoke "createElement" (e)
237
createElement :: JSString -- ^ The tag name of the new element. -> JSObject -> JS t JSObject createElement e = invoke "createElement" (e)
151
createElement e = invoke "createElement" (e)
44
true
true
0
7
56
38
20
18
null
null
mariefarrell/Hets
Syntax/Parse_AS_Structured.hs
gpl-2.0
combineSpec :: LogicGraph -> AParser st SPEC combineSpec lG = do s1 <- asKey combineS n <- parseNetwork lG return $ Combination n $ tokPos s1
153
combineSpec :: LogicGraph -> AParser st SPEC combineSpec lG = do s1 <- asKey combineS n <- parseNetwork lG return $ Combination n $ tokPos s1
153
combineSpec lG = do s1 <- asKey combineS n <- parseNetwork lG return $ Combination n $ tokPos s1
108
false
true
0
9
37
60
26
34
null
null
gbaz/cabal
cabal-install/Distribution/Client/Dependency/TopDown.hs
bsd-3-clause
-- | Add exclusion on available packages that cannot be configured. -- pruneBottomUp :: Platform -> CompilerInfo -> Constraints -> Progress Log Failure Constraints pruneBottomUp platform comp constraints = foldr prune Done (initialPackages constraints) constraints where prune pkgs rest cs = fol...
2,094
pruneBottomUp :: Platform -> CompilerInfo -> Constraints -> Progress Log Failure Constraints pruneBottomUp platform comp constraints = foldr prune Done (initialPackages constraints) constraints where prune pkgs rest cs = foldr addExcludeConstraint rest unconfigurable cs where unco...
2,023
pruneBottomUp platform comp constraints = foldr prune Done (initialPackages constraints) constraints where prune pkgs rest cs = foldr addExcludeConstraint rest unconfigurable cs where unconfigurable = [ (pkg, missing) -- if necessary we could look up missing reasons | (Just ...
1,916
true
true
8
13
599
555
271
284
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
2923 = 2922
11
2923 = 2922
11
2923 = 2922
11
false
false
1
5
2
10
3
7
null
null
ndmitchell/hlint
src/Config/Yaml.hs
bsd-3-clause
parseObject1 :: Val -> Parser (String, Val) parseObject1 v = do mp <- parseObject v case Map.keys mp of [T.unpack -> s] -> (s,) <$> parseField s v _ -> parseFail v $ "Expected exactly one key but got " ++ show (Map.size mp)
247
parseObject1 :: Val -> Parser (String, Val) parseObject1 v = do mp <- parseObject v case Map.keys mp of [T.unpack -> s] -> (s,) <$> parseField s v _ -> parseFail v $ "Expected exactly one key but got " ++ show (Map.size mp)
247
parseObject1 v = do mp <- parseObject v case Map.keys mp of [T.unpack -> s] -> (s,) <$> parseField s v _ -> parseFail v $ "Expected exactly one key but got " ++ show (Map.size mp)
203
false
true
0
14
67
105
51
54
null
null
futtetennista/IntroductionToFunctionalProgramming
itfp/src/Chapter9.hs
mit
maptree f (Bin left right) = Bin (maptree f left) (maptree f right)
69
maptree f (Bin left right) = Bin (maptree f left) (maptree f right)
69
maptree f (Bin left right) = Bin (maptree f left) (maptree f right)
69
false
false
0
7
14
40
19
21
null
null
hnfmr/beginning_haskell
chapter12/src/Main.hs
mit
render :: MyRoute ->[(Text, Text)] -> Text render About _ = "/about"
71
render :: MyRoute ->[(Text, Text)] -> Text render About _ = "/about"
71
render About _ = "/about"
28
false
true
0
8
14
33
18
15
null
null
fmapfmapfmap/amazonka
amazonka-rds/gen/Network/AWS/RDS/DescribeDBSecurityGroups.hs
mpl-2.0
-- | The name of the DB security group to return details for. ddbsgDBSecurityGroupName :: Lens' DescribeDBSecurityGroups (Maybe Text) ddbsgDBSecurityGroupName = lens _ddbsgDBSecurityGroupName (\ s a -> s{_ddbsgDBSecurityGroupName = a})
235
ddbsgDBSecurityGroupName :: Lens' DescribeDBSecurityGroups (Maybe Text) ddbsgDBSecurityGroupName = lens _ddbsgDBSecurityGroupName (\ s a -> s{_ddbsgDBSecurityGroupName = a})
173
ddbsgDBSecurityGroupName = lens _ddbsgDBSecurityGroupName (\ s a -> s{_ddbsgDBSecurityGroupName = a})
101
true
true
0
9
29
46
25
21
null
null
forsyde/forsyde-atom
src/ForSyDe/Atom/MoC/SY/Hybrid.hs
bsd-3-clause
interleave4 :: Signal a -> Signal a -> Signal a -> Signal a -> Signal a interleave4 a b c d = SDF.toSY1' (ctxt41 (1,1,1,1) 4 (\x y z q -> x++y++z++q) -.- SY.toSDF1 a -*- SY.toSDF1 b -*- SY.toSDF1 c -*- SY.toSDF1 d -*)
235
interleave4 :: Signal a -> Signal a -> Signal a -> Signal a -> Signal a interleave4 a b c d = SDF.toSY1' (ctxt41 (1,1,1,1) 4 (\x y z q -> x++y++z++q) -.- SY.toSDF1 a -*- SY.toSDF1 b -*- SY.toSDF1 c -*- SY.toSDF1 d -*)
235
interleave4 a b c d = SDF.toSY1' (ctxt41 (1,1,1,1) 4 (\x y z q -> x++y++z++q) -.- SY.toSDF1 a -*- SY.toSDF1 b -*- SY.toSDF1 c -*- SY.toSDF1 d -*)
163
false
true
0
16
62
145
70
75
null
null
uuhan/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v LStrCons [x, y] = v ++ "idris_strCons(vm, " ++ creg x ++ "," ++ creg y ++ ")"
84
doOp v LStrCons [x, y] = v ++ "idris_strCons(vm, " ++ creg x ++ "," ++ creg y ++ ")"
84
doOp v LStrCons [x, y] = v ++ "idris_strCons(vm, " ++ creg x ++ "," ++ creg y ++ ")"
84
false
false
0
9
19
48
22
26
null
null
fmapfmapfmap/amazonka
amazonka-ds/gen/Network/AWS/DirectoryService/DisableSSO.hs
mpl-2.0
-- | The username of an alternate account to use to disable single-sign on. -- This is only used for AD Connector directories. This account must have -- privileges to remove a service principle name. -- -- If the AD Connector service account does not have privileges to remove a -- service principle name, you can specif...
652
dssoUserName :: Lens' DisableSSO (Maybe Text) dssoUserName = lens _dssoUserName (\ s a -> s{_dssoUserName = a})
111
dssoUserName = lens _dssoUserName (\ s a -> s{_dssoUserName = a})
65
true
true
0
9
109
54
33
21
null
null
maciej-wichrowski/HsCharts
source/Graphics/HsCharts/Charts.hs
bsd-3-clause
plotPointChart :: Axis -> Axis -> [Point2] -> Picture plotPointChart = plotPointChart' (rectangleSolid 2 2)
107
plotPointChart :: Axis -> Axis -> [Point2] -> Picture plotPointChart = plotPointChart' (rectangleSolid 2 2)
107
plotPointChart = plotPointChart' (rectangleSolid 2 2)
53
false
true
0
8
14
37
19
18
null
null
fiigii/control-flow
LabeledAst.hs
mit
convertM (Ast.Function arg body) = do body' <- convertM body l <- freshLabel return $ Function arg body' l
182
convertM (Ast.Function arg body) = do body' <- convertM body l <- freshLabel return $ Function arg body' l
182
convertM (Ast.Function arg body) = do body' <- convertM body l <- freshLabel return $ Function arg body' l
182
false
false
0
8
94
51
22
29
null
null
geekrelief/as3tohaxe
ActionhaXe/Data.hs
gpl-3.0
updateSymbol :: AsDefTuple -> AsParser () updateSymbol d = do x <- getState x' <- updateS d x setState x'
145
updateSymbol :: AsDefTuple -> AsParser () updateSymbol d = do x <- getState x' <- updateS d x setState x'
145
updateSymbol d = do x <- getState x' <- updateS d x setState x'
103
false
true
0
9
59
53
22
31
null
null
andyarvanitis/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v (LPlus ATFloat) [l, r] = v ++ "FLOATOP(+," ++ creg l ++ ", " ++ creg r ++ ")"
84
doOp v (LPlus ATFloat) [l, r] = v ++ "FLOATOP(+," ++ creg l ++ ", " ++ creg r ++ ")"
84
doOp v (LPlus ATFloat) [l, r] = v ++ "FLOATOP(+," ++ creg l ++ ", " ++ creg r ++ ")"
84
false
false
0
9
20
51
25
26
null
null
OS2World/DEV-UTIL-HUGS
libraries/Graphics/Rendering/OpenGL/GL/Evaluators.hs
bsd-3-clause
marshalGetMapQuery :: GetMapQuery -> GLenum marshalGetMapQuery x = case x of Coeff -> 0xa00 Order -> 0xa01 Domain -> 0xa02 --------------------------------------------------------------------------------
213
marshalGetMapQuery :: GetMapQuery -> GLenum marshalGetMapQuery x = case x of Coeff -> 0xa00 Order -> 0xa01 Domain -> 0xa02 --------------------------------------------------------------------------------
213
marshalGetMapQuery x = case x of Coeff -> 0xa00 Order -> 0xa01 Domain -> 0xa02 --------------------------------------------------------------------------------
169
false
true
3
5
30
46
21
25
null
null
fabianbergmark/ECMA-262
src/Language/JavaScript/Parser.hs
bsd-2-clause
itStmt :: JSParser ItStmt itStmt = try (do { identName "do"; s <- stmt; identName "while"; punctuator "("; e <- expr; punctuator ")"; return $ ItStmtDoWhile s e }) <|> try (do { identName "while"; punctuator "("; e <- expr; punctuator ")"; s <- stmt; return $ ItStmtWhile e s }) <|> try (do { identName "for"; punc...
1,054
itStmt :: JSParser ItStmt itStmt = try (do { identName "do"; s <- stmt; identName "while"; punctuator "("; e <- expr; punctuator ")"; return $ ItStmtDoWhile s e }) <|> try (do { identName "while"; punctuator "("; e <- expr; punctuator ")"; s <- stmt; return $ ItStmtWhile e s }) <|> try (do { identName "for"; punc...
1,054
itStmt = try (do { identName "do"; s <- stmt; identName "while"; punctuator "("; e <- expr; punctuator ")"; return $ ItStmtDoWhile s e }) <|> try (do { identName "while"; punctuator "("; e <- expr; punctuator ")"; s <- stmt; return $ ItStmtWhile e s }) <|> try (do { identName "for"; punctuator "("; me1 <- optionM...
1,028
false
true
0
15
193
502
235
267
null
null
tjakway/ghcjvm
compiler/types/Type.hs
bsd-3-clause
isUnliftedType :: Type -> Bool -- isUnliftedType returns True for forall'd unlifted types: -- x :: forall a. Int# -- I found bindings like these were getting floated to the top level. -- They are pretty bogus types, mind you. It would be better never to -- construct them i...
383
isUnliftedType :: Type -> Bool isUnliftedType ty | Just ty' <- coreView ty = isUnliftedType ty'
95
isUnliftedType ty | Just ty' <- coreView ty = isUnliftedType ty'
64
true
true
0
9
106
47
22
25
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
-- End font constants wxBLUE_BRUSH :: Int wxBLUE_BRUSH = 0
60
wxBLUE_BRUSH :: Int wxBLUE_BRUSH = 0
36
wxBLUE_BRUSH = 0
16
true
true
0
4
11
12
7
5
null
null
fmapfmapfmap/amazonka
amazonka-sns/gen/Network/AWS/SNS/SetTopicAttributes.hs
mpl-2.0
-- | The new value for the attribute. staAttributeValue :: Lens' SetTopicAttributes (Maybe Text) staAttributeValue = lens _staAttributeValue (\ s a -> s{_staAttributeValue = a})
177
staAttributeValue :: Lens' SetTopicAttributes (Maybe Text) staAttributeValue = lens _staAttributeValue (\ s a -> s{_staAttributeValue = a})
139
staAttributeValue = lens _staAttributeValue (\ s a -> s{_staAttributeValue = a})
80
true
true
1
9
24
51
25
26
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/Cabal/Distribution/Simple/Utils.hs
bsd-3-clause
-- | Reads a UTF8 encoded text file as a Unicode String -- -- Reads lazily using ordinary 'readFile'. -- readUTF8File :: FilePath -> IO String readUTF8File f = fmap (ignoreBOM . fromUTF8) . hGetContents =<< openBinaryFile f ReadMode
247
readUTF8File :: FilePath -> IO String readUTF8File f = fmap (ignoreBOM . fromUTF8) . hGetContents =<< openBinaryFile f ReadMode
142
readUTF8File f = fmap (ignoreBOM . fromUTF8) . hGetContents =<< openBinaryFile f ReadMode
104
true
true
0
9
53
48
25
23
null
null
grnet/snf-ganeti
src/Ganeti/Hs2Py/GenConstants.hs
bsd-2-clause
fileFromModule (Just name) = "src/" ++ map dotToSlash name ++ ".hs" where dotToSlash '.' = '/' dotToSlash c = c
121
fileFromModule (Just name) = "src/" ++ map dotToSlash name ++ ".hs" where dotToSlash '.' = '/' dotToSlash c = c
121
fileFromModule (Just name) = "src/" ++ map dotToSlash name ++ ".hs" where dotToSlash '.' = '/' dotToSlash c = c
121
false
false
4
6
29
56
22
34
null
null
fmapfmapfmap/amazonka
amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/CreateApplicationVersion.hs
mpl-2.0
-- | The name of the application. If no application is found with this name, -- and 'AutoCreateApplication' is 'false', returns an -- 'InvalidParameterValue' error. cavApplicationName :: Lens' CreateApplicationVersion Text cavApplicationName = lens _cavApplicationName (\ s a -> s{_cavApplicationName = a})
306
cavApplicationName :: Lens' CreateApplicationVersion Text cavApplicationName = lens _cavApplicationName (\ s a -> s{_cavApplicationName = a})
141
cavApplicationName = lens _cavApplicationName (\ s a -> s{_cavApplicationName = a})
83
true
true
0
9
40
42
24
18
null
null
hemio-ev/hamsql
src/Database/HamSql/Internal/Stmt/Table.hs
gpl-3.0
stmtsDropTable :: SqlObj SQL_TABLE SqlName -> [Maybe SqlStmt] stmtsDropTable t = [newSqlStmt SqlDropTable t $ "DROP TABLE" <-> toSqlCode t]
139
stmtsDropTable :: SqlObj SQL_TABLE SqlName -> [Maybe SqlStmt] stmtsDropTable t = [newSqlStmt SqlDropTable t $ "DROP TABLE" <-> toSqlCode t]
139
stmtsDropTable t = [newSqlStmt SqlDropTable t $ "DROP TABLE" <-> toSqlCode t]
77
false
true
0
8
19
48
23
25
null
null
mitar/nxt
tests/Robotics/NXT/Basic.hs
lgpl-3.0
testDeviceInit :: IORef NXTInternals -> Test testDeviceInit ref = TestLabel "testDeviceInit" $ TestCase $ do testNXT ref $ do startRemoteProgram mapM_ resetInputScaledValue [One ..] mapM_ (`resetMotorPosition` AbsolutePosition) [A ..] mapM_ (`resetMotorPosition` RelativePosition) [A ..] mapM_ (`re...
635
testDeviceInit :: IORef NXTInternals -> Test testDeviceInit ref = TestLabel "testDeviceInit" $ TestCase $ do testNXT ref $ do startRemoteProgram mapM_ resetInputScaledValue [One ..] mapM_ (`resetMotorPosition` AbsolutePosition) [A ..] mapM_ (`resetMotorPosition` RelativePosition) [A ..] mapM_ (`re...
635
testDeviceInit ref = TestLabel "testDeviceInit" $ TestCase $ do testNXT ref $ do startRemoteProgram mapM_ resetInputScaledValue [One ..] mapM_ (`resetMotorPosition` AbsolutePosition) [A ..] mapM_ (`resetMotorPosition` RelativePosition) [A ..] mapM_ (`resetMotorPosition` InternalPosition) [A ..] ...
590
false
true
0
13
99
187
96
91
null
null
intolerable/GroupProject
src/Emulator/Memory.hs
bsd-2-clause
readBytes :: AddressSpace m => Address -> Int -> m [Byte] readBytes _ 0 = return []
83
readBytes :: AddressSpace m => Address -> Int -> m [Byte] readBytes _ 0 = return []
83
readBytes _ 0 = return []
25
false
true
0
10
16
47
21
26
null
null
MichaelReiter/ProgrammingPractice
haskell.hs
mit
-- flatten :: [[a]] -> [a] flatten [] = []
42
flatten [] = []
15
flatten [] = []
15
true
false
0
6
9
14
7
7
null
null
dicomgrid/dicom-haskell-library
src/Data/DICOM/Dictionary.hs
gpl-3.0
sourceimagesequence :: [SequenceItem] -> Element sourceimagesequence = sq $ tag (TagGroup 0x0008) (TagElement 0x2112)
117
sourceimagesequence :: [SequenceItem] -> Element sourceimagesequence = sq $ tag (TagGroup 0x0008) (TagElement 0x2112)
117
sourceimagesequence = sq $ tag (TagGroup 0x0008) (TagElement 0x2112)
68
false
true
2
7
13
46
21
25
null
null
tchagnon/cs636-raytracer
a6/Bounding.hs
apache-2.0
-- Construct a bounding volume from a Mesh boundingM :: Mesh -> Bounding boundingM (TriMesh faces _) = boundingF faces
118
boundingM :: Mesh -> Bounding boundingM (TriMesh faces _) = boundingF faces
75
boundingM (TriMesh faces _) = boundingF faces
45
true
true
0
6
19
34
16
18
null
null
wouwouwou/2017_module_8
src/haskell/FP_project/Case1.hs
apache-2.0
-------------------------- -- import LPEvaluator -- -------------------------- evalProp :: Program -> Query -> Bool evalProp [] _ = False
149
evalProp :: Program -> Query -> Bool evalProp [] _ = False
68
evalProp [] _ = False
31
true
true
0
6
29
29
16
13
null
null
gbaz/cabal
cabal-install/tests/UnitTests/Distribution/Client/Dependency/Modular/Solver.hs
bsd-3-clause
tests :: [TF.TestTree] tests = [ testGroup "Simple dependencies" [ runTest $ mkTest db1 "alreadyInstalled" ["A"] (Just []) , runTest $ mkTest db1 "installLatest" ["B"] (Just [("B", 2)]) , runTest $ mkTest db1 "simpleDep1" ["C"] (Just ...
8,676
tests :: [TF.TestTree] tests = [ testGroup "Simple dependencies" [ runTest $ mkTest db1 "alreadyInstalled" ["A"] (Just []) , runTest $ mkTest db1 "installLatest" ["B"] (Just [("B", 2)]) , runTest $ mkTest db1 "simpleDep1" ["C"] (Just ...
8,676
tests = [ testGroup "Simple dependencies" [ runTest $ mkTest db1 "alreadyInstalled" ["A"] (Just []) , runTest $ mkTest db1 "installLatest" ["B"] (Just [("B", 2)]) , runTest $ mkTest db1 "simpleDep1" ["C"] (Just [("B", 1), ("C", 1)]) ...
8,653
false
true
0
13
2,311
3,411
1,940
1,471
null
null
grnet/snf-ganeti
src/Ganeti/JSON.hs
bsd-2-clause
-- | Branch decoding on a field in a JSON object. branchOnField :: String -- ^ fieldname to branch on -> (J.JSValue -> J.Result a) -- ^ decoding function if field is present and @true@; field -- will already be removed in the input -> (J.JSValue -> J.Resul...
671
branchOnField :: String -- ^ fieldname to branch on -> (J.JSValue -> J.Result a) -- ^ decoding function if field is present and @true@; field -- will already be removed in the input -> (J.JSValue -> J.Result a) -- ^ decoding function other...
621
branchOnField k ifTrue ifFalse (J.JSObject jobj) = let fields = J.fromJSObject jobj jobj' = J.JSObject . J.toJSObject $ filter ((/=) k . fst) fields in if lookup k fields == Just (J.JSBool True) then ifTrue jobj' else ifFalse jobj'
255
true
true
0
13
216
168
85
83
null
null
awbraunstein/emonad
src/Buffer.hs
mit
bufferFromFile :: String -> IO Buffer bufferFromFile path = do b <- doesFileExist path t <- (if b then readFile path else return "") return $ mkBuffer path t -- | Sync the contents of a buffer to a file, given that file's path.
266
bufferFromFile :: String -> IO Buffer bufferFromFile path = do b <- doesFileExist path t <- (if b then readFile path else return "") return $ mkBuffer path t -- | Sync the contents of a buffer to a file, given that file's path.
266
bufferFromFile path = do b <- doesFileExist path t <- (if b then readFile path else return "") return $ mkBuffer path t -- | Sync the contents of a buffer to a file, given that file's path.
228
false
true
0
11
82
73
33
40
null
null
VCTLabs/cbmc-reporter
src/Report.hs
bsd-3-clause
minCoverageSet :: [FuncsCoverage] -> [FuncsCoverage] minCoverageSet = minCoverageSet' [] where minCoverageSet' :: [FuncsCoverage] -> [FuncsCoverage] -> [FuncsCoverage] minCoverageSet' minSet ls = case ls of [] -> minSet _ -> let minClms = nub $ concatMap snd minSet in let m = findMaxU...
1,089
minCoverageSet :: [FuncsCoverage] -> [FuncsCoverage] minCoverageSet = minCoverageSet' [] where minCoverageSet' :: [FuncsCoverage] -> [FuncsCoverage] -> [FuncsCoverage] minCoverageSet' minSet ls = case ls of [] -> minSet _ -> let minClms = nub $ concatMap snd minSet in let m = findMaxU...
1,089
minCoverageSet = minCoverageSet' [] where minCoverageSet' :: [FuncsCoverage] -> [FuncsCoverage] -> [FuncsCoverage] minCoverageSet' minSet ls = case ls of [] -> minSet _ -> let minClms = nub $ concatMap snd minSet in let m = findMaxUncovered minClms ls in let go fc = minCov...
1,036
false
true
3
18
296
363
172
191
null
null
travitch/language-python-builder
src/Language/Python/Common/Builder.hs
bsd-3-clause
exponentAO :: annot -> OpQ annot exponentAO = return . Exponent
63
exponentAO :: annot -> OpQ annot exponentAO = return . Exponent
63
exponentAO = return . Exponent
30
false
true
0
6
10
22
11
11
null
null
pa-ba/equivalence
src/Data/Equivalence/STT.hs
bsd-3-clause
combineEntries :: (Monad m, Applicative m, Ord a) => Equiv s c a -> [b] -> (b -> STT s m (Entry s c a)) -> STT s m () combineEntries _ [] _ = return ()
167
combineEntries :: (Monad m, Applicative m, Ord a) => Equiv s c a -> [b] -> (b -> STT s m (Entry s c a)) -> STT s m () combineEntries _ [] _ = return ()
167
combineEntries _ [] _ = return ()
34
false
true
0
13
52
101
50
51
null
null
BartAdv/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
inferCon = sMN 0 "__infer"
27
inferCon = sMN 0 "__infer"
27
inferCon = sMN 0 "__infer"
27
false
false
0
5
5
11
5
6
null
null
gspindles/mj-score-eval
src/Game/Mahjong/Static/Melds.hs
mit
b3333 = fromJust $ mkMeld Revealed Quartet [b3, b3, b3, b3]
59
b3333 = fromJust $ mkMeld Revealed Quartet [b3, b3, b3, b3]
59
b3333 = fromJust $ mkMeld Revealed Quartet [b3, b3, b3, b3]
59
false
false
1
7
10
32
16
16
null
null
da-x/lamdu
bottlelib/Graphics/UI/GLFW/Events.hs
gpl-3.0
translate :: [GLFWRawEvent] -> [Event] translate [] = []
56
translate :: [GLFWRawEvent] -> [Event] translate [] = []
56
translate [] = []
17
false
true
0
6
8
28
15
13
null
null
nushio3/ghc
compiler/simplCore/SimplEnv.hs
bsd-3-clause
------------------ substIdType :: SimplEnv -> Id -> Id substIdType (SimplEnv { seInScope = in_scope, seTvSubst = tv_env, seCvSubst = cv_env }) id | (isEmptyVarEnv tv_env && isEmptyVarEnv cv_env) || isEmptyVarSet (tyCoVarsOfType old_ty) = id | otherwise = Id.setIdType id (Type.substTy (TCvSubst in_scope tv_env ...
546
substIdType :: SimplEnv -> Id -> Id substIdType (SimplEnv { seInScope = in_scope, seTvSubst = tv_env, seCvSubst = cv_env }) id | (isEmptyVarEnv tv_env && isEmptyVarEnv cv_env) || isEmptyVarSet (tyCoVarsOfType old_ty) = id | otherwise = Id.setIdType id (Type.substTy (TCvSubst in_scope tv_env cv_env) old_ty) ...
527
substIdType (SimplEnv { seInScope = in_scope, seTvSubst = tv_env, seCvSubst = cv_env }) id | (isEmptyVarEnv tv_env && isEmptyVarEnv cv_env) || isEmptyVarSet (tyCoVarsOfType old_ty) = id | otherwise = Id.setIdType id (Type.substTy (TCvSubst in_scope tv_env cv_env) old_ty) -- The tyCoVarsOfType i...
491
true
true
1
11
139
129
67
62
null
null
koengit/symbo
Object.hs
bsd-2-clause
addClauseHere :: [Lit] -> M () addClauseHere xs = do ctx <- here withSolver $ \s -> addClause s (neg ctx : xs)
117
addClauseHere :: [Lit] -> M () addClauseHere xs = do ctx <- here withSolver $ \s -> addClause s (neg ctx : xs)
117
addClauseHere xs = do ctx <- here withSolver $ \s -> addClause s (neg ctx : xs)
86
false
true
0
12
29
60
29
31
null
null
jtojnar/haste-compiler
libraries/ghc-7.10/base/GHC/List.hs
bsd-3-clause
(_:xs) !! n = xs !! (n-1)
34
(_:xs) !! n = xs !! (n-1)
34
(_:xs) !! n = xs !! (n-1)
34
false
false
2
7
15
32
15
17
null
null
ptitfred/ftv-vods
src/Helpers.hs
bsd-3-clause
parents :: [Tournament] -> Parenting parents ts = carry $ decorate (findParent ts) ts
85
parents :: [Tournament] -> Parenting parents ts = carry $ decorate (findParent ts) ts
85
parents ts = carry $ decorate (findParent ts) ts
48
false
true
0
8
13
36
18
18
null
null
alexander-at-github/eta
compiler/ETA/Utils/Encoding.hs
bsd-3-clause
count_commas n cs = (n,cs)
34
count_commas n cs = (n,cs)
34
count_commas n cs = (n,cs)
34
false
false
0
5
12
17
9
8
null
null