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
tylerkahn/dcpu16-haskell
DCPU16/Assembler.hs
mit
brackets = P.brackets lexer
27
brackets = P.brackets lexer
27
brackets = P.brackets lexer
27
false
false
0
6
3
11
5
6
null
null
pparkkin/eta
compiler/ETA/BasicTypes/VarEnv.hs
bsd-3-clause
rnOccL_maybe, rnOccR_maybe :: RnEnv2 -> Var -> Maybe Var -- ^ Look up the renaming of an occurrence in the left or right term rnOccL_maybe (RV2 { envL = env }) v = lookupVarEnv env v
182
rnOccL_maybe, rnOccR_maybe :: RnEnv2 -> Var -> Maybe Var rnOccL_maybe (RV2 { envL = env }) v = lookupVarEnv env v
113
rnOccL_maybe (RV2 { envL = env }) v = lookupVarEnv env v
56
true
true
0
9
35
47
25
22
null
null
GaloisInc/halvm-ghc
compiler/hsSyn/HsDecls.hs
bsd-3-clause
-- | type or type instance declaration isSynDecl :: TyClDecl name -> Bool isSynDecl (SynDecl {}) = True
105
isSynDecl :: TyClDecl name -> Bool isSynDecl (SynDecl {}) = True
66
isSynDecl (SynDecl {}) = True
31
true
true
0
7
19
29
15
14
null
null
Changaco/haskell-plugins
testsuite/make/null/prog/Main.hs
lgpl-2.1
ain = do make "../Null.hs" ["-i../api"] m_v <- load "../Null.o" ["../api"] [] "resource" v <- case m_v of LoadSuccess _ v -> return v LoadFailure es -> mapM_ putStrLn es >> error "load failed" print $ a v
239
main = do make "../Null.hs" ["-i../api"] m_v <- load "../Null.o" ["../api"] [] "resource" v <- case m_v of LoadSuccess _ v -> return v LoadFailure es -> mapM_ putStrLn es >> error "load failed" print $ a v
239
main = do make "../Null.hs" ["-i../api"] m_v <- load "../Null.o" ["../api"] [] "resource" v <- case m_v of LoadSuccess _ v -> return v LoadFailure es -> mapM_ putStrLn es >> error "load failed" print $ a v
239
false
false
0
12
72
94
42
52
null
null
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/DataPipelinePipelinePipelineObject.hs
mit
dataPipelinePipelinePipelineObject :: [DataPipelinePipelineField] -- ^ 'dpppioFields' -> Val Text -- ^ 'dpppioId' -> Val Text -- ^ 'dpppioName' -> DataPipelinePipelinePipelineObject dataPipelinePipelinePipelineObject fieldsarg idarg namearg = DataPipelinePipelinePipelineObject { _dataPipelinePipelinePipelin...
453
dataPipelinePipelinePipelineObject :: [DataPipelinePipelineField] -- ^ 'dpppioFields' -> Val Text -- ^ 'dpppioId' -> Val Text -- ^ 'dpppioName' -> DataPipelinePipelinePipelineObject dataPipelinePipelinePipelineObject fieldsarg idarg namearg = DataPipelinePipelinePipelineObject { _dataPipelinePipelinePipelin...
453
dataPipelinePipelinePipelineObject fieldsarg idarg namearg = DataPipelinePipelinePipelineObject { _dataPipelinePipelinePipelineObjectFields = fieldsarg , _dataPipelinePipelinePipelineObjectId = idarg , _dataPipelinePipelinePipelineObjectName = namearg }
263
false
true
0
9
56
71
37
34
null
null
rudymatela/llcheck
src/Test/LeanCheck/Function/ListsOfPairs.hs
bsd-3-clause
exceptionPairs :: [[a]] -> [[b]] -> [[ [(a,b)] ]] exceptionPairs xss yss = concatMapT exceptionsFor (incompleteSetsOf xss) where --exceptionsFor :: [a] -> [[ [(a,b)] ]] exceptionsFor xs = zip xs `mapT` products (const yss `map` xs) -- incompleteSetsOf is needed, instead of setsOf, because mutating *all* values -- o...
907
exceptionPairs :: [[a]] -> [[b]] -> [[ [(a,b)] ]] exceptionPairs xss yss = concatMapT exceptionsFor (incompleteSetsOf xss) where --exceptionsFor :: [a] -> [[ [(a,b)] ]] exceptionsFor xs = zip xs `mapT` products (const yss `map` xs) -- incompleteSetsOf is needed, instead of setsOf, because mutating *all* values -- o...
907
exceptionPairs xss yss = concatMapT exceptionsFor (incompleteSetsOf xss) where --exceptionsFor :: [a] -> [[ [(a,b)] ]] exceptionsFor xs = zip xs `mapT` products (const yss `map` xs) -- incompleteSetsOf is needed, instead of setsOf, because mutating *all* values -- of a constant function makes no sense (we would hav...
857
false
true
0
10
159
111
67
44
null
null
urv/fixhs
src/Data/FIX/Spec/FIX42.hs
lgpl-2.1
tFutSettDate2 :: FIXTag tFutSettDate2 = FIXTag { tName = "FutSettDate2" , tnum = 193 , tparser = toFIXDateOnly , arbitraryValue = FIXDateOnly <$> arbitrary }
170
tFutSettDate2 :: FIXTag tFutSettDate2 = FIXTag { tName = "FutSettDate2" , tnum = 193 , tparser = toFIXDateOnly , arbitraryValue = FIXDateOnly <$> arbitrary }
170
tFutSettDate2 = FIXTag { tName = "FutSettDate2" , tnum = 193 , tparser = toFIXDateOnly , arbitraryValue = FIXDateOnly <$> arbitrary }
146
false
true
0
8
37
45
26
19
null
null
fmapfmapfmap/amazonka
amazonka-cloudfront/gen/Network/AWS/CloudFront/Types/Product.hs
mpl-2.0
-- | The number of active CloudFront key pairs for AwsAccountNumber. kpiQuantity :: Lens' KeyPairIds Int kpiQuantity = lens _kpiQuantity (\ s a -> s{_kpiQuantity = a})
167
kpiQuantity :: Lens' KeyPairIds Int kpiQuantity = lens _kpiQuantity (\ s a -> s{_kpiQuantity = a})
98
kpiQuantity = lens _kpiQuantity (\ s a -> s{_kpiQuantity = a})
62
true
true
0
9
26
40
22
18
null
null
tmcdonell/hfx
src/haskell/Mass.hs
bsd-3-clause
-- Isoleucine Ile getAAMassAvg 'L' = 113.1594
56
getAAMassAvg 'L' = 113.1594
28
getAAMassAvg 'L' = 113.1594
28
true
false
0
5
17
10
5
5
null
null
SamirTalwar/Smoke
src/app/Test/Smoke/App/Diff/GitDiff.hs
mit
name :: String name = "git"
27
name :: String name = "git"
27
name = "git"
12
false
true
0
4
5
11
6
5
null
null
gnn/Hets
OWL2/Profiles.hs
gpl-2.0
subClass :: ClassExpression -> Profiles subClass cex = case cex of Expression c -> if isThing c then elqlProfile else topProfile ObjectJunction jt cel -> minimalCovering (case jt of IntersectionOf -> elrlProfile UnionOf -> rlProfile) $ map subClass cel ObjectOneOf il -> bottomProfile { ...
980
subClass :: ClassExpression -> Profiles subClass cex = case cex of Expression c -> if isThing c then elqlProfile else topProfile ObjectJunction jt cel -> minimalCovering (case jt of IntersectionOf -> elrlProfile UnionOf -> rlProfile) $ map subClass cel ObjectOneOf il -> bottomProfile { ...
980
subClass cex = case cex of Expression c -> if isThing c then elqlProfile else topProfile ObjectJunction jt cel -> minimalCovering (case jt of IntersectionOf -> elrlProfile UnionOf -> rlProfile) $ map subClass cel ObjectOneOf il -> bottomProfile { el = el (andList individu...
940
false
true
5
11
298
264
133
131
null
null
eijian/picfinder
src/Finder.hs
bsd-3-clause
roundRobin t s x (y:ys) = isSame t s x y ++ roundRobin t s x ys
63
roundRobin t s x (y:ys) = isSame t s x y ++ roundRobin t s x ys
63
roundRobin t s x (y:ys) = isSame t s x y ++ roundRobin t s x ys
63
false
false
0
6
16
48
21
27
null
null
silky/react-haskell
src/React/Elements.hs
mit
classParent :: ClassCtx ctx => ClassConfig props state insig exsig ctx -> ReactNode insig -> props -> ReactNode exsig classParent = classParent' . createClass
206
classParent :: ClassCtx ctx => ClassConfig props state insig exsig ctx -> ReactNode insig -> props -> ReactNode exsig classParent = classParent' . createClass
206
classParent = classParent' . createClass
40
false
true
0
9
71
51
24
27
null
null
bamboo/idris-cil
src/IRTS/Cil/MaxStack.hs
bsd-3-clause
netStackChange _ Xor = -1
35
netStackChange _ Xor = -1
35
netStackChange _ Xor = -1
35
false
false
0
5
14
13
6
7
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 114513 = 5344
33
getValueFromProduct 114513 = 5344
33
getValueFromProduct 114513 = 5344
33
false
false
0
5
3
9
4
5
null
null
allanderek/ipclib
examples/PepaCheck.hs
gpl-2.0
processArgs (CliInfo _ _ infoString) = do putStrLn pepaCheckBanner putStrLn infoString
96
processArgs (CliInfo _ _ infoString) = do putStrLn pepaCheckBanner putStrLn infoString
96
processArgs (CliInfo _ _ infoString) = do putStrLn pepaCheckBanner putStrLn infoString
96
false
false
0
7
20
31
13
18
null
null
stoimenoff/functional-programming
examples/sorting.hs
mit
merge [] ys = ys
16
merge [] ys = ys
16
merge [] ys = ys
16
false
false
0
6
4
13
6
7
null
null
mstksg/tensor-ops
src/Data/Type/Length/Util.hs
bsd-3-clause
snocLengthReverse :: SnocLength as -> Length (Reverse as) snocLengthReverse = \case SnocZ -> LZ SnocS (s :: SnocLength bs) (p :: Proxy b) -> LS (snocLengthReverse s) \\ snocReverse (snocLengthLength s) p
238
snocLengthReverse :: SnocLength as -> Length (Reverse as) snocLengthReverse = \case SnocZ -> LZ SnocS (s :: SnocLength bs) (p :: Proxy b) -> LS (snocLengthReverse s) \\ snocReverse (snocLengthLength s) p
238
snocLengthReverse = \case SnocZ -> LZ SnocS (s :: SnocLength bs) (p :: Proxy b) -> LS (snocLengthReverse s) \\ snocReverse (snocLengthLength s) p
172
false
true
0
11
66
95
44
51
null
null
aopp-pred/fp-truncate
src/Truncate/Internal.hs
apache-2.0
validHex :: String -> Bool validHex = all (`elem` "0123456789abcdef")
69
validHex :: String -> Bool validHex = all (`elem` "0123456789abcdef")
69
validHex = all (`elem` "0123456789abcdef")
42
false
true
0
7
9
31
15
16
null
null
Undeterminant/taffybar
src/System/Taffybar/LayoutSwitcher.hs
bsd-3-clause
dispatchButtonEvent :: Gtk.EventM Gtk.EButton Bool dispatchButtonEvent = do btn <- Gtk.eventButton let trigger = onClick [Gtk.SingleClick] case btn of Gtk.LeftButton -> trigger $ switch 1 Gtk.RightButton -> trigger $ switch (-1) _ -> return False -- | Emit a new custom event of type _X...
462
dispatchButtonEvent :: Gtk.EventM Gtk.EButton Bool dispatchButtonEvent = do btn <- Gtk.eventButton let trigger = onClick [Gtk.SingleClick] case btn of Gtk.LeftButton -> trigger $ switch 1 Gtk.RightButton -> trigger $ switch (-1) _ -> return False -- | Emit a new custom event of type _X...
462
dispatchButtonEvent = do btn <- Gtk.eventButton let trigger = onClick [Gtk.SingleClick] case btn of Gtk.LeftButton -> trigger $ switch 1 Gtk.RightButton -> trigger $ switch (-1) _ -> return False -- | Emit a new custom event of type _XMONAD_CURRENT_LAYOUT, that can be -- intercepted by...
411
false
true
0
13
100
100
49
51
null
null
xkollar/handy-haskell
other/js-2014-10/main.hs
gpl-3.0
main' _ = putStrLn "Read source (sry)"
38
main' _ = putStrLn "Read source (sry)"
38
main' _ = putStrLn "Read source (sry)"
38
false
false
0
4
6
13
5
8
null
null
scan/yampa-sdl
src/FRP/Yampa/SDL/Event.hs
mit
quit :: SF Events (Event ()) quit = edge <<< arr (elem SDL.Quit)
64
quit :: SF Events (Event ()) quit = edge <<< arr (elem SDL.Quit)
64
quit = edge <<< arr (elem SDL.Quit)
35
false
true
0
9
12
39
19
20
null
null
sdiehl/pretty-latex
Text/Latex.hs
mit
oslash :: Doc -> Doc -> Doc oslash = operator "oslash"
54
oslash :: Doc -> Doc -> Doc oslash = operator "oslash"
54
oslash = operator "oslash"
26
false
true
0
6
10
22
11
11
null
null
samstokes/yesodoro-reboot
Handler/Plans.hs
bsd-2-clause
authedPlan :: PlanId -> Handler (Entity Plan) authedPlan planId = do userId <- requireAuthIdPreventingXsrf maybeAuthedPlan <- runDB $ selectFirst [PlanId ==. planId, PlanUser ==. userId] [] case maybeAuthedPlan of Just plan -> return plan Nothing -> notFound
272
authedPlan :: PlanId -> Handler (Entity Plan) authedPlan planId = do userId <- requireAuthIdPreventingXsrf maybeAuthedPlan <- runDB $ selectFirst [PlanId ==. planId, PlanUser ==. userId] [] case maybeAuthedPlan of Just plan -> return plan Nothing -> notFound
272
authedPlan planId = do userId <- requireAuthIdPreventingXsrf maybeAuthedPlan <- runDB $ selectFirst [PlanId ==. planId, PlanUser ==. userId] [] case maybeAuthedPlan of Just plan -> return plan Nothing -> notFound
226
false
true
0
11
50
91
43
48
null
null
eallik/clint-DAV
Network/Protocol/HTTP/DAV.hs
gpl-3.0
supportsLocking :: DAVContext -> Bool supportsLocking = liftA2 (&&) ("LOCK" `elem`) ("UNLOCK" `elem`) . _allowedMethods
119
supportsLocking :: DAVContext -> Bool supportsLocking = liftA2 (&&) ("LOCK" `elem`) ("UNLOCK" `elem`) . _allowedMethods
119
supportsLocking = liftA2 (&&) ("LOCK" `elem`) ("UNLOCK" `elem`) . _allowedMethods
81
false
true
0
7
14
40
25
15
null
null
CGenie/haskell-algorithms
src/Algorithms/Sampling/BridsonPoissonDisc.hs
gpl-2.0
findCandidatesInAnnulus b annulus@(Annulus2D {annulusCenter = p, radiusm = rm, radiusM = rM}) nc = do phiBase <- randomIO :: IO Double rBase <- randomIO :: IO Double let r = rm + (rM - rm)*rBase let phi = 2*pi*phiBase; remaining <- findCandidatesInAnnulus ...
434
findCandidatesInAnnulus b annulus@(Annulus2D {annulusCenter = p, radiusm = rm, radiusM = rM}) nc = do phiBase <- randomIO :: IO Double rBase <- randomIO :: IO Double let r = rm + (rM - rm)*rBase let phi = 2*pi*phiBase; remaining <- findCandidatesInAnnulus ...
434
findCandidatesInAnnulus b annulus@(Annulus2D {annulusCenter = p, radiusm = rm, radiusM = rM}) nc = do phiBase <- randomIO :: IO Double rBase <- randomIO :: IO Double let r = rm + (rM - rm)*rBase let phi = 2*pi*phiBase; remaining <- findCandidatesInAnnulus ...
434
false
false
0
14
152
175
90
85
null
null
andrewthad/keter
Keter/App.hs
mit
launchWebApp :: AppStartConfig -> AppId -> BundleConfig -> Maybe FilePath -> RotatingLog -> WebAppConfig Port -> (RunningWebApp -> IO a) -> IO a launchWebApp AppStartConfig {..} aid BundleConfig {..} mdir rlog WebAppConfig {..} f...
2,039
launchWebApp :: AppStartConfig -> AppId -> BundleConfig -> Maybe FilePath -> RotatingLog -> WebAppConfig Port -> (RunningWebApp -> IO a) -> IO a launchWebApp AppStartConfig {..} aid BundleConfig {..} mdir rlog WebAppConfig {..} f...
2,039
launchWebApp AppStartConfig {..} aid BundleConfig {..} mdir rlog WebAppConfig {..} f = do otherEnv <- pluginsGetEnv ascPlugins name bconfigPlugins forwardedEnv <- getForwardedEnv waconfigForwardEnv let httpPort = kconfigExternalHttpPort ascKeterConfig httpsPort = kconfigExternalHttpsPort ascKeterC...
1,803
false
true
0
17
707
483
243
240
null
null
bkoropoff/Idris-dev
src/Idris/Prover.hs
bsd-3-clause
lifte :: ElabState EState -> ElabD a -> Idris a lifte st e = do (v, _) <- elabStep st e return v
112
lifte :: ElabState EState -> ElabD a -> Idris a lifte st e = do (v, _) <- elabStep st e return v
112
lifte st e = do (v, _) <- elabStep st e return v
64
false
true
0
9
38
62
27
35
null
null
vincenthz/hs-foundation
foundation/Foundation/System/Entropy/Unix.hs
bsd-3-clause
entropyOpen :: IO EntropyCtx entropyOpen = do if supportSyscall then return EntropySyscall else do mh <- openDev "/dev/urandom" case mh of Nothing -> E.throwIO EntropySystemMissing Just h -> return $ EntropyCtx h -- | try to fill the ptr with...
411
entropyOpen :: IO EntropyCtx entropyOpen = do if supportSyscall then return EntropySyscall else do mh <- openDev "/dev/urandom" case mh of Nothing -> E.throwIO EntropySystemMissing Just h -> return $ EntropyCtx h -- | try to fill the ptr with...
411
entropyOpen = do if supportSyscall then return EntropySyscall else do mh <- openDev "/dev/urandom" case mh of Nothing -> E.throwIO EntropySystemMissing Just h -> return $ EntropyCtx h -- | try to fill the ptr with the amount of data required....
382
false
true
1
15
133
78
35
43
null
null
s9gf4ult/hdbi
Database/HDBI/SqlValue.hs
bsd-3-clause
-- | create row of one Integer element onei :: Integer -> [SqlValue] onei = one
79
onei :: Integer -> [SqlValue] onei = one
40
onei = one
10
true
true
0
6
15
19
11
8
null
null
haskell/haddock
haddock-library/src/Documentation/Haddock/Doc.hs
bsd-2-clause
docAppend (DocString s1) (DocAppend (DocString s2) d) = DocAppend (DocString (s1 ++ s2)) d
90
docAppend (DocString s1) (DocAppend (DocString s2) d) = DocAppend (DocString (s1 ++ s2)) d
90
docAppend (DocString s1) (DocAppend (DocString s2) d) = DocAppend (DocString (s1 ++ s2)) d
90
false
false
0
9
13
49
24
25
null
null
rwbarton/rw
Crawl/Move.hs
bsd-3-clause
answerYesNo :: T.Text -> Send () answerYesNo = singleton . AnswerYesNo
70
answerYesNo :: T.Text -> Send () answerYesNo = singleton . AnswerYesNo
70
answerYesNo = singleton . AnswerYesNo
37
false
true
0
7
10
26
13
13
null
null
ezyang/ghc
compiler/codeGen/StgCmmArgRep.hs
bsd-3-clause
slowCallPattern (P: P: P: P: _) = (fsLit "stg_ap_pppp", 4)
64
slowCallPattern (P: P: P: P: _) = (fsLit "stg_ap_pppp", 4)
64
slowCallPattern (P: P: P: P: _) = (fsLit "stg_ap_pppp", 4)
64
false
false
0
9
15
38
19
19
null
null
chengzh2008/hpffp
src/ch12-SignalingAdversity/smartConstructor.hs
bsd-3-clause
-- after learn applicative, this can be rewritten mkPerson''' :: Name -> Age -> ValidatePerson Person mkPerson''' name age = liftA2 Person (nameOkay name) (ageOkay age)
170
mkPerson''' :: Name -> Age -> ValidatePerson Person mkPerson''' name age = liftA2 Person (nameOkay name) (ageOkay age)
120
mkPerson''' name age = liftA2 Person (nameOkay name) (ageOkay age)
68
true
true
0
8
27
53
24
29
null
null
rvion/ride
jetpack/src/Network/Wai/Middleware/Static/AsWai.hs
bsd-3-clause
-- wai_only :: [(String, String)] -> Policy wai_only = I.only
61
wai_only = I.only
17
wai_only = I.only
17
true
false
0
5
9
9
5
4
null
null
hvr/vector
Data/Vector.hs
bsd-3-clause
force = G.force
15
force = G.force
15
force = G.force
15
false
false
1
6
2
12
4
8
null
null
MaximilianAlgehed/Haspec
Examples/simple_example.hs
bsd-3-clause
main = putStrLn $ R.renderHtml $ getDocumentation $ example
59
main = putStrLn $ R.renderHtml $ getDocumentation $ example
59
main = putStrLn $ R.renderHtml $ getDocumentation $ example
59
false
false
0
8
8
20
10
10
null
null
Enzo-Liu/cis194
src/Intro01.hs
bsd-3-clause
checksum :: Integer -> Integer checksum = sumDigits . doubleEveryOther . toRevDigits
84
checksum :: Integer -> Integer checksum = sumDigits . doubleEveryOther . toRevDigits
84
checksum = sumDigits . doubleEveryOther . toRevDigits
53
false
true
0
6
11
23
12
11
null
null
kylcarte/derivation
src/Data/Derivation/Inequality.hs
bsd-3-clause
decideMore :: Nat x -> Nat y -> Dec (NatIneq GT x y) decideMore = \case Z_ -> \_ -> Refuted "!(Z > y)" $ \case S_ x -> \case Z_ -> Proven $ GTZero $ S_ x S_ y -> case decideMore x y of Proven l -> Proven $ GTSucc l Refuted e k -> Refuted e $ \(GTSucc l) -> k l
290
decideMore :: Nat x -> Nat y -> Dec (NatIneq GT x y) decideMore = \case Z_ -> \_ -> Refuted "!(Z > y)" $ \case S_ x -> \case Z_ -> Proven $ GTZero $ S_ x S_ y -> case decideMore x y of Proven l -> Proven $ GTSucc l Refuted e k -> Refuted e $ \(GTSucc l) -> k l
290
decideMore = \case Z_ -> \_ -> Refuted "!(Z > y)" $ \case S_ x -> \case Z_ -> Proven $ GTZero $ S_ x S_ y -> case decideMore x y of Proven l -> Proven $ GTSucc l Refuted e k -> Refuted e $ \(GTSucc l) -> k l
237
false
true
2
15
94
156
72
84
null
null
michaxm/task-distribution
src/Control/Distributed/Task/TaskSpawning/TaskSpawning.hs
bsd-3-clause
processTasks :: TaskDef -> [DataDef] -> ResultDef -> IO TasksExecutionResult -- source code distribution behaves a bit different and only supports collectonmaster processTasks (SourceCodeModule moduleName moduleContent) dataDefs _ = processSourceCodeTasks moduleName moduleContent dataDefs
289
processTasks :: TaskDef -> [DataDef] -> ResultDef -> IO TasksExecutionResult processTasks (SourceCodeModule moduleName moduleContent) dataDefs _ = processSourceCodeTasks moduleName moduleContent dataDefs
203
processTasks (SourceCodeModule moduleName moduleContent) dataDefs _ = processSourceCodeTasks moduleName moduleContent dataDefs
126
true
true
0
8
32
52
26
26
null
null
LeifW/xmonad-extras
XMonad/Actions/Volume.hs
bsd-3-clause
playbackOrCapture :: Parser (Maybe (Double, Maybe Bool)) playbackOrCapture = do f <- (string "Playback " >> return Just) <|> (string "Capture " >> return (const Nothing)) many1 digit char ' ' es <- extras case filter ('%' `elem`) es of [volume] -> return . f . (,) (read (init volum...
529
playbackOrCapture :: Parser (Maybe (Double, Maybe Bool)) playbackOrCapture = do f <- (string "Playback " >> return Just) <|> (string "Capture " >> return (const Nothing)) many1 digit char ' ' es <- extras case filter ('%' `elem`) es of [volume] -> return . f . (,) (read (init volum...
529
playbackOrCapture = do f <- (string "Playback " >> return Just) <|> (string "Capture " >> return (const Nothing)) many1 digit char ' ' es <- extras case filter ('%' `elem`) es of [volume] -> return . f . (,) (read (init volume) :: Double) $ case ("off" `elem` es, "on" `elem` es) of...
472
false
true
0
16
160
209
107
102
null
null
scravy/simplex
src/Simplex/Specials.hs
gpl-3.0
randomString :: Int -> IO String randomString 0 = return ""
59
randomString :: Int -> IO String randomString 0 = return ""
59
randomString 0 = return ""
26
false
true
0
7
10
28
12
16
null
null
NickAger/LearningHaskell
HaskellProgrammingFromFirstPrinciples/Chapter18/ChapterExercises187/src/Main.hs
mit
append :: List a -> List a -> List a append Nil as' = as'
57
append :: List a -> List a -> List a append Nil as' = as'
57
append Nil as' = as'
20
false
true
0
7
14
33
15
18
null
null
dmjio/aeson
src/Data/Aeson/Types/FromJSON.hs
bsd-3-clause
withObject name _ v = prependContext name (typeMismatch "Object" v)
78
withObject name _ v = prependContext name (typeMismatch "Object" v)
78
withObject name _ v = prependContext name (typeMismatch "Object" v)
78
false
false
0
7
20
26
12
14
null
null
beni55/attoparsec
Data/Attoparsec/Text.hs
bsd-3-clause
signed p = (negate <$> (I.char '-' *> p)) <|> (I.char '+' *> p) <|> p
83
signed p = (negate <$> (I.char '-' *> p)) <|> (I.char '+' *> p) <|> p
83
signed p = (negate <$> (I.char '-' *> p)) <|> (I.char '+' *> p) <|> p
83
false
false
7
10
29
58
28
30
null
null
judah/tensorflow-haskell
tensorflow-mnist/tests/ParseTest.hs
apache-2.0
testGraphDefExec :: Test testGraphDefExec = testCase "testGraphDefExec" $ do let graphDef = asGraphDef $ render $ scalar (5 :: Float) * 10 runSession $ do addGraphDef graphDef x <- run $ tensorValueFromName "Mul_2" liftIO $ (50 :: Float) @=? unScalar x -- | Load MNIST from a GraphDef an...
380
testGraphDefExec :: Test testGraphDefExec = testCase "testGraphDefExec" $ do let graphDef = asGraphDef $ render $ scalar (5 :: Float) * 10 runSession $ do addGraphDef graphDef x <- run $ tensorValueFromName "Mul_2" liftIO $ (50 :: Float) @=? unScalar x -- | Load MNIST from a GraphDef an...
380
testGraphDefExec = testCase "testGraphDefExec" $ do let graphDef = asGraphDef $ render $ scalar (5 :: Float) * 10 runSession $ do addGraphDef graphDef x <- run $ tensorValueFromName "Mul_2" liftIO $ (50 :: Float) @=? unScalar x -- | Load MNIST from a GraphDef and the weights from a chec...
355
false
true
0
14
94
97
47
50
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/playpen/hcpn/src/NetAux.hs
unlicense
modArcPoints f (no@NetObject{object=(PT p t l ps)}) = no{object=(PT p t l $ f ps)}
85
modArcPoints f (no@NetObject{object=(PT p t l ps)}) = no{object=(PT p t l $ f ps)}
85
modArcPoints f (no@NetObject{object=(PT p t l ps)}) = no{object=(PT p t l $ f ps)}
85
false
false
0
12
17
63
33
30
null
null
beni55/yst
Yst/Render.hs
gpl-2.0
relPaths :: [String] -> [String] -> [String] relPaths [] ys = ys
64
relPaths :: [String] -> [String] -> [String] relPaths [] ys = ys
64
relPaths [] ys = ys
19
false
true
0
7
11
35
19
16
null
null
Concelo/concelo
src/Database/Concelo/Subscriber.hs
bsd-3-clause
receive = \case leaf@(Pr.Leaf { Pr.getLeafName = name }) -> receiveChunk leaf name T.empty group@(Pr.Group { Pr.getGroupName = name , Pr.getGroupMembers = members }) -> receiveChunk group name members tree@(Pr.Tree { Pr.getTreeName = name , Pr.getTreeACL = acl }) -> ...
725
receive = \case leaf@(Pr.Leaf { Pr.getLeafName = name }) -> receiveChunk leaf name T.empty group@(Pr.Group { Pr.getGroupName = name , Pr.getGroupMembers = members }) -> receiveChunk group name members tree@(Pr.Tree { Pr.getTreeName = name , Pr.getTreeACL = acl }) -> ...
725
receive = \case leaf@(Pr.Leaf { Pr.getLeafName = name }) -> receiveChunk leaf name T.empty group@(Pr.Group { Pr.getGroupName = name , Pr.getGroupMembers = members }) -> receiveChunk group name members tree@(Pr.Tree { Pr.getTreeName = name , Pr.getTreeACL = acl }) -> ...
725
false
false
0
13
194
231
120
111
null
null
jchitel/ProjectEuler.hs
Problems/Problem0013.hs
mit
getNumbers :: [Integer] getNumbers = [ 37107287533902102798797998220837590246510135740250, 46376937677490009712648124896970078050417018260538, 74324986199524741059474233309513058123726617309629, 91942213363574161572522430563301811072406154908250, 23067588207539346171171980310421047513778063246676, ...
5,639
getNumbers :: [Integer] getNumbers = [ 37107287533902102798797998220837590246510135740250, 46376937677490009712648124896970078050417018260538, 74324986199524741059474233309513058123726617309629, 91942213363574161572522430563301811072406154908250, 23067588207539346171171980310421047513778063246676, ...
5,639
getNumbers = [ 37107287533902102798797998220837590246510135740250, 46376937677490009712648124896970078050417018260538, 74324986199524741059474233309513058123726617309629, 91942213363574161572522430563301811072406154908250, 23067588207539346171171980310421047513778063246676, 892616706966236338201...
5,615
false
true
0
5
506
314
208
106
null
null
Spheniscida/cHaTTP
webapp/Chattp/Webapp/FastCGI.hs
mit
handleConfSaveRequest :: ChanInfo -> CGI CGIResult handleConfSaveRequest syncinfo = do usr_raw <- getInputFPS "user_name" chan_raw <- getInputFPS "channel_id" raw_settings <- getBodyFPS case (usr_raw,chan_raw) of (Just usr, Just chan) -> do seqn <- liftIO $ takeMVar (sequence...
1,723
handleConfSaveRequest :: ChanInfo -> CGI CGIResult handleConfSaveRequest syncinfo = do usr_raw <- getInputFPS "user_name" chan_raw <- getInputFPS "channel_id" raw_settings <- getBodyFPS case (usr_raw,chan_raw) of (Just usr, Just chan) -> do seqn <- liftIO $ takeMVar (sequence...
1,723
handleConfSaveRequest syncinfo = do usr_raw <- getInputFPS "user_name" chan_raw <- getInputFPS "channel_id" raw_settings <- getBodyFPS case (usr_raw,chan_raw) of (Just usr, Just chan) -> do seqn <- liftIO $ takeMVar (sequenceCounter syncinfo) liftIO $ putM...
1,672
false
true
0
21
667
363
173
190
null
null
a143753/AOJ
ALDS1_4_C.hs
apache-2.0
main = do _ <- getLine c <- getContents let i = Prelude.map words $ lines c o = ans empty i mapM_ putStrLn o -- Time Limit Exceeded
156
main = do _ <- getLine c <- getContents let i = Prelude.map words $ lines c o = ans empty i mapM_ putStrLn o -- Time Limit Exceeded
156
main = do _ <- getLine c <- getContents let i = Prelude.map words $ lines c o = ans empty i mapM_ putStrLn o -- Time Limit Exceeded
156
false
false
0
12
53
60
27
33
null
null
wz1000/haskell-lsp
lsp-test/src/Language/LSP/Test/Session.hs
mit
-- | The configuration used in 'Language.LSP.Test.runSession'. defaultConfig :: SessionConfig defaultConfig = SessionConfig 60 False False True Nothing False Nothing
165
defaultConfig :: SessionConfig defaultConfig = SessionConfig 60 False False True Nothing False Nothing
102
defaultConfig = SessionConfig 60 False False True Nothing False Nothing
71
true
true
0
5
19
27
14
13
null
null
henvic/plc
src/EntradaESaidaMonads.hs
cc0-1.0
-- Monad é uma classe especial bastante usada em toda a linguagem, para -- entrada e saída, coompreensão de listas, etc. -- -- Útil para simular estado em linguagens funcionais. IO, por exemplo, -- usado no Main deste projeto. Intuitivamente, para o I de IO, a função -- recebe String de entrada e produz resultado ma...
620
gC (e,s) = (head e, (tail e,s))
31
gC (e,s) = (head e, (tail e,s))
31
true
false
0
7
117
47
31
16
null
null
heathweiss/Tricad
src/Examples/ShoeLift/BlackRunnerHeel.hs
gpl-2.0
{----------------------------------------------------------------brace-------------------------------------------------------- -} braceV2TopOrigin = (Point{x_axis=0, y_axis=(0), z_axis=30})
190
braceV2TopOrigin = (Point{x_axis=0, y_axis=(0), z_axis=30})
59
braceV2TopOrigin = (Point{x_axis=0, y_axis=(0), z_axis=30})
59
true
false
0
8
7
33
21
12
null
null
airt/game-of-life
app/Main.hs
mit
options :: ParserInfo Args options = info (parser <**> helper) $ fullDesc <> header "Conway's Game of Life"
111
options :: ParserInfo Args options = info (parser <**> helper) $ fullDesc <> header "Conway's Game of Life"
111
options = info (parser <**> helper) $ fullDesc <> header "Conway's Game of Life"
84
false
true
0
9
21
35
17
18
null
null
slpopejoy/fadno-braids
src/Fadno/Braids/Internal.hs
bsd-2-clause
-- | Move "height" or strand count moveH :: Braid a i => Move a i -> i moveH (Move m1 m2) = max (strandCount m1) $ strandCount m2
129
moveH :: Braid a i => Move a i -> i moveH (Move m1 m2) = max (strandCount m1) $ strandCount m2
94
moveH (Move m1 m2) = max (strandCount m1) $ strandCount m2
58
true
true
0
8
28
57
27
30
null
null
HackerspaceBielefeld/Seneschall
Seneadm.hs
bsd-2-clause
main :: IO () main = do args <- getArgs case args of ("adduser":u:p:r) -> addUser u p r ("initdb":_) -> initDb _ -> printUsage
179
main :: IO () main = do args <- getArgs case args of ("adduser":u:p:r) -> addUser u p r ("initdb":_) -> initDb _ -> printUsage
179
main = do args <- getArgs case args of ("adduser":u:p:r) -> addUser u p r ("initdb":_) -> initDb _ -> printUsage
165
false
true
0
13
77
77
38
39
null
null
ben-schulz/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
-- | Get pretty printing options from the big options record. ppOption :: IOption -> PPOption ppOption opt = PPOption { ppopt_impl = opt_showimp opt , ppopt_pinames = False , ppopt_depth = opt_printdepth opt , ppopt_desugarnats = opt_desugarnats opt }
263
ppOption :: IOption -> PPOption ppOption opt = PPOption { ppopt_impl = opt_showimp opt , ppopt_pinames = False , ppopt_depth = opt_printdepth opt , ppopt_desugarnats = opt_desugarnats opt }
201
ppOption opt = PPOption { ppopt_impl = opt_showimp opt , ppopt_pinames = False , ppopt_depth = opt_printdepth opt , ppopt_desugarnats = opt_desugarnats opt }
169
true
true
0
8
51
60
31
29
null
null
ian-ross/ggp
players/Deliberation.hs
bsd-3-clause
bestMove :: State -> GGP () () bestMove st0 = do Match {..} <- get let as = legal matchDB st0 matchRole vs = map (value . doone st0) as doone s a = applyMoves matchDB s [(matchRole, a)] value st = if isTerminal matchDB st then goal matchDB st matchRole else maximu...
545
bestMove :: State -> GGP () () bestMove st0 = do Match {..} <- get let as = legal matchDB st0 matchRole vs = map (value . doone st0) as doone s a = applyMoves matchDB s [(matchRole, a)] value st = if isTerminal matchDB st then goal matchDB st matchRole else maximu...
545
bestMove st0 = do Match {..} <- get let as = legal matchDB st0 matchRole vs = map (value . doone st0) as doone s a = applyMoves matchDB s [(matchRole, a)] value st = if isTerminal matchDB st then goal matchDB st matchRole else maximum $ map (value . doone st) $ ...
514
false
true
0
16
182
221
107
114
null
null
haskell-distributed/distributed-process-platform
tests/TestLog.hs
bsd-3-clause
testLoggingProcess :: Process (ProcessId, TChan String) testLoggingProcess = do chan <- liftIO $ newTChanIO let cleanup = return () let format = return pid <- systemLog (writeLog chan) cleanup Debug format addFormatter pid logFormat sleep $ seconds 1 return (pid, chan) where writeLog chan = liftI...
352
testLoggingProcess :: Process (ProcessId, TChan String) testLoggingProcess = do chan <- liftIO $ newTChanIO let cleanup = return () let format = return pid <- systemLog (writeLog chan) cleanup Debug format addFormatter pid logFormat sleep $ seconds 1 return (pid, chan) where writeLog chan = liftI...
352
testLoggingProcess = do chan <- liftIO $ newTChanIO let cleanup = return () let format = return pid <- systemLog (writeLog chan) cleanup Debug format addFormatter pid logFormat sleep $ seconds 1 return (pid, chan) where writeLog chan = liftIO . atomically . writeTChan chan
296
false
true
0
11
73
131
60
71
null
null
singingwolfboy/citeproc-hs
src/Text/CSL/Eval/Common.hs
bsd-3-clause
getDateVar :: String -> State EvalState [RefDate] getDateVar = getVar [] getDateValue where getDateValue val | Just v <- fromValue val = v | otherwise = []
203
getDateVar :: String -> State EvalState [RefDate] getDateVar = getVar [] getDateValue where getDateValue val | Just v <- fromValue val = v | otherwise = []
203
getDateVar = getVar [] getDateValue where getDateValue val | Just v <- fromValue val = v | otherwise = []
153
false
true
1
9
74
76
33
43
null
null
573/leksah
src/IDE/Core/State.hs
gpl-2.0
catchIDE :: Exception e => IDEM a -> (e -> IO a) -> IDEM a catchIDE block handler = reifyIDE (\ideR -> catch (reflectIDE block ideR) handler)
141
catchIDE :: Exception e => IDEM a -> (e -> IO a) -> IDEM a catchIDE block handler = reifyIDE (\ideR -> catch (reflectIDE block ideR) handler)
141
catchIDE block handler = reifyIDE (\ideR -> catch (reflectIDE block ideR) handler)
82
false
true
0
11
26
75
35
40
null
null
nevrenato/Hets_Fork
CSL/SMTComparison.hs
gpl-2.0
smtLEStmt :: VarEnv -> String -> String -> String smtLEStmt m a b = smtGenericStmt m "=>" a b
93
smtLEStmt :: VarEnv -> String -> String -> String smtLEStmt m a b = smtGenericStmt m "=>" a b
93
smtLEStmt m a b = smtGenericStmt m "=>" a b
43
false
true
0
7
18
39
19
20
null
null
input-output-hk/rscoin-haskell
src/RSCoin/Mintette/Server.hs
gpl-3.0
handleNewPeriod :: C.WorkMode m => RuntimeEnv -> State -> C.WithSignature C.NewPeriodData -> ServerTE m () handleNewPeriod env st signed = toServer $ do bankPublicKey <- view C.bankPublicKey <$> C.getNodeContext unless (C.verifyWithSignature bankPublicKey signed) $ throwM MEInvalidBank...
886
handleNewPeriod :: C.WorkMode m => RuntimeEnv -> State -> C.WithSignature C.NewPeriodData -> ServerTE m () handleNewPeriod env st signed = toServer $ do bankPublicKey <- view C.bankPublicKey <$> C.getNodeContext unless (C.verifyWithSignature bankPublicKey signed) $ throwM MEInvalidBank...
886
handleNewPeriod env st signed = toServer $ do bankPublicKey <- view C.bankPublicKey <$> C.getNodeContext unless (C.verifyWithSignature bankPublicKey signed) $ throwM MEInvalidBankSignature let npd = C.wsValue signed prevMid <- query st GetPreviousMintetteId C.logInfo $ ...
771
false
true
0
13
293
219
101
118
null
null
andorp/bead
src/Bead/Controller/Pages.hs
bsd-3-clause
isNewUserScore (ViewModify (NewUserScore _ _ _)) = True
55
isNewUserScore (ViewModify (NewUserScore _ _ _)) = True
55
isNewUserScore (ViewModify (NewUserScore _ _ _)) = True
55
false
false
0
8
7
26
12
14
null
null
afcowie/metrics
src/ParseCommandParsec.hs
gpl-2.0
processInputP :: ByteString -> Either ParseError [Metric] processInputP x' = parse parseLines "" x'
99
processInputP :: ByteString -> Either ParseError [Metric] processInputP x' = parse parseLines "" x'
99
processInputP x' = parse parseLines "" x'
41
false
true
0
7
13
33
16
17
null
null
csrhodes/pandoc
src/Text/Pandoc/Readers/HTML.hs
gpl-2.0
pSpan :: TagParser Inlines pSpan = try $ do guardEnabled Ext_native_spans TagOpen _ attr <- lookAhead $ pSatisfy $ tagOpen (=="span") (const True) contents <- pInTags "span" inline let attr' = mkAttr attr return $ case attr' of ("",[],[("style",s)]) | filter (`notElem` " \t;"...
452
pSpan :: TagParser Inlines pSpan = try $ do guardEnabled Ext_native_spans TagOpen _ attr <- lookAhead $ pSatisfy $ tagOpen (=="span") (const True) contents <- pInTags "span" inline let attr' = mkAttr attr return $ case attr' of ("",[],[("style",s)]) | filter (`notElem` " \t;"...
452
pSpan = try $ do guardEnabled Ext_native_spans TagOpen _ attr <- lookAhead $ pSatisfy $ tagOpen (=="span") (const True) contents <- pInTags "span" inline let attr' = mkAttr attr return $ case attr' of ("",[],[("style",s)]) | filter (`notElem` " \t;") s == "font-variant:small-...
425
false
true
0
17
136
165
81
84
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxYES_DEFAULT :: Int wxYES_DEFAULT = 0
38
wxYES_DEFAULT :: Int wxYES_DEFAULT = 0
38
wxYES_DEFAULT = 0
17
false
true
0
4
5
11
6
5
null
null
UBMLtonGroup/timberc
src/Syntax2Core.hs
bsd-3-clause
mkWild vs (TVar v) | v `elem` vs = TWild
58
mkWild vs (TVar v) | v `elem` vs = TWild
58
mkWild vs (TVar v) | v `elem` vs = TWild
58
false
false
0
8
27
29
14
15
null
null
batebobo/fp1718
exam-solutions/midterm-haskell-solutions.hs
mit
bagUnion :: Eq a => [(a, Int)] -> [(a, Int)] -> [(a, Int)] bagUnion xs ys = reduce (xs ++ ys) where reduce [] = [] reduce (x:xs) |(fst x) `bagElem` xs && (snd x) <= snd (find x xs) = reduce xs |otherwise = x : reduce (remove x xs) find _ [] = error "wtf?" find t (z:zs...
454
bagUnion :: Eq a => [(a, Int)] -> [(a, Int)] -> [(a, Int)] bagUnion xs ys = reduce (xs ++ ys) where reduce [] = [] reduce (x:xs) |(fst x) `bagElem` xs && (snd x) <= snd (find x xs) = reduce xs |otherwise = x : reduce (remove x xs) find _ [] = error "wtf?" find t (z:zs...
454
bagUnion xs ys = reduce (xs ++ ys) where reduce [] = [] reduce (x:xs) |(fst x) `bagElem` xs && (snd x) <= snd (find x xs) = reduce xs |otherwise = x : reduce (remove x xs) find _ [] = error "wtf?" find t (z:zs) |(fst t) == (fst z) = z |otherwise ...
395
false
true
0
14
168
271
137
134
null
null
brendanhay/gogol
gogol-containeranalysis/gen/Network/Google/Resource/ContainerAnalysis/Projects/Occurrences/Get.hs
mpl-2.0
-- | OAuth access token. pogAccessToken :: Lens' ProjectsOccurrencesGet (Maybe Text) pogAccessToken = lens _pogAccessToken (\ s a -> s{_pogAccessToken = a})
164
pogAccessToken :: Lens' ProjectsOccurrencesGet (Maybe Text) pogAccessToken = lens _pogAccessToken (\ s a -> s{_pogAccessToken = a})
139
pogAccessToken = lens _pogAccessToken (\ s a -> s{_pogAccessToken = a})
79
true
true
1
9
29
52
25
27
null
null
dinkelk/redo
src/DatabaseEntry.hs
mit
-- Removal of an database entry: removeEntry :: Entry -> IO () removeEntry entry = safeRemoveDirectoryRecursive (entryToFilePath entry)
135
removeEntry :: Entry -> IO () removeEntry entry = safeRemoveDirectoryRecursive (entryToFilePath entry)
102
removeEntry entry = safeRemoveDirectoryRecursive (entryToFilePath entry)
72
true
true
0
7
17
33
16
17
null
null
cutsea110/aop
src/Rose.hs
bsd-3-clause
(<>) :: Forest a -> Forest a -> Forest a xs <> ys = paraf (g, c, h) xs where g t (fs, _) = node (t, fs) c = ys h (_, t') (_, fs') = cons (t', fs')
160
(<>) :: Forest a -> Forest a -> Forest a xs <> ys = paraf (g, c, h) xs where g t (fs, _) = node (t, fs) c = ys h (_, t') (_, fs') = cons (t', fs')
160
xs <> ys = paraf (g, c, h) xs where g t (fs, _) = node (t, fs) c = ys h (_, t') (_, fs') = cons (t', fs')
119
false
true
2
9
53
125
62
63
null
null
cabrera/elerea
FRP/Elerea/Clocked.hs
bsd-3-clause
-- | Auxiliary function. memoise :: IORef (Phase a) -> a -> IO a memoise ref x = writeIORef ref (Updated undefined x) >> return x
129
memoise :: IORef (Phase a) -> a -> IO a memoise ref x = writeIORef ref (Updated undefined x) >> return x
104
memoise ref x = writeIORef ref (Updated undefined x) >> return x
64
true
true
0
8
25
57
27
30
null
null
budgefeeney/ventureforth
chap4/bench/VForth/TextBench.hs
bsd-3-clause
shortTitle :: String shortTitle = "Greeting"
44
shortTitle :: String shortTitle = "Greeting"
44
shortTitle = "Greeting"
23
false
true
0
6
5
18
7
11
null
null
shnarazk/satter
learn-gi/Cairo.hs
gpl-3.0
drawInnerShadow = do save setOperator OperatorOver arc 0 0 (142/150) 0 (pi*2) clip withRadialPattern 0.3 0.3 0.1 0 0 0.95 $ \pattern -> do patternAddColorStopRGBA pattern 0 1 1 1 0 patternAddColorStopRGBA pattern 0.64 0.713 0.713 0.713 0.137 patternAddColorStopRGBA pattern 0.84 0.34...
516
drawInnerShadow = do save setOperator OperatorOver arc 0 0 (142/150) 0 (pi*2) clip withRadialPattern 0.3 0.3 0.1 0 0 0.95 $ \pattern -> do patternAddColorStopRGBA pattern 0 1 1 1 0 patternAddColorStopRGBA pattern 0.64 0.713 0.713 0.713 0.137 patternAddColorStopRGBA pattern 0.84 0.34...
516
drawInnerShadow = do save setOperator OperatorOver arc 0 0 (142/150) 0 (pi*2) clip withRadialPattern 0.3 0.3 0.1 0 0 0.95 $ \pattern -> do patternAddColorStopRGBA pattern 0 1 1 1 0 patternAddColorStopRGBA pattern 0.64 0.713 0.713 0.713 0.137 patternAddColorStopRGBA pattern 0.84 0.34...
516
false
false
0
13
138
183
82
101
null
null
cfredric/arithmoi
test-suite/Math/NumberTheory/Moduli/ClassTests.hs
mit
someModAddProperty :: Integer -> Positive Natural -> Integer -> Positive Natural -> Bool someModAddProperty x1 (Positive m1) x2 (Positive m2) = case x1 `modulo` m1 + x2 `modulo` m2 of SomeMod z -> getMod z == m3 && getVal z == x3 InfMod{} -> False where m3 = toInteger $ m1 `gcd` m2 x3 = (x1 + x2) `mod` m...
321
someModAddProperty :: Integer -> Positive Natural -> Integer -> Positive Natural -> Bool someModAddProperty x1 (Positive m1) x2 (Positive m2) = case x1 `modulo` m1 + x2 `modulo` m2 of SomeMod z -> getMod z == m3 && getVal z == x3 InfMod{} -> False where m3 = toInteger $ m1 `gcd` m2 x3 = (x1 + x2) `mod` m...
321
someModAddProperty x1 (Positive m1) x2 (Positive m2) = case x1 `modulo` m1 + x2 `modulo` m2 of SomeMod z -> getMod z == m3 && getVal z == x3 InfMod{} -> False where m3 = toInteger $ m1 `gcd` m2 x3 = (x1 + x2) `mod` m3
232
false
true
0
11
74
147
76
71
null
null
brendanhay/gogol
gogol-sqladmin/gen/Network/Google/Resource/SQL/Instances/ResetSSLConfig.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). irscUploadProtocol :: Lens' InstancesResetSSLConfig (Maybe Text) irscUploadProtocol = lens _irscUploadProtocol (\ s a -> s{_irscUploadProtocol = a})
218
irscUploadProtocol :: Lens' InstancesResetSSLConfig (Maybe Text) irscUploadProtocol = lens _irscUploadProtocol (\ s a -> s{_irscUploadProtocol = a})
156
irscUploadProtocol = lens _irscUploadProtocol (\ s a -> s{_irscUploadProtocol = a})
91
true
true
0
8
33
49
25
24
null
null
exbb2/BlastItWithPiss
src/Import.hs
gpl-3.0
fromRight :: Either a b -> b fromRight = either (error "fromRight failed") id
77
fromRight :: Either a b -> b fromRight = either (error "fromRight failed") id
77
fromRight = either (error "fromRight failed") id
48
false
true
0
7
13
31
15
16
null
null
gridaphobe/target
examples/Data/ByteString/Unsafe.hs
mit
assertS s False = error ("assertion failed at "++s)
51
assertS s False = error ("assertion failed at "++s)
51
assertS s False = error ("assertion failed at "++s)
51
false
false
0
7
8
22
10
12
null
null
ku-fpg/ecc-ldpc
src/ECC/Code/LDPC/GPU/CUDA/CachedMult.hs
bsd-3-clause
decoder :: CudaAllocations -> Q.QuasiCyclic Integer -> IO (Rate -> Int -> U.Vector Double -> IO (Maybe (U.Vector Bool))) decoder CudaAllocations{..} arr@(Q.QuasiCyclic sz _) = do (mLet0, offsets, nonzeroIndicesR, nonzeroIndicesC, nonzeroIndicesLen, rowCount, colCount) <- init'd let rowsPerBlock | rowCoun...
6,890
decoder :: CudaAllocations -> Q.QuasiCyclic Integer -> IO (Rate -> Int -> U.Vector Double -> IO (Maybe (U.Vector Bool))) decoder CudaAllocations{..} arr@(Q.QuasiCyclic sz _) = do (mLet0, offsets, nonzeroIndicesR, nonzeroIndicesC, nonzeroIndicesLen, rowCount, colCount) <- init'd let rowsPerBlock | rowCoun...
6,890
decoder CudaAllocations{..} arr@(Q.QuasiCyclic sz _) = do (mLet0, offsets, nonzeroIndicesR, nonzeroIndicesC, nonzeroIndicesLen, rowCount, colCount) <- init'd let rowsPerBlock | rowCount <= maxBlockSize = rowCount | otherwise = rowCount `div` 2 colsPerBlock | colCount <...
6,767
false
true
0
24
3,100
1,480
728
752
null
null
philipcraig/hutton
src/Exercises/ChapterSeven.hs
bsd-3-clause
encode :: String -> [Bit] encode = concatMap (make8 . int2bin . ord)
68
encode :: String -> [Bit] encode = concatMap (make8 . int2bin . ord)
68
encode = concatMap (make8 . int2bin . ord)
42
false
true
0
8
12
39
18
21
null
null
urbanslug/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
zipIdKey = mkPreludeMiscIdUnique 33
56
zipIdKey = mkPreludeMiscIdUnique 33
56
zipIdKey = mkPreludeMiscIdUnique 33
56
false
false
0
5
24
9
4
5
null
null
tkonolige/multigrid
bench/Poisson.hs
mit
bench_c_jacobi size vf ff rf = do withForeignPtr (toForeignPtr vf) (\vfp -> withForeignPtr (toForeignPtr ff) (\ffp -> withForeignPtr (toForeignPtr rf) (\rfp -> c_jacobi (fromIntegral $ size * size) vfp ffp rfp ))) return rf
263
bench_c_jacobi size vf ff rf = do withForeignPtr (toForeignPtr vf) (\vfp -> withForeignPtr (toForeignPtr ff) (\ffp -> withForeignPtr (toForeignPtr rf) (\rfp -> c_jacobi (fromIntegral $ size * size) vfp ffp rfp ))) return rf
263
bench_c_jacobi size vf ff rf = do withForeignPtr (toForeignPtr vf) (\vfp -> withForeignPtr (toForeignPtr ff) (\ffp -> withForeignPtr (toForeignPtr rf) (\rfp -> c_jacobi (fromIntegral $ size * size) vfp ffp rfp ))) return rf
263
false
false
0
19
73
101
50
51
null
null
MichaelBurge/haskell-authorize-net
src/Network/AuthorizeNet/Util.hs
bsd-3-clause
runParseSchemaType :: forall a. XmlParsable a => BSL.ByteString -> Either String a runParseSchemaType bsl = runParseSchemaTypeWithOptions defaultOptions bsl
156
runParseSchemaType :: forall a. XmlParsable a => BSL.ByteString -> Either String a runParseSchemaType bsl = runParseSchemaTypeWithOptions defaultOptions bsl
156
runParseSchemaType bsl = runParseSchemaTypeWithOptions defaultOptions bsl
73
false
true
0
9
17
46
21
25
null
null
bell-kelly/courseography
app/Css/Constants.hs
gpl-3.0
pastelPink :: Color pastelPink = parse "#FFD1DC"
48
pastelPink :: Color pastelPink = parse "#FFD1DC"
48
pastelPink = parse "#FFD1DC"
28
false
true
0
5
6
14
7
7
null
null
geophf/1HaskellADay
exercises/HAD/Y2018/M02/D05/Solution.hs
mit
-- ... as it 'automatically' timestamps a logentry for you as it puts it in -- the log. insertStampedEntryStmt :: Query insertStampedEntryStmt = [sql|INSERT INTO log (time,severity,app,module,message) VALUES (?,?,?,?,?)|]
225
insertStampedEntryStmt :: Query insertStampedEntryStmt = [sql|INSERT INTO log (time,severity,app,module,message) VALUES (?,?,?,?,?)|]
136
insertStampedEntryStmt = [sql|INSERT INTO log (time,severity,app,module,message) VALUES (?,?,?,?,?)|]
104
true
true
0
4
32
17
12
5
null
null
pdownen/sequent-core
src/Language/SequentCore/OccurAnal.hs
bsd-3-clause
mk_non_loop_breaker :: VarSet -> Node Details -> Binding -- See Note [Weak loop breakers] mk_non_loop_breaker used_in_rules (ND { nd_bind_pair = pair}, _, _) | bndr `elemVarSet` used_in_rules = pair `setPairBinder` setIdOccInfo bndr weakLoopBreaker | otherwise = pair where bndr = binderO...
330
mk_non_loop_breaker :: VarSet -> Node Details -> Binding mk_non_loop_breaker used_in_rules (ND { nd_bind_pair = pair}, _, _) | bndr `elemVarSet` used_in_rules = pair `setPairBinder` setIdOccInfo bndr weakLoopBreaker | otherwise = pair where bndr = binderOfPair pair
297
mk_non_loop_breaker used_in_rules (ND { nd_bind_pair = pair}, _, _) | bndr `elemVarSet` used_in_rules = pair `setPairBinder` setIdOccInfo bndr weakLoopBreaker | otherwise = pair where bndr = binderOfPair pair
240
true
true
2
9
73
95
47
48
null
null
peterokagey/haskellOEIS
src/Poset/A334111.hs
apache-2.0
a334111_rows :: [[Integer]] a334111_rows = zipWith takeUntil powersOfTwo a334111_rows' where a334111_rows' = partition' (fromIntegral . a064097) [1..] powersOfTwo = map (2^) [0..]
184
a334111_rows :: [[Integer]] a334111_rows = zipWith takeUntil powersOfTwo a334111_rows' where a334111_rows' = partition' (fromIntegral . a064097) [1..] powersOfTwo = map (2^) [0..]
184
a334111_rows = zipWith takeUntil powersOfTwo a334111_rows' where a334111_rows' = partition' (fromIntegral . a064097) [1..] powersOfTwo = map (2^) [0..]
156
false
true
0
9
26
63
35
28
null
null
Hi-Angel/yi
yi-core/src/Yi/Buffer/Misc.hs
gpl-2.0
deleteNAt dir n pos = do els <- R.take n <$> streamB Forward pos applyUpdate $ Delete pos dir els ------------------------------------------------------------------------ -- Line based editing -- | Return the current line number
235
deleteNAt dir n pos = do els <- R.take n <$> streamB Forward pos applyUpdate $ Delete pos dir els ------------------------------------------------------------------------ -- Line based editing -- | Return the current line number
235
deleteNAt dir n pos = do els <- R.take n <$> streamB Forward pos applyUpdate $ Delete pos dir els ------------------------------------------------------------------------ -- Line based editing -- | Return the current line number
235
false
false
0
10
38
51
24
27
null
null
olive/vacivity
src/Vacivity/Proc/BSPDungeon.hs
mit
needSplit (Node (_, _, w, h)) = let ratio :: Double = fromIntegral w / fromIntegral h in (w > 10 && h > 10) && (ratio > 2 || ratio < 0.5)
145
needSplit (Node (_, _, w, h)) = let ratio :: Double = fromIntegral w / fromIntegral h in (w > 10 && h > 10) && (ratio > 2 || ratio < 0.5)
145
needSplit (Node (_, _, w, h)) = let ratio :: Double = fromIntegral w / fromIntegral h in (w > 10 && h > 10) && (ratio > 2 || ratio < 0.5)
145
false
false
0
11
40
87
44
43
null
null
sdiehl/ghc
compiler/basicTypes/MkId.hs
bsd-3-clause
unwrapNewTypeBody :: TyCon -> [Type] -> CoreExpr -> CoreExpr unwrapNewTypeBody tycon args result_expr = ASSERT( isNewTyCon tycon ) mkCast result_expr (mkUnbranchedAxInstCo Representational (newTyConCo tycon) args [])
222
unwrapNewTypeBody :: TyCon -> [Type] -> CoreExpr -> CoreExpr unwrapNewTypeBody tycon args result_expr = ASSERT( isNewTyCon tycon ) mkCast result_expr (mkUnbranchedAxInstCo Representational (newTyConCo tycon) args [])
222
unwrapNewTypeBody tycon args result_expr = ASSERT( isNewTyCon tycon ) mkCast result_expr (mkUnbranchedAxInstCo Representational (newTyConCo tycon) args [])
161
false
true
0
9
31
70
34
36
null
null
AlexeyRaga/eta
compiler/ETA/TypeCheck/TcGenDeriv.hs
bsd-3-clause
gtAddr_RDR = varQual_RDR gHC_PRIM (fsLit "gtAddr#")
56
gtAddr_RDR = varQual_RDR gHC_PRIM (fsLit "gtAddr#")
56
gtAddr_RDR = varQual_RDR gHC_PRIM (fsLit "gtAddr#")
56
false
false
0
7
10
17
8
9
null
null
synsem/texhs
src/Text/TeX/Lexer/TokenParser/Basic.hs
gpl-3.0
-------------------- 'TeXChar' Parsers -- | Parse the provided character if it has the provided catcode. char :: Monad m => Char -> Catcode -> LexerT m Token char c i = charT c i <|> charC c i
193
char :: Monad m => Char -> Catcode -> LexerT m Token char c i = charT c i <|> charC c i
87
char c i = charT c i <|> charC c i
34
true
true
0
8
38
52
25
27
null
null
kranich/haste-compiler
src/Haste/AST/Optimize.hs
bsd-3-clause
getTailcallInfo _ = Nothing
58
getTailcallInfo _ = Nothing
58
getTailcallInfo _ = Nothing
58
false
false
0
4
34
10
4
6
null
null
funfunStudy/algorithm
haskell/src/main/haskell/birthdayChocolate/Main.hs
mit
main :: IO () main = do putStrLn $ show (solution [1, 2, 1, 3, 2] 3 2 0) putStrLn $ show (solution2 [1, 2, 1, 3, 2] 3 2 0) -- tailrec fun result(list: List<Int>, result: Int) : Int { -- if(list.size > itemCnt){ -- if(list.take(itemCnt).sum == result){ -- result(list.drop(itemCnt), result +1) -- } ...
420
main :: IO () main = do putStrLn $ show (solution [1, 2, 1, 3, 2] 3 2 0) putStrLn $ show (solution2 [1, 2, 1, 3, 2] 3 2 0) -- tailrec fun result(list: List<Int>, result: Int) : Int { -- if(list.size > itemCnt){ -- if(list.take(itemCnt).sum == result){ -- result(list.drop(itemCnt), result +1) -- } ...
420
main = do putStrLn $ show (solution [1, 2, 1, 3, 2] 3 2 0) putStrLn $ show (solution2 [1, 2, 1, 3, 2] 3 2 0) -- tailrec fun result(list: List<Int>, result: Int) : Int { -- if(list.size > itemCnt){ -- if(list.take(itemCnt).sum == result){ -- result(list.drop(itemCnt), result +1) -- } else { -- ...
406
false
true
0
12
111
107
60
47
null
null
aelve/guide
back/src/Guide/Database/Import.hs
bsd-3-clause
insertCategoryWhole :: "deleted" :! Bool -> Category -> ExceptT DatabaseError Transaction () insertCategoryWhole (arg #deleted -> deleted) category@Category{..} = do insertCategoryByRow category (#deleted deleted) insertItemsOfCategory category mapM_ insertTraitsOfItem categoryItems mapM_ insertTraitsOfIt...
391
insertCategoryWhole :: "deleted" :! Bool -> Category -> ExceptT DatabaseError Transaction () insertCategoryWhole (arg #deleted -> deleted) category@Category{..} = do insertCategoryByRow category (#deleted deleted) insertItemsOfCategory category mapM_ insertTraitsOfItem categoryItems mapM_ insertTraitsOfIt...
391
insertCategoryWhole (arg #deleted -> deleted) category@Category{..} = do insertCategoryByRow category (#deleted deleted) insertItemsOfCategory category mapM_ insertTraitsOfItem categoryItems mapM_ insertTraitsOfItem categoryItemsDeleted -- | Insert to postgres all items of Category.
292
false
true
5
7
55
82
44
38
null
null
brendanhay/gogol
gogol-testing/gen/Network/Google/Testing/Types/Product.hs
mpl-2.0
-- | Minimum API level required for the application to run. apkmMinSdkVersion :: Lens' APKManifest (Maybe Int32) apkmMinSdkVersion = lens _apkmMinSdkVersion (\ s a -> s{_apkmMinSdkVersion = a}) . mapping _Coerce
225
apkmMinSdkVersion :: Lens' APKManifest (Maybe Int32) apkmMinSdkVersion = lens _apkmMinSdkVersion (\ s a -> s{_apkmMinSdkVersion = a}) . mapping _Coerce
165
apkmMinSdkVersion = lens _apkmMinSdkVersion (\ s a -> s{_apkmMinSdkVersion = a}) . mapping _Coerce
112
true
true
1
8
44
57
28
29
null
null
jbearer/hspl
src/Control/Hspl/Internal/Unification.hs
mit
renameTerm (Product t1 t2) = renameBinaryTerm Product t1 t2
59
renameTerm (Product t1 t2) = renameBinaryTerm Product t1 t2
59
renameTerm (Product t1 t2) = renameBinaryTerm Product t1 t2
59
false
false
0
6
8
25
11
14
null
null