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
haskell/haddock
haddock-api/src/Haddock/Interface/Rename.hs
bsd-2-clause
renameForD (ForeignExport _ lname ltype x) = do lname' <- renameL lname ltype' <- renameLSigType ltype return (ForeignExport noExtField lname' ltype' x)
158
renameForD (ForeignExport _ lname ltype x) = do lname' <- renameL lname ltype' <- renameLSigType ltype return (ForeignExport noExtField lname' ltype' x)
158
renameForD (ForeignExport _ lname ltype x) = do lname' <- renameL lname ltype' <- renameLSigType ltype return (ForeignExport noExtField lname' ltype' x)
158
false
false
0
9
27
59
26
33
null
null
thomie/cabal
cabal-install/Distribution/Client/Sandbox.hs
bsd-3-clause
-- | Try to read the most recently configured compiler from the -- 'localBuildInfoFile', falling back on 'configCompilerAuxEx' if it -- cannot be read. getPersistOrConfigCompiler :: ConfigFlags -> IO (Compiler, Platform, ProgramConfiguration) getPersistOrConfigCompiler configFlags = do dist...
681
getPersistOrConfigCompiler :: ConfigFlags -> IO (Compiler, Platform, ProgramConfiguration) getPersistOrConfigCompiler configFlags = do distPref <- findDistPrefOrDefault (configDistPref configFlags) mlbi <- maybeGetPersistBuildConfig distPref case mlbi of Nothing -> do configCompile...
529
getPersistOrConfigCompiler configFlags = do distPref <- findDistPrefOrDefault (configDistPref configFlags) mlbi <- maybeGetPersistBuildConfig distPref case mlbi of Nothing -> do configCompilerAux' configFlags Just lbi -> return ( LocalBuildInfo.compiler lbi , LocalBuildInfo.hostPla...
411
true
true
0
13
177
114
55
59
null
null
vTurbine/ghc
compiler/basicTypes/NameEnv.hs
bsd-3-clause
alterDNameEnv :: (Maybe a -> Maybe a) -> DNameEnv a -> Name -> DNameEnv a alterDNameEnv = alterUDFM
99
alterDNameEnv :: (Maybe a -> Maybe a) -> DNameEnv a -> Name -> DNameEnv a alterDNameEnv = alterUDFM
99
alterDNameEnv = alterUDFM
25
false
true
0
9
17
48
21
27
null
null
d-rive/rivers
Data/Rivers/Streams.hs
bsd-3-clause
-- | The 'splitAt' function takes an integer @n@ and a stream @xs@ -- and returns a pair consisting of the prefix of @xs@ of length -- @n@ and the remaining stream immediately following this prefix. -- -- /Beware/: passing a negative integer as the first argument will -- cause an error. ssplitAt n xs | n == 0 = ([...
485
ssplitAt n xs | n == 0 = ([],xs) | n > 0 = let (prefix,rest) = ssplitAt (n-1) (stail xs) in (shead xs : prefix, rest) | otherwise = error "S.splitAt negative argument."
197
ssplitAt n xs | n == 0 = ([],xs) | n > 0 = let (prefix,rest) = ssplitAt (n-1) (stail xs) in (shead xs : prefix, rest) | otherwise = error "S.splitAt negative argument."
197
true
false
2
11
114
107
56
51
null
null
anchor/servant-purescript
examples/todo/ToDo.hs
bsd-3-clause
tmp :: FilePath tmp = appPath </> "temp"
40
tmp :: FilePath tmp = appPath </> "temp"
40
tmp = appPath </> "temp"
24
false
true
0
6
7
22
9
13
null
null
ckaestne/CIDE
other/CaseStudies/fgl/CIDEfgl/Data/Graph/Inductive/Query/ArtPoint.hs
gpl-3.0
lowTree (B (v, n, bcks) trs) = Brc (v, n, lowv) ts where { lowv = min (minbckEdge n bcks) lowChild; lowChild = minimum (map getLow ts); ts = map lowTree trs}
185
lowTree (B (v, n, bcks) trs) = Brc (v, n, lowv) ts where { lowv = min (minbckEdge n bcks) lowChild; lowChild = minimum (map getLow ts); ts = map lowTree trs}
185
lowTree (B (v, n, bcks) trs) = Brc (v, n, lowv) ts where { lowv = min (minbckEdge n bcks) lowChild; lowChild = minimum (map getLow ts); ts = map lowTree trs}
185
false
false
0
9
59
90
49
41
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 20452727 = 215
34
getValueFromProduct 20452727 = 215
34
getValueFromProduct 20452727 = 215
34
false
false
0
5
3
9
4
5
null
null
zaxtax/hakaru
haskell/Language/Hakaru/Expect.hs
bsd-3-clause
pushIntegrate :: (ABT Term abt) => abt '[] 'HReal -> abt '[] 'HReal -> Expect abt (Variable 'HReal) pushIntegrate lo hi = do x <- freshVar Text.empty SReal unsafePush (SStuff1 (Location x) (\c -> syn (Integrate :$ lo :* hi :* bind x c :* End)) []) return x {- -- BUG: we assume the ar...
482
pushIntegrate :: (ABT Term abt) => abt '[] 'HReal -> abt '[] 'HReal -> Expect abt (Variable 'HReal) pushIntegrate lo hi = do x <- freshVar Text.empty SReal unsafePush (SStuff1 (Location x) (\c -> syn (Integrate :$ lo :* hi :* bind x c :* End)) []) return x {- -- BUG: we assume the ar...
482
pushIntegrate lo hi = do x <- freshVar Text.empty SReal unsafePush (SStuff1 (Location x) (\c -> syn (Integrate :$ lo :* hi :* bind x c :* End)) []) return x {- -- BUG: we assume the arguments are emissible! emitIntegrate lo hi = emit Text.empty SReal (\c -> syn (Integrate :$ lo :* hi :* ...
366
false
true
0
17
132
151
73
78
null
null
nightscape/platform
node/tests/Unison/Test/ResourcePool.hs
mit
decrement :: IORef Int -> IO Int decrement ref = IORef.atomicModifyIORef' ref (\n -> (n-1, n))
94
decrement :: IORef Int -> IO Int decrement ref = IORef.atomicModifyIORef' ref (\n -> (n-1, n))
94
decrement ref = IORef.atomicModifyIORef' ref (\n -> (n-1, n))
61
false
true
0
9
15
49
25
24
null
null
joelwilliamson/validator
Maker.hs
agpl-3.0
(/@@) :: Maker a → Label → Maker [a] f /@@ k = filterSubForest ((/= Label k) . rootLabel) $ mapSubForest f
106
(/@@) :: Maker a → Label → Maker [a] f /@@ k = filterSubForest ((/= Label k) . rootLabel) $ mapSubForest f
106
f /@@ k = filterSubForest ((/= Label k) . rootLabel) $ mapSubForest f
69
false
true
0
10
21
63
31
32
null
null
christiaanb/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
unpackCString_RDR = nameRdrName unpackCStringName
55
unpackCString_RDR = nameRdrName unpackCStringName
55
unpackCString_RDR = nameRdrName unpackCStringName
55
false
false
0
5
9
9
4
5
null
null
raventid/coursera_learning
haskell/will_kurt/15_rot.hs
mit
rotEncoder :: String -> String rotEncoder text = map rotChar text where alphaSize = 1 + fromEnum (maxBound :: Char)
117
rotEncoder :: String -> String rotEncoder text = map rotChar text where alphaSize = 1 + fromEnum (maxBound :: Char)
117
rotEncoder text = map rotChar text where alphaSize = 1 + fromEnum (maxBound :: Char)
86
false
true
0
7
21
44
22
22
null
null
haskell-game/fungen
examples/worms/worms.hs
bsd-3-clause
findLastTail (t1:t2:ts) = do (Tail na) <- getObjectAttribute t1 (Tail nb) <- getObjectAttribute t2 if (na > nb) then findLastTail (t1:ts) else findLastTail (t2:ts)
289
findLastTail (t1:t2:ts) = do (Tail na) <- getObjectAttribute t1 (Tail nb) <- getObjectAttribute t2 if (na > nb) then findLastTail (t1:ts) else findLastTail (t2:ts)
289
findLastTail (t1:t2:ts) = do (Tail na) <- getObjectAttribute t1 (Tail nb) <- getObjectAttribute t2 if (na > nb) then findLastTail (t1:ts) else findLastTail (t2:ts)
289
false
false
0
10
149
90
44
46
null
null
ocramz/petsc-hs
src/Numerical/PETSc/Internal/InlineC.hs
gpl-3.0
-- PETSC_EXTERN PetscErrorCode DMDAGetInfo(DM,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,DMBoundaryType*,DMBoundaryType*,DMBoundaryType*,DMDAStencilType*); -- PETSC_EXTERN PetscErrorCode DMDAGetProcessorSubset(DM,DMDADirection,PetscInt,MPI_Comm*); -- PETSC_EXTERN PetscErro...
1,511
dmdaSetUniformCoordinates' :: DM -> PetscReal_ -> PetscReal_ -> PetscReal_ -> PetscReal_ -> PetscReal_ -...
601
dmdaSetUniformCoordinates' da xmin xmax ymin ymax zmin zmax = [C.exp|int{DMDASetUniformCoordinates($(DM da),$(PetscReal xmin),$(PetscReal xmax),$(PetscReal ymin),$(PetscReal ymax),$(PetscReal zmin),$(PetscReal zmax))}|]
221
true
true
0
12
371
74
44
30
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'Seq.zip' seq_zip = Seq.zip
31
seq_zip = Seq.zip
17
seq_zip = Seq.zip
17
true
false
0
5
4
9
5
4
null
null
imeckler/proof
Parse/Tex.hs
mit
-- TODO: Simple proof proof = fmap (Steps . snd) . env "proof" $ many step
74
proof = fmap (Steps . snd) . env "proof" $ many step
52
proof = fmap (Steps . snd) . env "proof" $ many step
52
true
false
0
9
15
31
15
16
null
null
ghc-android/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
fromRationalClassOpKey = mkPreludeMiscIdUnique 162
57
fromRationalClassOpKey = mkPreludeMiscIdUnique 162
57
fromRationalClassOpKey = mkPreludeMiscIdUnique 162
57
false
false
0
5
10
9
4
5
null
null
prl-tokyo/bigul-configuration-adaptation
Transformations/src/BiFlux/XPath/HXT/XPathParser.hs
mit
relLocPath :: XPathParser [XStep] relLocPath = do s1 <- step s2 <- many (step') return ([s1] ++ (concat s2)) <?> "relLocPath"
153
relLocPath :: XPathParser [XStep] relLocPath = do s1 <- step s2 <- many (step') return ([s1] ++ (concat s2)) <?> "relLocPath"
153
relLocPath = do s1 <- step s2 <- many (step') return ([s1] ++ (concat s2)) <?> "relLocPath"
119
false
true
2
11
48
70
32
38
null
null
deweyvm/kayvee
src/Database/Kayvee/Common.hs
mit
valuePut :: String -> String -> Put valuePut s v = do let ss = toPointer $ (genericLength s) uLogAll ("Putting value: " ++ show ss) $ putWord64be ss let ps = pack s uLogAll ("Putting value: " ++ show ps) $ putByteString ps let sv = toPointer $ (genericLength v) uLogAll ("Putting value: " ++ show...
423
valuePut :: String -> String -> Put valuePut s v = do let ss = toPointer $ (genericLength s) uLogAll ("Putting value: " ++ show ss) $ putWord64be ss let ps = pack s uLogAll ("Putting value: " ++ show ps) $ putByteString ps let sv = toPointer $ (genericLength v) uLogAll ("Putting value: " ++ show...
423
valuePut s v = do let ss = toPointer $ (genericLength s) uLogAll ("Putting value: " ++ show ss) $ putWord64be ss let ps = pack s uLogAll ("Putting value: " ++ show ps) $ putByteString ps let sv = toPointer $ (genericLength v) uLogAll ("Putting value: " ++ show sv) $ putWord64be sv let pv = p...
387
false
true
0
12
107
178
80
98
null
null
coolhacks/scripts-hacks
examples/shellcheck-master/ShellCheck/Analytics.hs
mit
getVariableFlow shell parents t = let (_, stack) = runState (doStackAnalysis startScope endScope t) [] in reverse stack where startScope t = let scopeType = leadType shell parents t in do when (scopeType /= NoneScope) $ modify (StackScope scopeType:) when (assignFir...
900
getVariableFlow shell parents t = let (_, stack) = runState (doStackAnalysis startScope endScope t) [] in reverse stack where startScope t = let scopeType = leadType shell parents t in do when (scopeType /= NoneScope) $ modify (StackScope scopeType:) when (assignFir...
900
getVariableFlow shell parents t = let (_, stack) = runState (doStackAnalysis startScope endScope t) [] in reverse stack where startScope t = let scopeType = leadType shell parents t in do when (scopeType /= NoneScope) $ modify (StackScope scopeType:) when (assignFir...
900
false
false
4
12
286
347
156
191
null
null
karamaan/karamaan-plankton
Karamaan/Plankton/Date.hs
bsd-3-clause
todayLocal :: IO Day todayLocal = (return . zonedTimeToDay) =<< getZonedTime
76
todayLocal :: IO Day todayLocal = (return . zonedTimeToDay) =<< getZonedTime
76
todayLocal = (return . zonedTimeToDay) =<< getZonedTime
55
false
true
0
7
10
25
13
12
null
null
ezyang/ghc
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
eqResult OrdGE = true_Expr
31
eqResult OrdGE = true_Expr
31
eqResult OrdGE = true_Expr
31
false
false
0
5
8
9
4
5
null
null
wavewave/HROOT
HROOT-generate/lib/HROOT/Data/Hist/Class.hs
gpl-3.0
tH2F :: Class tH2F = histclass "TH2F" [tH2, tArrayF] (Protected ["fill1"]) [ Constructor [cstring "name",cstring "title",int "nbinsx",double "xlow",double "xup" ,int "nbinsy", double "ylow", double "yup"] Nothing ]
258
tH2F :: Class tH2F = histclass "TH2F" [tH2, tArrayF] (Protected ["fill1"]) [ Constructor [cstring "name",cstring "title",int "nbinsx",double "xlow",double "xup" ,int "nbinsy", double "ylow", double "yup"] Nothing ]
258
tH2F = histclass "TH2F" [tH2, tArrayF] (Protected ["fill1"]) [ Constructor [cstring "name",cstring "title",int "nbinsx",double "xlow",double "xup" ,int "nbinsy", double "ylow", double "yup"] Nothing ]
244
false
true
0
9
70
91
47
44
null
null
kavigupta/Infsabot
Infsabot/Board/Logic.hs
gpl-3.0
startingBoard :: Parameters -> (Team -> RobotProgram) -> Board startingBoard p programOf = setRobot (0, unNatural (paramBoardSize p) - 1) (bot B) $ setRobot (unNatural (paramBoardSize p) - 1, 0) (bot A) Board { boardContents = startingSpots, boardRobots = M.fromList [],...
1,122
startingBoard :: Parameters -> (Team -> RobotProgram) -> Board startingBoard p programOf = setRobot (0, unNatural (paramBoardSize p) - 1) (bot B) $ setRobot (unNatural (paramBoardSize p) - 1, 0) (bot A) Board { boardContents = startingSpots, boardRobots = M.fromList [],...
1,122
startingBoard p programOf = setRobot (0, unNatural (paramBoardSize p) - 1) (bot B) $ setRobot (unNatural (paramBoardSize p) - 1, 0) (bot A) Board { boardContents = startingSpots, boardRobots = M.fromList [], boardSize = unNatural $ paramBoardSize p, ...
1,059
false
true
0
16
376
296
153
143
null
null
GaloisInc/saw-script
rme/src/Data/RME/Base.hs
bsd-3-clause
depth R1 = 0
12
depth R1 = 0
12
depth R1 = 0
12
false
false
1
5
3
13
4
9
null
null
nomeata/ghc
compiler/cmm/OldCmmUtils.hs
bsd-3-clause
cheapEqExpr (CmmRegOff r n) (CmmRegOff r' n') = r==r' && n==n'
62
cheapEqExpr (CmmRegOff r n) (CmmRegOff r' n') = r==r' && n==n'
62
cheapEqExpr (CmmRegOff r n) (CmmRegOff r' n') = r==r' && n==n'
62
false
false
0
7
10
39
19
20
null
null
mbakke/ganeti
src/Ganeti/WConfd/ConfigModifications.hs
bsd-2-clause
updateDisk :: Disk -> WConfdMonad (MaybeForJSON (Int, TimeAsDoubleJSON)) updateDisk disk = do ct <- liftIO getClockTime let dL = csConfigDataL . configDisksL r <- modifyConfigAndReturnWithLock (\_ -> updateConfigIfNecessary ct disk (^. dL) (\cs -> do dC <- toError $ replaceIn ct disk (cs ^. dL) re...
528
updateDisk :: Disk -> WConfdMonad (MaybeForJSON (Int, TimeAsDoubleJSON)) updateDisk disk = do ct <- liftIO getClockTime let dL = csConfigDataL . configDisksL r <- modifyConfigAndReturnWithLock (\_ -> updateConfigIfNecessary ct disk (^. dL) (\cs -> do dC <- toError $ replaceIn ct disk (cs ^. dL) re...
528
updateDisk disk = do ct <- liftIO getClockTime let dL = csConfigDataL . configDisksL r <- modifyConfigAndReturnWithLock (\_ -> updateConfigIfNecessary ct disk (^. dL) (\cs -> do dC <- toError $ replaceIn ct disk (cs ^. dL) return ((serialOf disk + 1, ct), (dL .~ dC) cs))) . T.releaseDRBDMinors...
455
false
true
0
23
108
198
99
99
null
null
tphyahoo/haskoin
haskoin-core/Network/Haskoin/Crypto/Mnemonic.hs
unlicense
getIndices :: [ByteString] -> Either String [Int] getIndices ws | null n = return $ catMaybes i | otherwise = Left $ "getIndices: words not found: " ++ cs w where i = map (`M.lookup` wl') ws n = elemIndices Nothing i w = C.unwords $ map (ws!!) n
267
getIndices :: [ByteString] -> Either String [Int] getIndices ws | null n = return $ catMaybes i | otherwise = Left $ "getIndices: words not found: " ++ cs w where i = map (`M.lookup` wl') ws n = elemIndices Nothing i w = C.unwords $ map (ws!!) n
267
getIndices ws | null n = return $ catMaybes i | otherwise = Left $ "getIndices: words not found: " ++ cs w where i = map (`M.lookup` wl') ws n = elemIndices Nothing i w = C.unwords $ map (ws!!) n
217
false
true
9
8
70
138
60
78
null
null
ndmitchell/hogle-dead
src/Input/Type.hs
bsd-3-clause
isIModule IModule{} = True
26
isIModule IModule{} = True
26
isIModule IModule{} = True
26
false
false
0
6
3
13
6
7
null
null
themoritz/cabal
cabal-install/tests/IntegrationTests2.hs
bsd-3-clause
testSetupScriptStyles :: ProjectConfig -> (String -> IO ()) -> Assertion testSetupScriptStyles config reportSubCase = do reportSubCase (show SetupCustomExplicitDeps) plan0@(_,_,sharedConfig) <- planProject testdir1 config let isOSX (Platform _ OSX) = True isOSX _ = False -- Skip the Custom tests when t...
2,458
testSetupScriptStyles :: ProjectConfig -> (String -> IO ()) -> Assertion testSetupScriptStyles config reportSubCase = do reportSubCase (show SetupCustomExplicitDeps) plan0@(_,_,sharedConfig) <- planProject testdir1 config let isOSX (Platform _ OSX) = True isOSX _ = False -- Skip the Custom tests when t...
2,458
testSetupScriptStyles config reportSubCase = do reportSubCase (show SetupCustomExplicitDeps) plan0@(_,_,sharedConfig) <- planProject testdir1 config let isOSX (Platform _ OSX) = True isOSX _ = False -- Skip the Custom tests when the shipped Cabal library is buggy unless (isOSX (pkgConfigPlatform shar...
2,385
false
true
0
14
496
499
241
258
null
null
alasconnect/auth0
src/Auth0/Management/Users.hs
apache-2.0
usersApi :: Proxy UsersApi usersApi = Proxy
43
usersApi :: Proxy UsersApi usersApi = Proxy
43
usersApi = Proxy
16
false
true
1
5
6
18
7
11
null
null
IreneKnapp/ozweb
Haskell/Schema.hs
mit
evaluate context expression@(ConstantExpression { }) _ = do let dynamicResult = constantExpressionValue expression case fromDynamic dynamicResult of Nothing -> throwError $ "Expression of unexpected type." Just result -> return result
246
evaluate context expression@(ConstantExpression { }) _ = do let dynamicResult = constantExpressionValue expression case fromDynamic dynamicResult of Nothing -> throwError $ "Expression of unexpected type." Just result -> return result
246
evaluate context expression@(ConstantExpression { }) _ = do let dynamicResult = constantExpressionValue expression case fromDynamic dynamicResult of Nothing -> throwError $ "Expression of unexpected type." Just result -> return result
246
false
false
2
11
41
72
31
41
null
null
gbataille/pandoc
src/Text/Pandoc/Writers/MediaWiki.hs
gpl-2.0
listAttribsToString :: ListAttributes -> String listAttribsToString (startnum, numstyle, _) = let numstyle' = camelCaseToHyphenated $ show numstyle in (if startnum /= 1 then " start=\"" ++ show startnum ++ "\"" else "") ++ (if numstyle /= DefaultStyle then " style=\"list-style-t...
367
listAttribsToString :: ListAttributes -> String listAttribsToString (startnum, numstyle, _) = let numstyle' = camelCaseToHyphenated $ show numstyle in (if startnum /= 1 then " start=\"" ++ show startnum ++ "\"" else "") ++ (if numstyle /= DefaultStyle then " style=\"list-style-t...
367
listAttribsToString (startnum, numstyle, _) = let numstyle' = camelCaseToHyphenated $ show numstyle in (if startnum /= 1 then " start=\"" ++ show startnum ++ "\"" else "") ++ (if numstyle /= DefaultStyle then " style=\"list-style-type: " ++ numstyle' ++ ";\"" else "")
319
false
true
0
12
97
98
52
46
null
null
kallisti-dev/discordian-calendar
src/Data/Time/Calendar/Discordian.hs
bsd-3-clause
stTibsDay :: Integer -> Maybe Day stTibsDay dYear | isLeapYear gYear = Just (fromGregorian gYear 2 29) | otherwise = Nothing where gYear = dYear - 1166 -- |Show the name of a Discordian season. Input values are clipped to valid ranges.
250
stTibsDay :: Integer -> Maybe Day stTibsDay dYear | isLeapYear gYear = Just (fromGregorian gYear 2 29) | otherwise = Nothing where gYear = dYear - 1166 -- |Show the name of a Discordian season. Input values are clipped to valid ranges.
250
stTibsDay dYear | isLeapYear gYear = Just (fromGregorian gYear 2 29) | otherwise = Nothing where gYear = dYear - 1166 -- |Show the name of a Discordian season. Input values are clipped to valid ranges.
216
false
true
1
8
56
75
32
43
null
null
sleepomeno/TForth
src/TF/Util.hs
apache-2.0
for = flip map
14
for = flip map
14
for = flip map
14
false
false
1
5
3
12
4
8
null
null
xmonad/xmonad-contrib
XMonad/Layout/SortedLayout.hs
bsd-3-clause
-- $usage -- You can use this module with the following in your -- @~\/.xmonad\/xmonad.hs@: -- -- > import XMonad.Layout.SortedLayout -- -- Then edit your @layoutHook@ to sort another layout (in this case, 'XMonad.Layout.Grid.Grid'): -- -- > myLayout = sorted [ClassName "Firefox", ClassName "URxvt"] Grid -- > main = xm...
692
sorted :: [Property] -> l a -> ModifiedLayout SortedLayout l a sorted props = ModifiedLayout . SortedLayout $ props ++ [Const True]
145
sorted props = ModifiedLayout . SortedLayout $ props ++ [Const True]
68
true
true
0
8
121
73
42
31
null
null
snapframework/snap-core
test/Snap/Core/Tests.hs
bsd-3-clause
testEvalSnap :: Test testEvalSnap = testCase "core/evalSnap-exception" $ do rq <- mkZomgRq expectExceptionH (evalSnap f logerr tout rq >> return ()) where f = do logError "zzz" v <- withResponse (return . rspStatus) liftIO $ assertEqual "evalSnap rsp status" 200 v finishWit...
416
testEvalSnap :: Test testEvalSnap = testCase "core/evalSnap-exception" $ do rq <- mkZomgRq expectExceptionH (evalSnap f logerr tout rq >> return ()) where f = do logError "zzz" v <- withResponse (return . rspStatus) liftIO $ assertEqual "evalSnap rsp status" 200 v finishWit...
416
testEvalSnap = testCase "core/evalSnap-exception" $ do rq <- mkZomgRq expectExceptionH (evalSnap f logerr tout rq >> return ()) where f = do logError "zzz" v <- withResponse (return . rspStatus) liftIO $ assertEqual "evalSnap rsp status" 200 v finishWith emptyResponse ---...
395
false
true
0
12
91
104
47
57
null
null
sirius94/lambdai
src/Reducer/Renderer.hs
gpl-3.0
alignLeft :: Int -> String -> String alignLeft n s = s ++ replicate (n - (length s)) ' '
88
alignLeft :: Int -> String -> String alignLeft n s = s ++ replicate (n - (length s)) ' '
88
alignLeft n s = s ++ replicate (n - (length s)) ' '
51
false
true
0
10
19
46
23
23
null
null
fcostantini/QuickFuzz
src/Lua.hs
gpl-3.0
popId :: Name -> VState Name () popId i = do st <- get put $ st {vars = delete i (vars st)}
104
popId :: Name -> VState Name () popId i = do st <- get put $ st {vars = delete i (vars st)}
104
popId i = do st <- get put $ st {vars = delete i (vars st)}
72
false
true
0
13
35
63
29
34
null
null
WSCU/JSEuterpea
Euterpea Examples/Random.hs
gpl-3.0
rand1 = (marimba sixteenths) * (flute eighths)
46
rand1 = (marimba sixteenths) * (flute eighths)
46
rand1 = (marimba sixteenths) * (flute eighths)
46
false
false
0
7
6
22
11
11
null
null
fmapfmapfmap/amazonka
amazonka-kms/gen/Network/AWS/KMS/Encrypt.hs
mpl-2.0
-- | The response status code. ersResponseStatus :: Lens' EncryptResponse Int ersResponseStatus = lens _ersResponseStatus (\ s a -> s{_ersResponseStatus = a})
158
ersResponseStatus :: Lens' EncryptResponse Int ersResponseStatus = lens _ersResponseStatus (\ s a -> s{_ersResponseStatus = a})
127
ersResponseStatus = lens _ersResponseStatus (\ s a -> s{_ersResponseStatus = a})
80
true
true
1
9
21
44
22
22
null
null
avieth/postgresql-simple
src/Database/PostgreSQL/Simple/FromField.hs
bsd-3-clause
typeInfoByOid :: PQ.Oid -> Conversion TypeInfo typeInfoByOid oid = Conversion $ \conn -> do Ok <$> (getTypeInfo conn oid) -- | Returns the name of the column. This is often determined by a table -- definition, but it can be set using an @as@ clause.
276
typeInfoByOid :: PQ.Oid -> Conversion TypeInfo typeInfoByOid oid = Conversion $ \conn -> do Ok <$> (getTypeInfo conn oid) -- | Returns the name of the column. This is often determined by a table -- definition, but it can be set using an @as@ clause.
276
typeInfoByOid oid = Conversion $ \conn -> do Ok <$> (getTypeInfo conn oid) -- | Returns the name of the column. This is often determined by a table -- definition, but it can be set using an @as@ clause.
229
false
true
0
11
71
49
25
24
null
null
alexander-at-github/eta
compiler/ETA/CodeGen/ArgRep.hs
bsd-3-clause
slowCallPattern (F: _) = ("ap_f", 1, [jfloat])
61
slowCallPattern (F: _) = ("ap_f", 1, [jfloat])
61
slowCallPattern (F: _) = ("ap_f", 1, [jfloat])
61
false
false
0
7
21
28
16
12
null
null
edom/sound
src/Sound/InfList.hs
bsd-3-clause
-- * Continuation-based transformation {- $ The functions in this section follow this pattern: @ lcfff n ... x0 x1 ... c ~ 'take' n (fff x0 x1 ...) '++' c ('drop' n x0) ('drop' n x1) ... @ The first argument, which can be a number or a predicate, determines the length of the prefix that is being manipulated. The l...
718
lcmap :: Int -> (a -> b) -> L a -> (L a -> L b) -> L b lcmap n_ f_ x_ c_ = loop n_ x_ where loop n (MkL h t) | n > 0 = MkL (f_ h) (loop (n - 1) t) loop _ x = c_ x {- | @ lcid n x c = 'lcmap' n 'id' x c lcid n x c ~ 'take' n x '++' c ('drop' n x) @ -}
275
lcmap n_ f_ x_ c_ = loop n_ x_ where loop n (MkL h t) | n > 0 = MkL (f_ h) (loop (n - 1) t) loop _ x = c_ x {- | @ lcid n x c = 'lcmap' n 'id' x c lcid n x c ~ 'take' n x '++' c ('drop' n x) @ -}
220
true
true
1
12
204
150
71
79
null
null
ribag/ganeti-experiments
src/Ganeti/Query/Node.hs
gpl-2.0
-- | The node fields map. fieldsMap :: FieldMap Node Runtime fieldsMap = fieldListToFieldMap nodeFields
103
fieldsMap :: FieldMap Node Runtime fieldsMap = fieldListToFieldMap nodeFields
77
fieldsMap = fieldListToFieldMap nodeFields
42
true
true
0
5
14
20
10
10
null
null
tittoassini/flat
test/Core.hs
bsd-3-clause
sz32 = getSize E32_13
21
sz32 = getSize E32_13
21
sz32 = getSize E32_13
21
false
false
1
5
3
13
4
9
null
null
jasonrbriggs/proton
haskell/testsuite/TestXml.hs
apache-2.0
xmlTests = [TestLabel "Basic Parse Test" basicParseTest, TestLabel "Contains Attribute Test1" containsAttributeTest1, TestLabel "Copy Elements Test" copyElementsTest, TestLabel "Copy Element Test" copyElementTest, TestLabel "Find At...
429
xmlTests = [TestLabel "Basic Parse Test" basicParseTest, TestLabel "Contains Attribute Test1" containsAttributeTest1, TestLabel "Copy Elements Test" copyElementsTest, TestLabel "Copy Element Test" copyElementTest, TestLabel "Find At...
429
xmlTests = [TestLabel "Basic Parse Test" basicParseTest, TestLabel "Contains Attribute Test1" containsAttributeTest1, TestLabel "Copy Elements Test" copyElementsTest, TestLabel "Copy Element Test" copyElementTest, TestLabel "Find At...
429
false
false
0
6
141
54
27
27
null
null
yuvallanger/threepenny-gui
samples/Paths.hs
bsd-3-clause
getStaticDir :: IO FilePath getStaticDir = (</> "wwwroot") `liftM` Paths_threepenny_gui.getDataDir
98
getStaticDir :: IO FilePath getStaticDir = (</> "wwwroot") `liftM` Paths_threepenny_gui.getDataDir
98
getStaticDir = (</> "wwwroot") `liftM` Paths_threepenny_gui.getDataDir
70
false
true
0
6
9
26
15
11
null
null
worksap-ate/aws-sdk
Cloud/AWS/RDS/OptionGroup.hs
bsd-3-clause
optionGroupOptionSink :: (MonadThrow m, Applicative m) => XmlElement -> m OptionGroupOption optionGroupOptionSink xml = OptionGroupOption <$> xml .< "MajorEngineVersion" <*> xml .< "Persistent" <*> xml .< "PortRequired" <*> elements' "OptionsDependedOn" "OptionName" content xml <*> xml .< "D...
538
optionGroupOptionSink :: (MonadThrow m, Applicative m) => XmlElement -> m OptionGroupOption optionGroupOptionSink xml = OptionGroupOption <$> xml .< "MajorEngineVersion" <*> xml .< "Persistent" <*> xml .< "PortRequired" <*> elements' "OptionsDependedOn" "OptionName" content xml <*> xml .< "D...
538
optionGroupOptionSink xml = OptionGroupOption <$> xml .< "MajorEngineVersion" <*> xml .< "Persistent" <*> xml .< "PortRequired" <*> elements' "OptionsDependedOn" "OptionName" content xml <*> xml .< "Description" <*> xml .< "DefaultPort" <*> xml .< "Name" <*> elements "OptionGroupOptionSe...
438
false
true
45
8
105
175
88
87
null
null
mishun/tangles
src/Math/Topology/KnotTh/Algebra/Homology.hs
lgpl-3.0
smithNormalForm :: (Integral a, Eq g) => V.Vector g -> V.Vector g -> Matrix.Matrix a -> (V.Vector (g, a), V.Vector g) smithNormalForm colGrading rowGrading matrix = ST.runST $ do let rows = Matrix.nrows matrix cols = Matrix.ncols matrix idx i j = i * cols + j when (V.length colGrading /= cols) ...
4,641
smithNormalForm :: (Integral a, Eq g) => V.Vector g -> V.Vector g -> Matrix.Matrix a -> (V.Vector (g, a), V.Vector g) smithNormalForm colGrading rowGrading matrix = ST.runST $ do let rows = Matrix.nrows matrix cols = Matrix.ncols matrix idx i j = i * cols + j when (V.length colGrading /= cols) ...
4,641
smithNormalForm colGrading rowGrading matrix = ST.runST $ do let rows = Matrix.nrows matrix cols = Matrix.ncols matrix idx i j = i * cols + j when (V.length colGrading /= cols) $ error "bad colGrading length" when (V.length rowGrading /= rows) $ error "bad rowGrading length" rg <- V.th...
4,523
false
true
3
28
2,318
1,771
832
939
null
null
ekmett/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/Types.hs
lgpl-2.1
-- | Return the height. (see also 'sizeH'). sizeHeight :: (Num a) => Size2D a -> a sizeHeight (Size w h) = h
110
sizeHeight :: (Num a) => Size2D a -> a sizeHeight (Size w h) = h
66
sizeHeight (Size w h) = h
27
true
true
0
7
24
39
20
19
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 1103414 = 3635
34
getValueFromProduct 1103414 = 3635
34
getValueFromProduct 1103414 = 3635
34
false
false
0
5
3
9
4
5
null
null
onponomarev/ganeti
test/hs/Test/Ganeti/OpCodes.hs
bsd-2-clause
-- | Generates list of disk indices. genDiskIndices :: Gen [DiskIndex] genDiskIndices = do cnt <- choose (0, C.maxDisks) genUniquesList cnt arbitrary -- | Generates a list of node names.
191
genDiskIndices :: Gen [DiskIndex] genDiskIndices = do cnt <- choose (0, C.maxDisks) genUniquesList cnt arbitrary -- | Generates a list of node names.
154
genDiskIndices = do cnt <- choose (0, C.maxDisks) genUniquesList cnt arbitrary -- | Generates a list of node names.
120
true
true
0
10
34
45
23
22
null
null
andorp/hs-bluesnap
test/Bluesnap/Test/Parser.hs
gpl-3.0
testParamDecryptionRspParser = testXMLParser Response.elementParam_decryption
77
testParamDecryptionRspParser = testXMLParser Response.elementParam_decryption
77
testParamDecryptionRspParser = testXMLParser Response.elementParam_decryption
77
false
false
0
6
3
11
5
6
null
null
GaloisInc/haskell-tor
src/Tor/DataFormat/TorCell.hs
bsd-3-clause
putDestroyReason ORConnectionClosed = putWord8 8
56
putDestroyReason ORConnectionClosed = putWord8 8
56
putDestroyReason ORConnectionClosed = putWord8 8
56
false
false
0
5
12
13
5
8
null
null
garetxe/cabal
cabal-install/tests/UnitTests/Distribution/Client/Sandbox/Timestamp.hs
bsd-3-clause
timestampRecord_v2 :: String timestampRecord_v2 = "2\n" ++ "[(\"i386-linux-ghc-8.0.0.20160204\",[(\"/foo/bar/Baz\",1455350946)])" ++ ",(\"i386-linux-ghc-7.10.3\",[(\"/foo/bar/Baz\",1455484719)])]"
202
timestampRecord_v2 :: String timestampRecord_v2 = "2\n" ++ "[(\"i386-linux-ghc-8.0.0.20160204\",[(\"/foo/bar/Baz\",1455350946)])" ++ ",(\"i386-linux-ghc-7.10.3\",[(\"/foo/bar/Baz\",1455484719)])]"
202
timestampRecord_v2 = "2\n" ++ "[(\"i386-linux-ghc-8.0.0.20160204\",[(\"/foo/bar/Baz\",1455350946)])" ++ ",(\"i386-linux-ghc-7.10.3\",[(\"/foo/bar/Baz\",1455484719)])]"
173
false
true
0
6
15
19
10
9
null
null
jameshsmith/HRL
Server/Abyss/Spell.hs
mit
fizzleEffect :: Effect fizzleEffect = Effect Nothing (Ana (\s -> lift (message s) >> mzero) "*Fizzle*")
103
fizzleEffect :: Effect fizzleEffect = Effect Nothing (Ana (\s -> lift (message s) >> mzero) "*Fizzle*")
103
fizzleEffect = Effect Nothing (Ana (\s -> lift (message s) >> mzero) "*Fizzle*")
80
false
true
0
13
15
51
24
27
null
null
beloglazov/haskell-course
hw1.hs
apache-2.0
doubleEveryOtherRev (x:y:rest) = x : (y * 2) : doubleEveryOtherRev rest
71
doubleEveryOtherRev (x:y:rest) = x : (y * 2) : doubleEveryOtherRev rest
71
doubleEveryOtherRev (x:y:rest) = x : (y * 2) : doubleEveryOtherRev rest
71
false
false
0
8
10
38
19
19
null
null
ocean0yohsuke/Scheme
src/Scheme/Evaluator/Eval.hs
bsd-3-clause
eagerApply (CLOS (CELL params seq msp) mlenv) args = localMSP msp $ do lenv <- newLEnv mlenv params <- bind lenv params args case params of NIL -> localMLEnv (Just lenv) $ seqM eval seq _ -> (*:) $ RETURN $ CLOS (CELL params seq msp) (Just lenv)
271
eagerApply (CLOS (CELL params seq msp) mlenv) args = localMSP msp $ do lenv <- newLEnv mlenv params <- bind lenv params args case params of NIL -> localMLEnv (Just lenv) $ seqM eval seq _ -> (*:) $ RETURN $ CLOS (CELL params seq msp) (Just lenv)
271
eagerApply (CLOS (CELL params seq msp) mlenv) args = localMSP msp $ do lenv <- newLEnv mlenv params <- bind lenv params args case params of NIL -> localMLEnv (Just lenv) $ seqM eval seq _ -> (*:) $ RETURN $ CLOS (CELL params seq msp) (Just lenv)
271
false
false
0
14
73
128
60
68
null
null
NCrashed/servant-auth-token
servant-auth-token-leveldb/src/Servant/Server/Auth/Token/LevelDB/Schema.hs
bsd-3-clause
storeModel :: MonadResource m => LevelDBEnv -> Model -> m () storeModel db = store db modelId
93
storeModel :: MonadResource m => LevelDBEnv -> Model -> m () storeModel db = store db modelId
93
storeModel db = store db modelId
32
false
true
0
9
16
39
18
21
null
null
emmanueldenloye/manifoldRNC
src/Utils.hs
bsd-3-clause
errorMsg1 :: String errorMsg1 = "You did not enter two positive integers.\n"
76
errorMsg1 :: String errorMsg1 = "You did not enter two positive integers.\n"
76
errorMsg1 = "You did not enter two positive integers.\n"
56
false
true
0
4
11
11
6
5
null
null
Persi/shellcheck
ShellCheck/Parser.hs
gpl-3.0
prop_readDollarBraced3 = isOk readDollarBraced "${foo%%$(echo cow\\})}"
71
prop_readDollarBraced3 = isOk readDollarBraced "${foo%%$(echo cow\\})}"
71
prop_readDollarBraced3 = isOk readDollarBraced "${foo%%$(echo cow\\})}"
71
false
false
0
5
5
11
5
6
null
null
cirquit/hjc
src/TypeCheck/TypeCheck.hs
mit
checkReturnType rtype = do let id = showJC rtype exists <- classExists id when (not exists) $ appendError typeNotDefinedError where typeNotDefinedError = do let id = showJC rtype return $ printf "Undefined type \"%s\" in the return type" id
274
checkReturnType rtype = do let id = showJC rtype exists <- classExists id when (not exists) $ appendError typeNotDefinedError where typeNotDefinedError = do let id = showJC rtype return $ printf "Undefined type \"%s\" in the return type" id
274
checkReturnType rtype = do let id = showJC rtype exists <- classExists id when (not exists) $ appendError typeNotDefinedError where typeNotDefinedError = do let id = showJC rtype return $ printf "Undefined type \"%s\" in the return type" id
274
false
false
0
10
72
82
35
47
null
null
TomMD/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
geIntegerPrimIdKey = mkPreludeMiscIdUnique 77
56
geIntegerPrimIdKey = mkPreludeMiscIdUnique 77
56
geIntegerPrimIdKey = mkPreludeMiscIdUnique 77
56
false
false
0
5
14
9
4
5
null
null
TOSPIO/yi
src/library/Yi/Rectangle.hs
gpl-2.0
killRectangle :: EditorM () killRectangle = do cutted <- withCurrentBuffer $ do (reg, l, r) <- getRectangle text <- readRegionB reg let (cutted, rest) = unzip $ fmap cut $ R.lines' text cut :: R.YiString -> (R.YiString, R.YiString) cut line = let [left,mid,right] = multiSplit [l...
464
killRectangle :: EditorM () killRectangle = do cutted <- withCurrentBuffer $ do (reg, l, r) <- getRectangle text <- readRegionB reg let (cutted, rest) = unzip $ fmap cut $ R.lines' text cut :: R.YiString -> (R.YiString, R.YiString) cut line = let [left,mid,right] = multiSplit [l...
464
killRectangle = do cutted <- withCurrentBuffer $ do (reg, l, r) <- getRectangle text <- readRegionB reg let (cutted, rest) = unzip $ fmap cut $ R.lines' text cut :: R.YiString -> (R.YiString, R.YiString) cut line = let [left,mid,right] = multiSplit [l,r] line ...
436
false
true
0
19
136
192
95
97
null
null
jwiegley/ghc-release
utils/haddock/test/Haddock/ParserSpec.hs
gpl-3.0
spec :: Spec spec = before initStaticOpts $ do describe "parseString" $ do let infix 1 `shouldParseTo` shouldParseTo :: String -> Doc RdrName -> Expectation shouldParseTo input ast = parseString input `shouldBe` ast it "is total" $ do property $ \xs -> (length . show . parseStri...
27,355
spec :: Spec spec = before initStaticOpts $ do describe "parseString" $ do let infix 1 `shouldParseTo` shouldParseTo :: String -> Doc RdrName -> Expectation shouldParseTo input ast = parseString input `shouldBe` ast it "is total" $ do property $ \xs -> (length . show . parseStri...
27,355
spec = before initStaticOpts $ do describe "parseString" $ do let infix 1 `shouldParseTo` shouldParseTo :: String -> Doc RdrName -> Expectation shouldParseTo input ast = parseString input `shouldBe` ast it "is total" $ do property $ \xs -> (length . show . parseString) xs `shoul...
27,342
false
true
0
111
9,624
5,385
2,599
2,786
null
null
vikraman/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
mkNPlusKPat id lit = NPlusKPat id lit (unLoc lit) noSyntaxExpr noSyntaxExpr placeHolderType
91
mkNPlusKPat id lit = NPlusKPat id lit (unLoc lit) noSyntaxExpr noSyntaxExpr placeHolderType
91
mkNPlusKPat id lit = NPlusKPat id lit (unLoc lit) noSyntaxExpr noSyntaxExpr placeHolderType
91
false
false
1
7
11
37
14
23
null
null
TueHaulund/ROOPLC
src/MacroExpander.hs
mit
meMacro (AddressMacro l) = getAddress l
39
meMacro (AddressMacro l) = getAddress l
39
meMacro (AddressMacro l) = getAddress l
39
false
false
0
6
5
19
8
11
null
null
CloudI/CloudI
src/api/haskell/external/bytestring-0.10.10.0/Data/ByteString/Builder/Prim/ASCII.hs
mit
int8HexFixed :: FixedPrim Int8 int8HexFixed = fromIntegral >$< word8HexFixed
76
int8HexFixed :: FixedPrim Int8 int8HexFixed = fromIntegral >$< word8HexFixed
76
int8HexFixed = fromIntegral >$< word8HexFixed
45
false
true
1
6
8
22
9
13
null
null
wtetzner/hatemail
haskell/src/Parse.hs
gpl-3.0
bodyExtMPart = choice [bodyExtLoc bodyFieldPrm, bodyExtLang bodyFieldPrm, bodyExtDsp bodyFieldPrm, prm] where prm = do params <- bodyFieldPrm return $ BodyExt params
257
bodyExtMPart = choice [bodyExtLoc bodyFieldPrm, bodyExtLang bodyFieldPrm, bodyExtDsp bodyFieldPrm, prm] where prm = do params <- bodyFieldPrm return $ BodyExt params
257
bodyExtMPart = choice [bodyExtLoc bodyFieldPrm, bodyExtLang bodyFieldPrm, bodyExtDsp bodyFieldPrm, prm] where prm = do params <- bodyFieldPrm return $ BodyExt params
257
false
false
2
9
112
62
26
36
null
null
wxwxwwxxx/ghc
compiler/cmm/SMRep.hs
bsd-3-clause
hALF_WORD_SIZE_IN_BITS :: DynFlags -> Int hALF_WORD_SIZE_IN_BITS dflags = platformWordSize (targetPlatform dflags) `shiftL` 2
125
hALF_WORD_SIZE_IN_BITS :: DynFlags -> Int hALF_WORD_SIZE_IN_BITS dflags = platformWordSize (targetPlatform dflags) `shiftL` 2
125
hALF_WORD_SIZE_IN_BITS dflags = platformWordSize (targetPlatform dflags) `shiftL` 2
83
false
true
0
8
12
37
18
19
null
null
jsnajder/counts
src/Data/Counts.hs
bsd-3-clause
inc :: (Ord a) => a -> Counts a -> Counts a inc x cs = Counts { counts_ = M.insertWith (+) x 1 (counts_ cs), total = total cs + 1}
136
inc :: (Ord a) => a -> Counts a -> Counts a inc x cs = Counts { counts_ = M.insertWith (+) x 1 (counts_ cs), total = total cs + 1}
136
inc x cs = Counts { counts_ = M.insertWith (+) x 1 (counts_ cs), total = total cs + 1}
92
false
true
0
10
37
84
42
42
null
null
kolmodin/cabal
Cabal/tests/PackageTests/PackageTester.hs
bsd-3-clause
ghcProg :: SuiteConfig -> ConfiguredProgram ghcProg suite = getBootProgram suite ghcProgram
91
ghcProg :: SuiteConfig -> ConfiguredProgram ghcProg suite = getBootProgram suite ghcProgram
91
ghcProg suite = getBootProgram suite ghcProgram
47
false
true
0
5
10
23
11
12
null
null
AaronFriel/eff-experiments
src/Data/Iota/Tagged/OpenUnion51.hs
bsd-3-clause
decomp :: Union (t ': r) v -> Either (Union r v) (t v) decomp (Union0 v) = Right $ unsafeCoerce v
97
decomp :: Union (t ': r) v -> Either (Union r v) (t v) decomp (Union0 v) = Right $ unsafeCoerce v
97
decomp (Union0 v) = Right $ unsafeCoerce v
42
false
true
0
8
21
64
31
33
null
null
osa1/toylisp
src/Parser.hs
bsd-3-clause
symbol :: Parser Char symbol = oneOf "!$%&|*+-/:<=?>@^_~#"
58
symbol :: Parser Char symbol = oneOf "!$%&|*+-/:<=?>@^_~#"
58
symbol = oneOf "!$%&|*+-/:<=?>@^_~#"
36
false
true
0
5
7
17
8
9
null
null
ajnsit/luachunk
src/Scripting/Lua/Chunk/Reader.hs
gpl-3.0
local :: Header -> A.Parser Local local h = do s <- str h case s of Nothing -> error "Unnamed local variable encountered!" Just si -> do startpc <- intP $ sizeOfInt h endpc <- intP $ sizeOfInt h return $ Local si startpc endpc -- List of Upvals
275
local :: Header -> A.Parser Local local h = do s <- str h case s of Nothing -> error "Unnamed local variable encountered!" Just si -> do startpc <- intP $ sizeOfInt h endpc <- intP $ sizeOfInt h return $ Local si startpc endpc -- List of Upvals
275
local h = do s <- str h case s of Nothing -> error "Unnamed local variable encountered!" Just si -> do startpc <- intP $ sizeOfInt h endpc <- intP $ sizeOfInt h return $ Local si startpc endpc -- List of Upvals
241
false
true
0
14
80
101
45
56
null
null
alphalambda/codeworld
funblocks-client/src/Blocks/Types.hs
apache-2.0
typePicture = Picture
21
typePicture = Picture
21
typePicture = Picture
21
false
false
0
4
2
6
3
3
null
null
glhrmfrts/lusk
Lusk/Parser.hs
mit
getOpType "-" = Sub
19
getOpType "-" = Sub
19
getOpType "-" = Sub
19
false
false
1
5
3
13
4
9
null
null
nevrenato/Hets_Fork
Common/Keywords.hs
gpl-2.0
-- | two percent signs (for line comments) percents :: String percents = percentS ++ percentS
93
percents :: String percents = percentS ++ percentS
50
percents = percentS ++ percentS
31
true
true
0
5
15
16
9
7
null
null
krgn/leo
src/Web/Leo.hs
bsd-3-clause
query :: String -- ^ search term to translate -> Language -- ^ language to translate to (e.g. 'En', 'Es' ...) -> Int -- ^ maximum number of results to fetch -> IO [QueryResult] -- ^ returns a list of QueryResult query term l num = do result <- fetch term (l, De) ...
485
query :: String -- ^ search term to translate -> Language -- ^ language to translate to (e.g. 'En', 'Es' ...) -> Int -- ^ maximum number of results to fetch -> IO [QueryResult] query term l num = do result <- fetch term (l, De) num let categories = processRaw ...
449
query term l num = do result <- fetch term (l, De) num let categories = processRaw result return $ map toQueryResult categories -- take a query string, some options and fetches a response from the webservice
220
true
true
0
10
143
85
43
42
null
null
hsyl20/ViperVM
haskus-system/src/lib/Haskus/System/Linux/Sound/Pcm.hs
bsd-3-clause
-- | Any mask anyMask :: Mask anyMask = Mask (complement zeroBits)
66
anyMask :: Mask anyMask = Mask (complement zeroBits)
52
anyMask = Mask (complement zeroBits)
36
true
true
0
7
11
21
11
10
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/llvmGen/Llvm/PpLlvm.hs
bsd-3-clause
ppReturn :: Maybe LlvmVar -> SDoc ppReturn (Just var) = text "ret" <+> ppr var
78
ppReturn :: Maybe LlvmVar -> SDoc ppReturn (Just var) = text "ret" <+> ppr var
78
ppReturn (Just var) = text "ret" <+> ppr var
44
false
true
0
7
14
37
17
20
null
null
silky/csound-expression
src/Csound/Air/Wav.hs
bsd-3-clause
- Stereo -- | Reads stereo signal from the sound-file (wav or mp3 or aiff). readSnd :: String -> (Sig, Sig) readSnd fileName | isMp3 fileName = mp3in (text fileName) | otherwise = diskin2 (text fileName) 1
228
readSnd :: String -> (Sig, Sig) readSnd fileName | isMp3 fileName = mp3in (text fileName) | otherwise = diskin2 (text fileName) 1
150
readSnd fileName | isMp3 fileName = mp3in (text fileName) | otherwise = diskin2 (text fileName) 1
118
true
true
1
8
59
66
32
34
null
null
kajigor/uKanren_transformations
test/auto/Test/VarNormalization.hs
bsd-3-clause
y = V "y"
9
y = V "y"
9
y = V "y"
9
false
false
1
5
3
12
4
8
null
null
siddhanathan/ghc
compiler/hsSyn/HsTypes.hs
bsd-3-clause
ignoreParens ty = ty
36
ignoreParens ty = ty
36
ignoreParens ty = ty
36
false
false
0
5
19
9
4
5
null
null
pbl64k/HackerRank-Contests
2014-10-10-FP/SequenceFullOfColors/sfoc.accepted.hs
bsd-2-clause
tst = do cs <- getLine putStrLn $ show $ slv (0, 0, 0, 0) cs
68
tst = do cs <- getLine putStrLn $ show $ slv (0, 0, 0, 0) cs
68
tst = do cs <- getLine putStrLn $ show $ slv (0, 0, 0, 0) cs
68
false
false
1
10
23
45
21
24
null
null
Southern-Exposure-Seed-Exchange/Order-Manager-Prototypes
spock/src/App.hs
gpl-3.0
omApp :: OM a omApp = do subcomponent "categories" categoryHandlers subcomponent "products" productHandlers
115
omApp :: OM a omApp = do subcomponent "categories" categoryHandlers subcomponent "products" productHandlers
115
omApp = do subcomponent "categories" categoryHandlers subcomponent "products" productHandlers
101
false
true
1
8
20
34
13
21
null
null
bos/statistics
Statistics/Distribution/Transform.hs
bsd-2-clause
-- | Get fixed point of linear transformation linTransFixedPoint :: LinearTransform d -> Double linTransFixedPoint (LinearTransform loc sc _) = loc / (1 - sc)
158
linTransFixedPoint :: LinearTransform d -> Double linTransFixedPoint (LinearTransform loc sc _) = loc / (1 - sc)
112
linTransFixedPoint (LinearTransform loc sc _) = loc / (1 - sc)
62
true
true
0
7
24
43
22
21
null
null
olorin/amazonka
amazonka-iam/gen/Network/AWS/IAM/SimulatePrincipalPolicy.hs
mpl-2.0
-- | Use this only when paginating results to indicate the maximum number of -- items you want in the response. If there are additional items beyond the -- maximum you specify, the 'IsTruncated' response element is 'true'. -- -- This parameter is optional. If you do not include it, it defaults to -- 100. Note that IAM ...
721
sppMaxItems :: Lens' SimulatePrincipalPolicy (Maybe Natural) sppMaxItems = lens _sppMaxItems (\ s a -> s{_sppMaxItems = a}) . mapping _Nat
138
sppMaxItems = lens _sppMaxItems (\ s a -> s{_sppMaxItems = a}) . mapping _Nat
77
true
true
0
10
121
61
36
25
null
null
scslab/iterIO
Examples/httpsEcho.hs
bsd-3-clause
parmsI :: (Monad m) => HttpReq s -> Iter L m Parms parmsI req = foldForm req getPart [] where getPart parts mp = do front <- takeI 50 backLen <- countI return ((mp,front,backLen):parts)
200
parmsI :: (Monad m) => HttpReq s -> Iter L m Parms parmsI req = foldForm req getPart [] where getPart parts mp = do front <- takeI 50 backLen <- countI return ((mp,front,backLen):parts)
200
parmsI req = foldForm req getPart [] where getPart parts mp = do front <- takeI 50 backLen <- countI return ((mp,front,backLen):parts)
149
false
true
0
10
48
98
47
51
null
null
ygale/yesod
yesod-form/Yesod/Form/Bootstrap3.hs
mit
withLargeInput :: FieldSettings site -> FieldSettings site withLargeInput fs = fs { fsAttrs = newAttrs } where newAttrs = addClass "input-lg" (fsAttrs fs) -- | Add the @input-sm@ CSS class to a field. -- -- Since: yesod-form 1.3.8
236
withLargeInput :: FieldSettings site -> FieldSettings site withLargeInput fs = fs { fsAttrs = newAttrs } where newAttrs = addClass "input-lg" (fsAttrs fs) -- | Add the @input-sm@ CSS class to a field. -- -- Since: yesod-form 1.3.8
236
withLargeInput fs = fs { fsAttrs = newAttrs } where newAttrs = addClass "input-lg" (fsAttrs fs) -- | Add the @input-sm@ CSS class to a field. -- -- Since: yesod-form 1.3.8
177
false
true
0
7
43
54
28
26
null
null
GregorySchwartz/tree-fun
src/Math/TreeFun/Tree.hs
gpl-3.0
-- | Return the list of properties in a property map for a tree getProperties :: (Eq b) => PropertyMap a b -> [b] getProperties = nub . F.toList . F.foldl' (S.><) S.empty . M.elems
180
getProperties :: (Eq b) => PropertyMap a b -> [b] getProperties = nub . F.toList . F.foldl' (S.><) S.empty . M.elems
116
getProperties = nub . F.toList . F.foldl' (S.><) S.empty . M.elems
66
true
true
0
8
34
62
33
29
null
null
sdiehl/ghc
compiler/utils/Outputable.hs
bsd-3-clause
cat ds = SDoc $ \sty -> Pretty.cat [runSDoc d sty | d <- ds]
62
cat ds = SDoc $ \sty -> Pretty.cat [runSDoc d sty | d <- ds]
62
cat ds = SDoc $ \sty -> Pretty.cat [runSDoc d sty | d <- ds]
62
false
false
0
10
16
39
19
20
null
null
Mathnerd314/lamdu
bottlelib/Data/Cache.hs
gpl-3.0
lookupHelper :: Key k => (KeyBS -> r) -> (KeyBS -> ValEntry -> r) -> k -> Cache -> r lookupHelper onMiss onHit key cache = maybe (onMiss bsKey) (onHit bsKey) . Map.lookup bsKey $ cache ^. cEntries where bsKey = bsOfKey key
232
lookupHelper :: Key k => (KeyBS -> r) -> (KeyBS -> ValEntry -> r) -> k -> Cache -> r lookupHelper onMiss onHit key cache = maybe (onMiss bsKey) (onHit bsKey) . Map.lookup bsKey $ cache ^. cEntries where bsKey = bsOfKey key
232
lookupHelper onMiss onHit key cache = maybe (onMiss bsKey) (onHit bsKey) . Map.lookup bsKey $ cache ^. cEntries where bsKey = bsOfKey key
147
false
true
3
11
52
117
53
64
null
null
charles-cooper/postgresql-orm
examples.hs
gpl-3.0
bar :: Bar bar = Bar NullKey (Just 44) "hi" Nothing
51
bar :: Bar bar = Bar NullKey (Just 44) "hi" Nothing
51
bar = Bar NullKey (Just 44) "hi" Nothing
40
false
true
0
7
10
32
14
18
null
null
brendanhay/gogol
gogol-servicenetworking/gen/Network/Google/Resource/ServiceNetworking/Services/Roles/Add.hs
mpl-2.0
-- | JSONP sraCallback :: Lens' ServicesRolesAdd (Maybe Text) sraCallback = lens _sraCallback (\ s a -> s{_sraCallback = a})
126
sraCallback :: Lens' ServicesRolesAdd (Maybe Text) sraCallback = lens _sraCallback (\ s a -> s{_sraCallback = a})
115
sraCallback = lens _sraCallback (\ s a -> s{_sraCallback = a})
64
true
true
0
9
21
48
25
23
null
null
aisamanra/config-ini
src/Data/Ini/Config/Bidir.hs
bsd-3-clause
-- | If the field is not found in parsing, simply skip instead of -- raising an error or setting anything. optional :: FieldDescription t -> FieldDescription t optional fd = fd {fdSkipIfMissing = True}
203
optional :: FieldDescription t -> FieldDescription t optional fd = fd {fdSkipIfMissing = True}
94
optional fd = fd {fdSkipIfMissing = True}
41
true
true
0
6
36
34
18
16
null
null
danr/hipspec
src/HipSpec/Utils.hs
gpl-3.0
-- | Pretty show ppShow :: Show a => a -> String ppShow = Pretty.ppShow
71
ppShow :: Show a => a -> String ppShow = Pretty.ppShow
54
ppShow = Pretty.ppShow
22
true
true
0
6
14
25
13
12
null
null
creichert/persistent
persistent-sqlite/Database/Persist/Sqlite.hs
mit
escape :: DBName -> Text escape (DBName s) = T.concat [q, T.concatMap go s, q] where q = T.singleton '"' go '"' = "\"\"" go c = T.singleton c
159
escape :: DBName -> Text escape (DBName s) = T.concat [q, T.concatMap go s, q] where q = T.singleton '"' go '"' = "\"\"" go c = T.singleton c
159
escape (DBName s) = T.concat [q, T.concatMap go s, q] where q = T.singleton '"' go '"' = "\"\"" go c = T.singleton c
134
false
true
3
9
46
94
40
54
null
null
tamarin-prover/tamarin-prover
lib/theory/src/Theory/Model/Formula.hs
gpl-3.0
-- | Change the representation of atoms. mapAtoms :: (Integer -> ProtoAtom syn (VTerm c (BVar v)) -> ProtoAtom syn1 (VTerm c1 (BVar v1))) -> ProtoFormula syn s c v -> ProtoFormula syn1 s c1 v1 mapAtoms f = foldFormulaScope (\i a -> Ato $ f i a) TF Not Conn Qua
278
mapAtoms :: (Integer -> ProtoAtom syn (VTerm c (BVar v)) -> ProtoAtom syn1 (VTerm c1 (BVar v1))) -> ProtoFormula syn s c v -> ProtoFormula syn1 s c1 v1 mapAtoms f = foldFormulaScope (\i a -> Ato $ f i a) TF Not Conn Qua
237
mapAtoms f = foldFormulaScope (\i a -> Ato $ f i a) TF Not Conn Qua
67
true
true
0
13
69
120
59
61
null
null