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
benweitzman/freer-persistent
src/Control/Monad/Freer/Sql/Internal.hs
bsd-3-clause
runDb :: forall r v . (Member SQL r) => Eff (Db ': r) v -> Eff r v runDb eff = handleRelay return (\action next -> next =<< sql (handleDb action)) eff where handleDb :: Db a -> ReaderT SqlBackend IO a handleDb (Insert record) = P.insert record handleDb (InsertMany records) = P.insertMany records...
712
runDb :: forall r v . (Member SQL r) => Eff (Db ': r) v -> Eff r v runDb eff = handleRelay return (\action next -> next =<< sql (handleDb action)) eff where handleDb :: Db a -> ReaderT SqlBackend IO a handleDb (Insert record) = P.insert record handleDb (InsertMany records) = P.insertMany records...
712
runDb eff = handleRelay return (\action next -> next =<< sql (handleDb action)) eff where handleDb :: Db a -> ReaderT SqlBackend IO a handleDb (Insert record) = P.insert record handleDb (InsertMany records) = P.insertMany records handleDb (InsertUnique record) = P.insertUnique record ...
645
false
true
0
11
168
280
132
148
null
null
jsnajder/fer3-catalogue
src/SimLists.hs
bsd-3-clause
outDir = dir </> "sim-lists-disagree/csv"
42
outDir = dir </> "sim-lists-disagree/csv"
42
outDir = dir </> "sim-lists-disagree/csv"
42
false
false
3
5
5
15
5
10
null
null
jgalat0/bot
src/Check.hs
gpl-3.0
isJSON (JsonObject _) = True
28
isJSON (JsonObject _) = True
28
isJSON (JsonObject _) = True
28
false
false
0
7
4
15
7
8
null
null
bezirg/hlogo
bench/hlogo/Flocking.hs
bsd-3-clause
average_heading_towards_flockmates fm = do x <- of_ (do t <- towards =<< myself return $ sin_ (t + 180)) fm y <- of_ (do t <- towards =<< myself return $ cos_ (t + 180)) fm let x_component = mean x let y_component = mean y if x_component == 0 && y_component ==...
379
average_heading_towards_flockmates fm = do x <- of_ (do t <- towards =<< myself return $ sin_ (t + 180)) fm y <- of_ (do t <- towards =<< myself return $ cos_ (t + 180)) fm let x_component = mean x let y_component = mean y if x_component == 0 && y_component ==...
379
average_heading_towards_flockmates fm = do x <- of_ (do t <- towards =<< myself return $ sin_ (t + 180)) fm y <- of_ (do t <- towards =<< myself return $ cos_ (t + 180)) fm let x_component = mean x let y_component = mean y if x_component == 0 && y_component ==...
379
false
false
0
15
121
151
70
81
null
null
silky/Tidal
Sound/Tidal/Stream.hs
gpl-3.0
defaultDatum :: Param -> Maybe Datum defaultDatum (S _ (Just x)) = Just $ string x
82
defaultDatum :: Param -> Maybe Datum defaultDatum (S _ (Just x)) = Just $ string x
82
defaultDatum (S _ (Just x)) = Just $ string x
45
false
true
0
9
15
42
20
22
null
null
d0kt0r0/estuary
client/src/Estuary/Resources.hs
gpl-3.0
deleteResource :: (LocMap Text,LocMap Text,LocMap Text) -> ResourceType -> Location -> (LocMap Text,LocMap Text,LocMap Text) deleteResource (aMap,iMap,vMap) Audio loc = (LocMap.delete loc aMap,iMap,vMap)
203
deleteResource :: (LocMap Text,LocMap Text,LocMap Text) -> ResourceType -> Location -> (LocMap Text,LocMap Text,LocMap Text) deleteResource (aMap,iMap,vMap) Audio loc = (LocMap.delete loc aMap,iMap,vMap)
203
deleteResource (aMap,iMap,vMap) Audio loc = (LocMap.delete loc aMap,iMap,vMap)
78
false
true
3
8
22
93
48
45
null
null
yaxu/hstexture
Texture/UI.hs
gpl-3.0
thickLine :: Bool -> Int -> Float -> Float -> Float -> Float -> Float -> (Surface -> Pixel -> IO ()) thickLine h n thickness x1 y1 x2 y2 = \s p -> do SDLP.filledPolygon s coords p SDLP.aaPolygon s coords p line s return () where x = x2 - x1 y = y2 - y1 l = sqr...
1,060
thickLine :: Bool -> Int -> Float -> Float -> Float -> Float -> Float -> (Surface -> Pixel -> IO ()) thickLine h n thickness x1 y1 x2 y2 = \s p -> do SDLP.filledPolygon s coords p SDLP.aaPolygon s coords p line s return () where x = x2 - x1 y = y2 - y1 l = sqr...
1,060
thickLine h n thickness x1 y1 x2 y2 = \s p -> do SDLP.filledPolygon s coords p SDLP.aaPolygon s coords p line s return () where x = x2 - x1 y = y2 - y1 l = sqrt $ x*x+y*y line s | h = do line' s return () | otherw...
959
false
true
4
16
463
505
258
247
null
null
gsnewmark/cis194
src/Cis194/Week6/Lecture.hs
apache-2.0
(&&!) :: Bool -> Bool -> Bool True &&! True = True
52
(&&!) :: Bool -> Bool -> Bool True &&! True = True
52
True &&! True = True
22
false
true
0
9
13
32
15
17
null
null
mightymoose/liquidhaskell
benchmarks/kmeans-0.1.2/Data/KMeans.hs
bsd-3-clause
part n [] = []
20
part n [] = []
20
part n [] = []
20
false
false
0
5
10
17
7
10
null
null
robeverest/accelerate
Data/Array/Accelerate/Type.hs
bsd-3-clause
floatingDict :: FloatingType a -> FloatingDict a floatingDict (TypeFloat dict) = dict
85
floatingDict :: FloatingType a -> FloatingDict a floatingDict (TypeFloat dict) = dict
85
floatingDict (TypeFloat dict) = dict
36
false
true
0
7
11
30
14
16
null
null
romanb/amazonka
amazonka-elb/gen/Network/AWS/ELB/ConfigureHealthCheck.hs
mpl-2.0
-- | The configuration information for the new health check. chcHealthCheck :: Lens' ConfigureHealthCheck HealthCheck chcHealthCheck = lens _chcHealthCheck (\s a -> s { _chcHealthCheck = a })
191
chcHealthCheck :: Lens' ConfigureHealthCheck HealthCheck chcHealthCheck = lens _chcHealthCheck (\s a -> s { _chcHealthCheck = a })
130
chcHealthCheck = lens _chcHealthCheck (\s a -> s { _chcHealthCheck = a })
73
true
true
0
9
27
40
22
18
null
null
brendanhay/gogol
gogol-tracing/gen/Network/Google/Resource/Tracing/Projects/Traces/BatchWrite.hs
mpl-2.0
-- | Pretty-print response. ptbwPp :: Lens' ProjectsTracesBatchWrite Bool ptbwPp = lens _ptbwPp (\ s a -> s{_ptbwPp = a})
121
ptbwPp :: Lens' ProjectsTracesBatchWrite Bool ptbwPp = lens _ptbwPp (\ s a -> s{_ptbwPp = a})
93
ptbwPp = lens _ptbwPp (\ s a -> s{_ptbwPp = a})
47
true
true
0
9
19
40
22
18
null
null
bermanjosh/keter
Keter/Main.hs
mit
runAndBlock :: NonEmptyVector a -> (a -> IO ()) -> IO () runAndBlock (NonEmptyVector x0 v) f = loop l0 [] where l0 = x0 : V.toList v loop (x:xs) asyncs = withAsync (f x) $ \async -> loop xs $ async : asyncs -- Once we have all of our asyncs, we wait for /any/ of them to exit. ...
426
runAndBlock :: NonEmptyVector a -> (a -> IO ()) -> IO () runAndBlock (NonEmptyVector x0 v) f = loop l0 [] where l0 = x0 : V.toList v loop (x:xs) asyncs = withAsync (f x) $ \async -> loop xs $ async : asyncs -- Once we have all of our asyncs, we wait for /any/ of them to exit. ...
426
runAndBlock (NonEmptyVector x0 v) f = loop l0 [] where l0 = x0 : V.toList v loop (x:xs) asyncs = withAsync (f x) $ \async -> loop xs $ async : asyncs -- Once we have all of our asyncs, we wait for /any/ of them to exit. If -- any listener thread exits, we kill the whole process. loop [] async...
345
false
true
7
11
129
161
71
90
null
null
unisonweb/platform
parser-typechecker/src/Unison/Runtime/Builtin.hs
mit
gtn = cmpopn LEQN Ty.intRef
27
gtn = cmpopn LEQN Ty.intRef
27
gtn = cmpopn LEQN Ty.intRef
27
false
false
1
6
4
16
6
10
null
null
mrlovre/super-memory
Pro2/src/Utility.hs
gpl-3.0
-- | Returns list of indices at diagonal of a d times d matrix. diagonalIndices :: Int -> [Int] diagonalIndices d = [0, d + 1 .. d * d]
135
diagonalIndices :: Int -> [Int] diagonalIndices d = [0, d + 1 .. d * d]
71
diagonalIndices d = [0, d + 1 .. d * d]
39
true
true
0
8
29
45
23
22
null
null
lukexi/ghc-7.8-arm64
compiler/cmm/CmmExpr.hs
bsd-3-clause
-- an address -- Careful though: what is stored at the stack slot may be bigger than -- an address cmmLitType :: DynFlags -> CmmLit -> CmmType cmmLitType _ (CmmInt _ width) = cmmBits width
199
cmmLitType :: DynFlags -> CmmLit -> CmmType cmmLitType _ (CmmInt _ width) = cmmBits width
99
cmmLitType _ (CmmInt _ width) = cmmBits width
55
true
true
0
7
45
38
20
18
null
null
NCrashed/PowerCom
src/powercom/Application/Layer.hs
gpl-3.0
printErrorMessage :: GuiApi -> (ProcessId, String, String) -> Process Bool printErrorMessage api (_, _, msg) = do liftIO $ printError api msg return True -- | Handler for incoming serial port options changes.
219
printErrorMessage :: GuiApi -> (ProcessId, String, String) -> Process Bool printErrorMessage api (_, _, msg) = do liftIO $ printError api msg return True -- | Handler for incoming serial port options changes.
219
printErrorMessage api (_, _, msg) = do liftIO $ printError api msg return True -- | Handler for incoming serial port options changes.
144
false
true
0
9
43
69
34
35
null
null
beni55/haste-compiler
libraries/ghc-7.8/base/GHC/Event/PSQ.hs
bsd-3-clause
Winner e@(E k p v) t m `unsafePlay` Winner e'@(E k' p' v') t' m' | p <= p' = Winner e (rloser k' p' v' t m t') m' | otherwise = Winner e' (lloser k p v t m t') m'
172
Winner e@(E k p v) t m `unsafePlay` Winner e'@(E k' p' v') t' m' | p <= p' = Winner e (rloser k' p' v' t m t') m' | otherwise = Winner e' (lloser k p v t m t') m'
172
Winner e@(E k p v) t m `unsafePlay` Winner e'@(E k' p' v') t' m' | p <= p' = Winner e (rloser k' p' v' t m t') m' | otherwise = Winner e' (lloser k p v t m t') m'
172
false
false
0
9
52
128
59
69
null
null
sapek/pandoc
src/Text/Pandoc/Readers/Org.hs
gpl-2.0
definitionList :: OrgParser (F Blocks) definitionList = try $ do n <- lookAhead (bulletListStart' Nothing) fmap B.definitionList . fmap compactify'DL . sequence <$> many1 (definitionListItem $ bulletListStart' (Just n))
273
definitionList :: OrgParser (F Blocks) definitionList = try $ do n <- lookAhead (bulletListStart' Nothing) fmap B.definitionList . fmap compactify'DL . sequence <$> many1 (definitionListItem $ bulletListStart' (Just n))
273
definitionList = try $ do n <- lookAhead (bulletListStart' Nothing) fmap B.definitionList . fmap compactify'DL . sequence <$> many1 (definitionListItem $ bulletListStart' (Just n))
234
false
true
0
14
82
82
38
44
null
null
alanz/hroq
src/Data/Concurrent/Queue/Roq/Mnesia.hs
bsd-3-clause
handleTableInfo :: State -> TableInfo -> Process (ProcessReply TableInfoRsp State) handleTableInfo s (TableInfo tableName req) = do logt $ "handleTableInfo starting" (s',res) <- do_table_info s tableName req logt $ "handleTableInfo done" reply res s'
266
handleTableInfo :: State -> TableInfo -> Process (ProcessReply TableInfoRsp State) handleTableInfo s (TableInfo tableName req) = do logt $ "handleTableInfo starting" (s',res) <- do_table_info s tableName req logt $ "handleTableInfo done" reply res s'
266
handleTableInfo s (TableInfo tableName req) = do logt $ "handleTableInfo starting" (s',res) <- do_table_info s tableName req logt $ "handleTableInfo done" reply res s'
183
false
true
0
9
49
85
40
45
null
null
rfranek/duckling
Duckling/Time/ES/Rules.hs
bsd-3-clause
ruleNoon :: Rule ruleNoon = Rule { name = "noon" , pattern = [ regex "mediod(\x00ed|i)a" ] , prod = \_ -> tt $ hour False 12 }
142
ruleNoon :: Rule ruleNoon = Rule { name = "noon" , pattern = [ regex "mediod(\x00ed|i)a" ] , prod = \_ -> tt $ hour False 12 }
142
ruleNoon = Rule { name = "noon" , pattern = [ regex "mediod(\x00ed|i)a" ] , prod = \_ -> tt $ hour False 12 }
125
false
true
0
10
43
55
30
25
null
null
qnikst/distributed-process-supervisor
src/Control/Distributed/Process/Supervisor/Types.hs
bsd-3-clause
isRunning _ = False
41
isRunning _ = False
41
isRunning _ = False
41
false
false
0
5
25
9
4
5
null
null
jtdaugherty/mix-assembler
src/MIX/Assembler.hs
bsd-3-clause
processIntermediate :: AssemblerState -> (Integer, Intermediate, S.MIXALStmt) -> Either AsmError (Integer, S.MIXWord, S.MIXALStmt) processIntermediate _ (pc, (Ready w), stmt) = return (pc, w, stmt)
237
processIntermediate :: AssemblerState -> (Integer, Intermediate, S.MIXALStmt) -> Either AsmError (Integer, S.MIXWord, S.MIXALStmt) processIntermediate _ (pc, (Ready w), stmt) = return (pc, w, stmt)
237
processIntermediate _ (pc, (Ready w), stmt) = return (pc, w, stmt)
66
false
true
0
9
63
80
45
35
null
null
DavidAlphaFox/bittorrent
src/Network/BitTorrent/Tracker/Message.hs
bsd-3-clause
eventId Started = 2
21
eventId Started = 2
21
eventId Started = 2
21
false
false
1
5
5
13
4
9
null
null
byorgey/new-active
src/Active.hs
bsd-3-clause
-------------------------------------------------- -- Stitching -- | "Stitching" sequential composition. -- -- @x ->- y@ is the active which behaves first as @x@, and then as -- @y@; the total duration is the sum of the durations of @x@ and -- @y@. The value of @x ->- y@ at the instant @x@ and @y@ overlap -- ...
2,775
(->-) :: Semigroup a => Active 'F a -> Active f a -> Active f a (Active d1@(Duration n1) f1) ->- (Active d2 f2) = Active (addDuration d1 d2) f where f n | n < n1 = f1 n | n == n1 = f1 n <> f2 0 | otherwise = f2 (n - n1) -- > seqMDia = illustrateActive' (1/4) [(2,OO)] $ getSum <$> seqMEx -- >...
606
(Active d1@(Duration n1) f1) ->- (Active d2 f2) = Active (addDuration d1 d2) f where f n | n < n1 = f1 n | n == n1 = f1 n <> f2 0 | otherwise = f2 (n - n1) -- > seqMDia = illustrateActive' (1/4) [(2,OO)] $ getSum <$> seqMEx -- > seqMMaxDia = illustrateActive' (1/4) [(1,CO),(2,OC)] $ getMax <...
542
true
true
6
9
592
213
127
86
null
null
corajr/cataskell
src/Cataskell/GameData/Actions.hs
bsd-3-clause
reject :: TradeOffer -> Maybe String -> PlayerIndex -> GameAction reject offer' maybeReason rejecter' = PlayerAction { _actor = rejecter' , _action = Trade (Reject { _offer = offer' , _rejecter = rejecter' , _reason = maybeReason }) }
318
reject :: TradeOffer -> Maybe String -> PlayerIndex -> GameAction reject offer' maybeReason rejecter' = PlayerAction { _actor = rejecter' , _action = Trade (Reject { _offer = offer' , _rejecter = rejecter' , _reason = maybeReason }) }
318
reject offer' maybeReason rejecter' = PlayerAction { _actor = rejecter' , _action = Trade (Reject { _offer = offer' , _rejecter = rejecter' , _reason = maybeReason }) }
252
false
true
0
11
122
81
43
38
null
null
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Core31/Tokens.hs
bsd-3-clause
gl_NUM_EXTENSIONS :: GLenum gl_NUM_EXTENSIONS = 0x821D
54
gl_NUM_EXTENSIONS :: GLenum gl_NUM_EXTENSIONS = 0x821D
54
gl_NUM_EXTENSIONS = 0x821D
26
false
true
0
4
5
11
6
5
null
null
spechub/Hets
OWL2/Rename.hs
gpl-2.0
newOid Nothing (Just id2) = Just id2
36
newOid Nothing (Just id2) = Just id2
36
newOid Nothing (Just id2) = Just id2
36
false
false
0
6
6
22
9
13
null
null
rimmington/eclogues
eclogues-impl/app/api/Eclogues/State/Monad.hs
bsd-3-clause
setJobStage :: (TS m) => Job.Name -> Job.Stage -> m () setJobStage name st = do job name . Job.stage .= st persist <>= Just (Persist.updateStage name st)
161
setJobStage :: (TS m) => Job.Name -> Job.Stage -> m () setJobStage name st = do job name . Job.stage .= st persist <>= Just (Persist.updateStage name st)
161
setJobStage name st = do job name . Job.stage .= st persist <>= Just (Persist.updateStage name st)
106
false
true
0
11
35
78
37
41
null
null
bogwonch/SecPAL
src/Logic/SecPAL/Parser.hs
gpl-3.0
pD :: forall s u (m :: * -> *). Stream s m Char => ParsecT s u m D pD = pZero <|> pInf <?> "delegation level"
109
pD :: forall s u (m :: * -> *). Stream s m Char => ParsecT s u m D pD = pZero <|> pInf <?> "delegation level"
109
pD = pZero <|> pInf <?> "delegation level"
42
false
true
0
9
27
62
31
31
null
null
geophf/1HaskellADay
exercises/HAD/Y2016/M09/D28/Exercise.hs
mit
{-- Looking at a graphical representation of the Merkle tree with a new node inserted we see several 'twigs,' that is to say nodes with only one leaf. In merkle-tree-a (the png in this directory or at https://github.com/geophf/1HaskellADay/blob/master/exercises/HAD/Y2016/M09/D28/merkle-tree-a.png We see four leaves...
1,508
addLeaf :: Leaf a -> MerkleTree a -> MerkleTree a addLeaf leaf branch = undefined
81
addLeaf leaf branch = undefined
31
true
true
0
8
259
39
17
22
null
null
joeyinbox/space-invaders-haskell
src/Dataset.hs
gpl-2.0
getBunkerPlain2Img (_,_,_,(_,_,_,_,_,_,_,(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,a,_,_),_)) = a
92
getBunkerPlain2Img (_,_,_,(_,_,_,_,_,_,_,(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,a,_,_),_)) = a
92
getBunkerPlain2Img (_,_,_,(_,_,_,_,_,_,_,(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,a,_,_),_)) = a
92
false
false
0
7
3
112
72
40
null
null
timjb/protocol-buffers
Text/ProtocolBuffers/WireMessage.hs
apache-2.0
toWireType 10 = 3
18
toWireType 10 = 3
18
toWireType 10 = 3
18
false
false
1
5
4
13
4
9
null
null
alexander-at-github/eta
compiler/ETA/Rename/RnBinds.hs
bsd-3-clause
ppr_sig_bndrs :: [Located RdrName] -> SDoc ppr_sig_bndrs bs = quotes (pprWithCommas ppr bs)
91
ppr_sig_bndrs :: [Located RdrName] -> SDoc ppr_sig_bndrs bs = quotes (pprWithCommas ppr bs)
91
ppr_sig_bndrs bs = quotes (pprWithCommas ppr bs)
48
false
true
0
7
12
35
17
18
null
null
Lainepress/hub
hub.hs
bsd-3-clause
main :: IO () main = putStrLn "watch this space"
48
main :: IO () main = putStrLn "watch this space"
48
main = putStrLn "watch this space"
34
false
true
0
6
9
19
9
10
null
null
upwawet/vision
src/Playback.hs
gpl-3.0
withPlayback :: WithRegistry => (WithPlayback => IO a) -> IO a withPlayback func = do Just (Env playback) <- getEnv (Extract :: Extract Ix Playback) let ?_Playback = playback func
185
withPlayback :: WithRegistry => (WithPlayback => IO a) -> IO a withPlayback func = do Just (Env playback) <- getEnv (Extract :: Extract Ix Playback) let ?_Playback = playback func
185
withPlayback func = do Just (Env playback) <- getEnv (Extract :: Extract Ix Playback) let ?_Playback = playback func
122
false
true
0
10
35
79
36
43
null
null
favilo/GoogleDirections
src/Google/Directions.hs
bsd-3-clause
showAvoidables as = '&':show' as where show' [a] = show a show' (a:as) = show a ++ showAvoidables as
122
showAvoidables as = '&':show' as where show' [a] = show a show' (a:as) = show a ++ showAvoidables as
122
showAvoidables as = '&':show' as where show' [a] = show a show' (a:as) = show a ++ showAvoidables as
122
false
false
0
9
40
57
27
30
null
null
RefactoringTools/HaRe
test/testdata/RmOneParameter/FunIn2a.hs
bsd-3-clause
inc x=x+1
9
inc x=x+1
9
inc x=x+1
9
false
false
3
5
1
20
6
14
null
null
prowdsponsor/country-codes
src/Data/CountryCodes/ISO31661.hs
bsd-3-clause
fromMName "Vatican City" = Just VA
34
fromMName "Vatican City" = Just VA
34
fromMName "Vatican City" = Just VA
34
false
false
0
5
5
12
5
7
null
null
mettekou/ghc
compiler/main/GhcMake.hs
bsd-3-clause
-- | Discard the contents of the InteractiveContext, but keep the DynFlags. -- It will also keep ic_int_print and ic_monad if their names are from -- external packages. discardIC :: HscEnv -> HscEnv discardIC hsc_env = hsc_env { hsc_IC = empty_ic { ic_int_print = new_ic_int_print , ic_...
829
discardIC :: HscEnv -> HscEnv discardIC hsc_env = hsc_env { hsc_IC = empty_ic { ic_int_print = new_ic_int_print , ic_monad = new_ic_monad } } where -- Force the new values for ic_int_print and ic_monad to avoid leaking old_ic !new_ic_int_print = keep_external_name ic_int_print ...
660
discardIC hsc_env = hsc_env { hsc_IC = empty_ic { ic_int_print = new_ic_int_print , ic_monad = new_ic_monad } } where -- Force the new values for ic_int_print and ic_monad to avoid leaking old_ic !new_ic_int_print = keep_external_name ic_int_print !new_ic_monad = keep_external_...
630
true
true
4
8
176
154
72
82
null
null
GaloisInc/saw-script
src/SAWScript/AutoMatch/Cryptol.hs
bsd-3-clause
-- | Find the name from the source if one exists sourceName :: Name -> Maybe String sourceName nm = Just (unpackIdent (nameIdent nm))
133
sourceName :: Name -> Maybe String sourceName nm = Just (unpackIdent (nameIdent nm))
84
sourceName nm = Just (unpackIdent (nameIdent nm))
49
true
true
0
9
23
41
19
22
null
null
dschalk/score3
Fm.hs
mit
computation :: Double -> String -> Double -> Double computation a b c | b == "+" = (+) a c | b == "-" = (-) a c | b == "*" = (*) a c | b == "/" = scoreDiv a c | b == "Concatenate" = cat a c | otherwise = 5000
313
computation :: Double -> String -> Double -> Double computation a b c | b == "+" = (+) a c | b == "-" = (-) a c | b == "*" = (*) a c | b == "/" = scoreDiv a c | b == "Concatenate" = cat a c | otherwise = 5000
313
computation a b c | b == "+" = (+) a c | b == "-" = (-) a c | b == "*" = (*) a c | b == "/" = scoreDiv a c | b == "Concatenate" = cat a c | otherwise = 5000
261
false
true
0
8
161
132
63
69
null
null
Tehnix/HsCMS
Core/Application.hs
bsd-2-clause
-- This function allocates resources (such as a database connection pool), -- performs initialization and creates a WAI application. This is also the -- place to put your migrate statements to have automatic database -- migrations handled by Yesod. makeApplication :: AppConfig DefaultEnv Extra -> IO (Application, LogFu...
1,019
makeApplication :: AppConfig DefaultEnv Extra -> IO (Application, LogFunc) makeApplication conf = do foundation <- makeFoundation conf -- Initialize the logging middleware logWare <- mkRequestLogger def { outputFormat = if development then Detailed True e...
770
makeApplication conf = do foundation <- makeFoundation conf -- Initialize the logging middleware logWare <- mkRequestLogger def { outputFormat = if development then Detailed True else Apache FromSocket , destination = RequestLogger.Logger $ logger...
695
true
true
0
13
225
150
76
74
null
null
asayers/attendancebot
src/AtnBot/Spreadsheet.hs
mit
fromDayVal :: A.Value -> Day fromDayVal = fromMaybe (error "processRow: couldn't parse day") . parseTime defaultTimeLocale "%Y-%m-%d" . T.unpack . T.takeWhile (/= '(') . fromStringVal
195
fromDayVal :: A.Value -> Day fromDayVal = fromMaybe (error "processRow: couldn't parse day") . parseTime defaultTimeLocale "%Y-%m-%d" . T.unpack . T.takeWhile (/= '(') . fromStringVal
195
fromDayVal = fromMaybe (error "processRow: couldn't parse day") . parseTime defaultTimeLocale "%Y-%m-%d" . T.unpack . T.takeWhile (/= '(') . fromStringVal
166
false
true
2
7
36
68
30
38
null
null
rvion/lamdu
Lamdu/Sugar/OrderTags.hs
gpl-3.0
orderHoleResult :: MonadA m => Order m (Sugar.HoleResult name m) orderHoleResult = Sugar.holeResultConverted %%~ orderExpr
122
orderHoleResult :: MonadA m => Order m (Sugar.HoleResult name m) orderHoleResult = Sugar.holeResultConverted %%~ orderExpr
122
orderHoleResult = Sugar.holeResultConverted %%~ orderExpr
57
false
true
0
9
14
39
19
20
null
null
MasseR/xmonadcontrib
XMonad/Hooks/DynamicLog.hs
bsd-3-clause
dynamicLogXinerama :: X () dynamicLogXinerama = withWindowSet $ io . putStrLn . pprWindowSetXinerama
100
dynamicLogXinerama :: X () dynamicLogXinerama = withWindowSet $ io . putStrLn . pprWindowSetXinerama
100
dynamicLogXinerama = withWindowSet $ io . putStrLn . pprWindowSetXinerama
73
false
true
0
7
12
28
14
14
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_SN_DEFAULT :: Int wxSTC_SN_DEFAULT = 0
44
wxSTC_SN_DEFAULT :: Int wxSTC_SN_DEFAULT = 0
44
wxSTC_SN_DEFAULT = 0
20
false
true
0
4
5
11
6
5
null
null
m3mitsuppe/haskell
exercises/Programming Haskell Book Exercises.hsproj/Ch_08_ex.hs
unlicense
-- Versuch: Pattern Matching bei einer als "where-clause" -- definierten Funktion. Funktioniert! recMult4 :: Integral a => a -> a -> a recMult4 x y = go x y where go 1 b = b go a b = b + go (a-1) b
212
recMult4 :: Integral a => a -> a -> a recMult4 x y = go x y where go 1 b = b go a b = b + go (a-1) b
114
recMult4 x y = go x y where go 1 b = b go a b = b + go (a-1) b
76
true
true
1
8
58
77
38
39
null
null
antalsz/hs-to-coq
examples/containers/extraction/SetProperties.hs
mit
forValidUnitTree :: Testable a => (Set Int -> a) -> Property forValidUnitTree f = forValid f
92
forValidUnitTree :: Testable a => (Set Int -> a) -> Property forValidUnitTree f = forValid f
92
forValidUnitTree f = forValid f
31
false
true
0
9
15
38
18
20
null
null
expipiplus1/vulkan
src/Vulkan/Extensions/VK_KHR_copy_commands2.hs
bsd-3-clause
-- No documentation found for TopLevel "vkCmdCopyBuffer2KHR" cmdCopyBuffer2KHR = cmdCopyBuffer2
95
cmdCopyBuffer2KHR = cmdCopyBuffer2
34
cmdCopyBuffer2KHR = cmdCopyBuffer2
34
true
false
0
4
9
7
4
3
null
null
OS2World/DEV-UTIL-HUGS
demos/GLUT/examples/RedBook/Tess.hs
bsd-3-clause
rectAndTri :: ComplexPolygon DontCare rectAndTri = ComplexPolygon [ rectangle, tri ]
84
rectAndTri :: ComplexPolygon DontCare rectAndTri = ComplexPolygon [ rectangle, tri ]
84
rectAndTri = ComplexPolygon [ rectangle, tri ]
46
false
true
0
6
10
28
13
15
null
null
ivan-m/keyless-entry
bench/KeylessBenchmark.hs
bsd-3-clause
mkSizedBenchGroup :: (NFData r) => String -> (forall c. (NFKeyless c) => SizedKeyless c -> r) -> Benchmark mkSizedBenchGroup title f = bgroup title $ fmap toBnch ks where toBnch (nm,k) = bench nm . appKS (nf f) $ k ks = [ ("Map.Lazy", KS szdKML) , ("sparse Map.Lazy", KS szdSKML)...
597
mkSizedBenchGroup :: (NFData r) => String -> (forall c. (NFKeyless c) => SizedKeyless c -> r) -> Benchmark mkSizedBenchGroup title f = bgroup title $ fmap toBnch ks where toBnch (nm,k) = bench nm . appKS (nf f) $ k ks = [ ("Map.Lazy", KS szdKML) , ("sparse Map.Lazy", KS szdSKML)...
597
mkSizedBenchGroup title f = bgroup title $ fmap toBnch ks where toBnch (nm,k) = bench nm . appKS (nf f) $ k ks = [ ("Map.Lazy", KS szdKML) , ("sparse Map.Lazy", KS szdSKML) , ("IntMap.Lazy", KS szdKIL) , ("sparse IntMap.Lazy", KS szdSKIL) , ("default Vector", KS szdKV) ...
469
false
true
1
12
186
208
112
96
null
null
tpsinnem/Idris-dev
src/Idris/Core/ProofTerm.hs
bsd-3-clause
rebuildTerm tm (AppL s p a) = App s (rebuildTerm tm p) a
56
rebuildTerm tm (AppL s p a) = App s (rebuildTerm tm p) a
56
rebuildTerm tm (AppL s p a) = App s (rebuildTerm tm p) a
56
false
false
0
7
12
36
17
19
null
null
SiestaMadokaist/writescheme
src/Ramadoka/Parser/LispVal.hs
bsd-3-clause
primitiveBindings :: IO Env primitiveBindings = nullEnv >>= (flip bindVars $ map makePrimitiveFunc primitives) where makePrimitiveFunc (var, func) = (var, PrimitiveFunc func)
180
primitiveBindings :: IO Env primitiveBindings = nullEnv >>= (flip bindVars $ map makePrimitiveFunc primitives) where makePrimitiveFunc (var, func) = (var, PrimitiveFunc func)
178
primitiveBindings = nullEnv >>= (flip bindVars $ map makePrimitiveFunc primitives) where makePrimitiveFunc (var, func) = (var, PrimitiveFunc func)
150
false
true
0
8
27
58
30
28
null
null
nvasilakis/pandoc
src/Text/Pandoc/Writers/Docx.hs
gpl-2.0
blockToOpenXML opts (Div (_,["references"],_) bs) = do let (hs, bs') = span isHeaderBlock bs header <- blocksToOpenXML opts hs -- We put the Bibliography style on paragraphs after the header rest <- withParaPropM (pStyleM "Bibliography") $ blocksToOpenXML opts bs' return (header ++ rest)
298
blockToOpenXML opts (Div (_,["references"],_) bs) = do let (hs, bs') = span isHeaderBlock bs header <- blocksToOpenXML opts hs -- We put the Bibliography style on paragraphs after the header rest <- withParaPropM (pStyleM "Bibliography") $ blocksToOpenXML opts bs' return (header ++ rest)
298
blockToOpenXML opts (Div (_,["references"],_) bs) = do let (hs, bs') = span isHeaderBlock bs header <- blocksToOpenXML opts hs -- We put the Bibliography style on paragraphs after the header rest <- withParaPropM (pStyleM "Bibliography") $ blocksToOpenXML opts bs' return (header ++ rest)
298
false
false
0
11
52
103
50
53
null
null
JPMoresmau/HJVM
test/Language/Java/JVM/APITest.hs
bsd-3-clause
testLongMethod :: Test testLongMethod=TestLabel "testLongMethod" (TestCase (do withJava' False "" (do jo<-newObject "java/lang/Integer" "(I)V" [JInt 25] l<-longMethod jo (Method "java/lang/Integer" "longValue" "()J") [] liftIO $ assertEqual "25" 25 l ...
349
testLongMethod :: Test testLongMethod=TestLabel "testLongMethod" (TestCase (do withJava' False "" (do jo<-newObject "java/lang/Integer" "(I)V" [JInt 25] l<-longMethod jo (Method "java/lang/Integer" "longValue" "()J") [] liftIO $ assertEqual "25" 25 l ...
344
testLongMethod=TestLabel "testLongMethod" (TestCase (do withJava' False "" (do jo<-newObject "java/lang/Integer" "(I)V" [JInt 25] l<-longMethod jo (Method "java/lang/Integer" "longValue" "()J") [] liftIO $ assertEqual "25" 25 l return ()) )...
321
false
true
0
18
116
106
49
57
null
null
bmsherman/cublas
Foreign/CUDA/Cublas/TH.hs
bsd-3-clause
convert :: [String] -> CTypeSpecifier a -> TypeC convert _ (CVoidType _) = VoidC
80
convert :: [String] -> CTypeSpecifier a -> TypeC convert _ (CVoidType _) = VoidC
80
convert _ (CVoidType _) = VoidC
31
false
true
0
7
13
36
18
18
null
null
mightymoose/liquidhaskell
src/Language/Haskell/Liquid/Parse.hs
bsd-3-clause
hboundP :: Parser LocSymbol hboundP = locParserP binderP
56
hboundP :: Parser LocSymbol hboundP = locParserP binderP
56
hboundP = locParserP binderP
28
false
true
0
5
7
17
8
9
null
null
bgamari/pandoc
src/Text/Pandoc/Writers/MediaWiki.hs
gpl-2.0
-- | Convert Pandoc block element to MediaWiki. blockToMediaWiki :: Block -- ^ Block element -> MediaWikiWriter String blockToMediaWiki Null = return ""
178
blockToMediaWiki :: Block -- ^ Block element -> MediaWikiWriter String blockToMediaWiki Null = return ""
129
blockToMediaWiki Null = return ""
33
true
true
0
7
48
30
14
16
null
null
iu-parfunc/containers
tests/map-properties.hs
bsd-3-clause
test_lookupLE :: Assertion test_lookupLE = do lookupLE 2 (fromList [(3,'a'), (5,'b')]) @?= Nothing lookupLE 4 (fromList [(3,'a'), (5,'b')]) @?= Just (3, 'a') lookupLE 5 (fromList [(3,'a'), (5,'b')]) @?= Just (5, 'b')
228
test_lookupLE :: Assertion test_lookupLE = do lookupLE 2 (fromList [(3,'a'), (5,'b')]) @?= Nothing lookupLE 4 (fromList [(3,'a'), (5,'b')]) @?= Just (3, 'a') lookupLE 5 (fromList [(3,'a'), (5,'b')]) @?= Just (5, 'b')
228
test_lookupLE = do lookupLE 2 (fromList [(3,'a'), (5,'b')]) @?= Nothing lookupLE 4 (fromList [(3,'a'), (5,'b')]) @?= Just (3, 'a') lookupLE 5 (fromList [(3,'a'), (5,'b')]) @?= Just (5, 'b')
201
false
true
0
13
42
144
77
67
null
null
sdiehl/llvm-codegen
src/LLVM/Codegen/Intrinsics.hs
mit
ceil = intrinsic f64 "llvm.ceil.f64" [f64]
43
ceil = intrinsic f64 "llvm.ceil.f64" [f64]
43
ceil = intrinsic f64 "llvm.ceil.f64" [f64]
43
false
false
0
6
6
16
8
8
null
null
devonhollowood/adventofcode
2015/day18/day18.hs
mit
isOn :: Light -> Bool isOn light = case light of On -> True Off -> False
82
isOn :: Light -> Bool isOn light = case light of On -> True Off -> False
82
isOn light = case light of On -> True Off -> False
60
false
true
2
5
26
37
17
20
null
null
abakst/liquidhaskell
src/Language/Haskell/Liquid/Parse.hs
bsd-3-clause
parseWithError :: Parser a -> SourceName -> String -> Either Error a --------------------------------------------------------------------------- parseWithError parser f s = case runParser (remainderP (whiteSpace >> parser)) 0 f s of Left e -> Left $ parseErrorError f e Right (r, "", _) -> Rig...
478
parseWithError :: Parser a -> SourceName -> String -> Either Error a parseWithError parser f s = case runParser (remainderP (whiteSpace >> parser)) 0 f s of Left e -> Left $ parseErrorError f e Right (r, "", _) -> Right r Right (_, rem, _) -> Left $ parseErrorError f $ remParseError f ...
402
parseWithError parser f s = case runParser (remainderP (whiteSpace >> parser)) 0 f s of Left e -> Left $ parseErrorError f e Right (r, "", _) -> Right r Right (_, rem, _) -> Left $ parseErrorError f $ remParseError f s rem --------------------------------------------------------------...
333
true
true
0
10
92
141
70
71
null
null
hachibu/project-euler
test/ProjectEuler/Problem002Spec.hs
mit
main :: IO () main = hspec spec
31
main :: IO () main = hspec spec
31
main = hspec spec
17
false
true
0
6
7
19
9
10
null
null
s9gf4ult/yesod
yesod-bin/AddHandler.hs
mit
fixRoutes :: String -> String -> String -> String -> String fixRoutes name pattern methods fileContents = fileContents ++ l where l = concat [ startingCharacter , pattern , " " , name , "R " , methods , "\n" ] startingCharacter = if "\n" `isS...
359
fixRoutes :: String -> String -> String -> String -> String fixRoutes name pattern methods fileContents = fileContents ++ l where l = concat [ startingCharacter , pattern , " " , name , "R " , methods , "\n" ] startingCharacter = if "\n" `isS...
359
fixRoutes name pattern methods fileContents = fileContents ++ l where l = concat [ startingCharacter , pattern , " " , name , "R " , methods , "\n" ] startingCharacter = if "\n" `isSuffixOf` fileContents then "" else "\n"
299
false
true
0
8
128
91
51
40
null
null
c19/Exercism-Haskell
all-your-base/src/Base.hs
mit
rebase :: Integral a => a -> a -> [a] -> Maybe [a] rebase inputBase outputBase inputDigits | inputBase < 2 || outputBase < 2 = Nothing | any (>=inputBase) inputDigits = Nothing | any (<0) inputDigits = Nothing
215
rebase :: Integral a => a -> a -> [a] -> Maybe [a] rebase inputBase outputBase inputDigits | inputBase < 2 || outputBase < 2 = Nothing | any (>=inputBase) inputDigits = Nothing | any (<0) inputDigits = Nothing
215
rebase inputBase outputBase inputDigits | inputBase < 2 || outputBase < 2 = Nothing | any (>=inputBase) inputDigits = Nothing | any (<0) inputDigits = Nothing
164
false
true
0
10
44
105
51
54
null
null
dzotokan/SourceGraph
Analyse/GraphRepr.hs
gpl-3.0
-- | Collapse items that must be kept together before clustering, etc. -- Also updates wantedRootNodes. collapseStructures :: HSData -> (HSData, Map Entity Entity) collapseStructures = collapseAndUpdate' collapseFuncs
219
collapseStructures :: HSData -> (HSData, Map Entity Entity) collapseStructures = collapseAndUpdate' collapseFuncs
113
collapseStructures = collapseAndUpdate' collapseFuncs
53
true
true
0
7
29
31
17
14
null
null
jcberentsen/haskell
tensorflow-opgen/src/TensorFlow/OpGen.hs
apache-2.0
dtTypeToHaskell DT_QINT32 = "Data.Int.Int32"
44
dtTypeToHaskell DT_QINT32 = "Data.Int.Int32"
44
dtTypeToHaskell DT_QINT32 = "Data.Int.Int32"
44
false
false
0
5
3
9
4
5
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/nativeGen/X86/Instr.hs
bsd-3-clause
x86_mkLoadInstr :: DynFlags -> Reg -- register to load -> Int -- current stack delta -> Int -- spill slot to use -> Instr x86_mkLoadInstr dflags reg delta slot = let off = spillSlotToOffset platform slot - delta in case targetClassOfReg platform reg of ...
732
x86_mkLoadInstr :: DynFlags -> Reg -- register to load -> Int -- current stack delta -> Int -- spill slot to use -> Instr x86_mkLoadInstr dflags reg delta slot = let off = spillSlotToOffset platform slot - delta in case targetClassOfReg platform reg of ...
731
x86_mkLoadInstr dflags reg delta slot = let off = spillSlotToOffset platform slot - delta in case targetClassOfReg platform reg of RcInteger -> MOV (archWordSize is32Bit) (OpAddr (spRel dflags off)) (OpReg reg) RcDouble -> GLD FF80 (spRel dfl...
574
false
true
1
14
254
195
94
101
null
null
sgillespie/lambda-calculus
src/Language/SystemF/TypeCheck.hs
mit
sub :: Eq n => n -> Ty n -> SystemFExpr n n -> SystemFExpr n n sub name ty (App e1 e2) = App (sub name ty e1) (sub name ty e2)
144
sub :: Eq n => n -> Ty n -> SystemFExpr n n -> SystemFExpr n n sub name ty (App e1 e2) = App (sub name ty e1) (sub name ty e2)
144
sub name ty (App e1 e2) = App (sub name ty e1) (sub name ty e2)
65
false
true
0
12
50
87
40
47
null
null
ku-fpg/device-check
example/Main.hs
bsd-3-clause
send :: a -> DutM (ExampleCmd a) () send d = putCmd0 $ mempty { send1 = Just d }
80
send :: a -> DutM (ExampleCmd a) () send d = putCmd0 $ mempty { send1 = Just d }
80
send d = putCmd0 $ mempty { send1 = Just d }
44
false
true
2
9
19
55
25
30
null
null
SimSaladin/ggtd
src/GGTD/CLI/Option.hs
bsd-3-clause
foldingOpts :: MonadIO m => [Option a] -> ([a] -> Action m) -> Action m foldingOpts (o:os) f = withOption o $ \r -> foldingOpts os (\rs -> f (r:rs))
148
foldingOpts :: MonadIO m => [Option a] -> ([a] -> Action m) -> Action m foldingOpts (o:os) f = withOption o $ \r -> foldingOpts os (\rs -> f (r:rs))
148
foldingOpts (o:os) f = withOption o $ \r -> foldingOpts os (\rs -> f (r:rs))
76
false
true
0
12
29
95
48
47
null
null
GaloisInc/gidl
src/Gidl/Types.hs
bsd-3-clause
sizeOf (PrimType (Newtype _ tr)) = sizeOf (PrimType tr)
55
sizeOf (PrimType (Newtype _ tr)) = sizeOf (PrimType tr)
55
sizeOf (PrimType (Newtype _ tr)) = sizeOf (PrimType tr)
55
false
false
0
9
8
32
15
17
null
null
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Ruby.hs
gpl-2.0
regex_x'28'5b'5e'5cs'5cw'5d'29 = compileRegex True "x([^\\s\\w])"
65
regex_x'28'5b'5e'5cs'5cw'5d'29 = compileRegex True "x([^\\s\\w])"
65
regex_x'28'5b'5e'5cs'5cw'5d'29 = compileRegex True "x([^\\s\\w])"
65
false
false
0
5
4
11
5
6
null
null
haskell/ghc-builder
common/Builder/Utils.hs
bsd-3-clause
lPad :: Int -> String -> String lPad n s = replicate (n - length s) ' ' ++ s
76
lPad :: Int -> String -> String lPad n s = replicate (n - length s) ' ' ++ s
76
lPad n s = replicate (n - length s) ' ' ++ s
44
false
true
0
9
19
50
22
28
null
null
cocreature/ioref-stable
src/Data/IORefStable.hs
mit
-- |Strict version of 'modifyIORefStable' modifyIORefStable' :: IORefStable a -> (a -> a) -> IO () modifyIORefStable' (IORefStable _ r) f = modifyIORef' r f
156
modifyIORefStable' :: IORefStable a -> (a -> a) -> IO () modifyIORefStable' (IORefStable _ r) f = modifyIORef' r f
114
modifyIORefStable' (IORefStable _ r) f = modifyIORef' r f
57
true
true
0
10
24
57
27
30
null
null
GaloisInc/halvm-ghc
compiler/basicTypes/Literal.hs
bsd-3-clause
litTag (MachStr _) = 2
30
litTag (MachStr _) = 2
30
litTag (MachStr _) = 2
30
false
false
0
6
12
16
7
9
null
null
alephcloud/hs-aws-lambda
src/Aws/Lambda/Types.hs
apache-2.0
_TextFunctionMode ∷ Prism' T.Text FunctionMode _TextFunctionMode = prism functionModeToText $ \case "event" → Right FunctionModeEvent txt → Left txt
158
_TextFunctionMode ∷ Prism' T.Text FunctionMode _TextFunctionMode = prism functionModeToText $ \case "event" → Right FunctionModeEvent txt → Left txt
158
_TextFunctionMode = prism functionModeToText $ \case "event" → Right FunctionModeEvent txt → Left txt
111
false
true
0
9
28
45
21
24
null
null
smurphy8/tach
apps/tach-manager-impulse/src/Main.hs
mit
getNewNodeR :: Handler Html getNewNodeR = do master <- getYesod liftIO $ putMVar (impulseManagerStatus master) 5 defaultLayout [whamlet|New Node?!?!|]
156
getNewNodeR :: Handler Html getNewNodeR = do master <- getYesod liftIO $ putMVar (impulseManagerStatus master) 5 defaultLayout [whamlet|New Node?!?!|]
156
getNewNodeR = do master <- getYesod liftIO $ putMVar (impulseManagerStatus master) 5 defaultLayout [whamlet|New Node?!?!|]
128
false
true
0
10
24
49
24
25
null
null
vikraman/ghc
compiler/coreSyn/CoreUtils.hs
bsd-3-clause
dupAppSize :: Int dupAppSize = 8
32
dupAppSize :: Int dupAppSize = 8
32
dupAppSize = 8
14
false
true
0
4
5
11
6
5
null
null
brendanhay/gogol
gogol-binaryauthorization/gen/Network/Google/BinaryAuthorization/Types/Product.hs
mpl-2.0
-- | Creates a value of 'TestIAMPermissionsRequest' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'tiprPermissions' testIAMPermissionsRequest :: TestIAMPermissionsRequest testIAMPermissionsRequest = TestIAMPermissionsRequest' {...
347
testIAMPermissionsRequest :: TestIAMPermissionsRequest testIAMPermissionsRequest = TestIAMPermissionsRequest' {_tiprPermissions = Nothing}
144
testIAMPermissionsRequest = TestIAMPermissionsRequest' {_tiprPermissions = Nothing}
85
true
true
0
6
48
24
16
8
null
null
gbwey/persistentold
persistent-mysql/Database/Persist/MySQL.hs
mit
-- Other parseType b = return $ SqlOther $ T.decodeUtf8 b
68
parseType b = return $ SqlOther $ T.decodeUtf8 b
59
parseType b = return $ SqlOther $ T.decodeUtf8 b
59
true
false
0
7
21
23
11
12
null
null
MauriceIsAG/HaskellScratch
.stack-work/intero/intero12379Coh.hs
bsd-3-clause
decode :: [List a] -> [a] decode s = foldr (++) [] (map f s) where f (Single x) = [x] f (Multiple n x) = replicate n x
129
decode :: [List a] -> [a] decode s = foldr (++) [] (map f s) where f (Single x) = [x] f (Multiple n x) = replicate n x
129
decode s = foldr (++) [] (map f s) where f (Single x) = [x] f (Multiple n x) = replicate n x
103
false
true
1
7
39
86
44
42
null
null
bcongdon/advent_of_code_2016
Day1-9/1.hs
mit
part1 steps = foldr (++) [] $ scanl move [(0, 0, 0)] steps
63
part1 steps = foldr (++) [] $ scanl move [(0, 0, 0)] steps
63
part1 steps = foldr (++) [] $ scanl move [(0, 0, 0)] steps
63
false
false
0
8
17
41
22
19
null
null
mstksg/hledger
hledger-lib/Hledger/Read/Common.hs
gpl-3.0
-- getTransactionCount :: MonadState Journal m => m Integer -- getTransactionCount = fmap jparsetransactioncount get -- -- setTransactionCount :: MonadState Journal m => Integer -> m () -- setTransactionCount i = modify' (\j -> j{jparsetransactioncount=i}) -- -- -- | Increment the transaction index by one and return t...
649
journalAddFile :: (FilePath,Text) -> Journal -> Journal journalAddFile f j@Journal{jfiles=fs} = j{jfiles=fs++[f]}
113
journalAddFile f j@Journal{jfiles=fs} = j{jfiles=fs++[f]}
57
true
true
0
9
90
68
43
25
null
null
Jakehp/PLC
haskell/hw3.hs
mit
less :: (Int, [Int]) -> [Int] less (x, []) = []
47
less :: (Int, [Int]) -> [Int] less (x, []) = []
47
less (x, []) = []
17
false
true
0
7
10
44
24
20
null
null
cdepillabout/HLearn
src/HLearn/Data/SpaceTree/CoverTree_Specialized.hs
bsd-3-clause
insertCTNoSort :: forall exprat childC leafC dp. ( ValidCT exprat childC leafC dp ) => dp -> CoverTree_ exprat childC leafC dp -> CoverTree_ exprat childC leafC dp insertCTNoSort dp ct = {-# SCC insertCTNoSort #-} insertCTNoSort_ dp ct $ distance dp (nodedp ct)
281
insertCTNoSort :: forall exprat childC leafC dp. ( ValidCT exprat childC leafC dp ) => dp -> CoverTree_ exprat childC leafC dp -> CoverTree_ exprat childC leafC dp insertCTNoSort dp ct = {-# SCC insertCTNoSort #-} insertCTNoSort_ dp ct $ distance dp (nodedp ct)
281
insertCTNoSort dp ct = {-# SCC insertCTNoSort #-} insertCTNoSort_ dp ct $ distance dp (nodedp ct)
97
false
true
0
9
63
86
44
42
null
null
avieth/postgresql-simple
src/Database/PostgreSQL/Simple/TypeInfo/Static.hs
bsd-3-clause
void :: TypeInfo void = Basic { typoid = Oid 2278, typcategory = 'P', typdelim = ',', typname = "void" }
135
void :: TypeInfo void = Basic { typoid = Oid 2278, typcategory = 'P', typdelim = ',', typname = "void" }
135
void = Basic { typoid = Oid 2278, typcategory = 'P', typdelim = ',', typname = "void" }
118
false
true
0
7
51
40
24
16
null
null
ocean0yohsuke/deepcontrol
DeepControl/Applicative.hs
bsd-3-clause
(---**) :: (Applicative f1, Applicative f2, Applicative f3, Applicative f4, Applicative f5) => f1 (f2 (f3 a)) -> f1 (f2 (f3 (f4 (f5 a)))) (---**) = ((.**)|$>>>)
160
(---**) :: (Applicative f1, Applicative f2, Applicative f3, Applicative f4, Applicative f5) => f1 (f2 (f3 a)) -> f1 (f2 (f3 (f4 (f5 a)))) (---**) = ((.**)|$>>>)
160
(---**) = ((.**)|$>>>)
22
false
true
0
15
26
100
54
46
null
null
johnjcamilleri/maltese-functional-morphology
lib/Options.hs
lgpl-3.0
fullformflag :: [Flag] -> Bool fullformflag xs = case [p | p@(Print "lex") <- xs] of [_] -> True _ -> False {-|Data type for the Command line arguments. -}
174
fullformflag :: [Flag] -> Bool fullformflag xs = case [p | p@(Print "lex") <- xs] of [_] -> True _ -> False {-|Data type for the Command line arguments. -}
174
fullformflag xs = case [p | p@(Print "lex") <- xs] of [_] -> True _ -> False {-|Data type for the Command line arguments. -}
143
false
true
0
11
48
67
34
33
null
null
exercism/xhaskell
exercises/practice/complex-numbers/.meta/examples/success-standard/src/ComplexNumbers.hs
mit
-- binary operators ------------------------------------------------------------ mul :: Num a => Complex a -> Complex a -> Complex a mul (Complex a b) (Complex c d) = Complex (a*c - b*d) (a*d + b*c)
198
mul :: Num a => Complex a -> Complex a -> Complex a mul (Complex a b) (Complex c d) = Complex (a*c - b*d) (a*d + b*c)
117
mul (Complex a b) (Complex c d) = Complex (a*c - b*d) (a*d + b*c)
65
true
true
0
11
31
96
46
50
null
null
mrakgr/futhark
src/futhark-pyopencl.hs
bsd-3-clause
compilerPipeline :: Pipeline SOACS ExplicitMemory compilerPipeline = standardPipeline >>> onePass extractKernels >>> passes [ simplifyKernels , babysitKernels , simplifyKernels , performCSE True , simplifyKernels , inPlaceLowering ] >>> onePass explicitAlloc...
592
compilerPipeline :: Pipeline SOACS ExplicitMemory compilerPipeline = standardPipeline >>> onePass extractKernels >>> passes [ simplifyKernels , babysitKernels , simplifyKernels , performCSE True , simplifyKernels , inPlaceLowering ] >>> onePass explicitAlloc...
592
compilerPipeline = standardPipeline >>> onePass extractKernels >>> passes [ simplifyKernels , babysitKernels , simplifyKernels , performCSE True , simplifyKernels , inPlaceLowering ] >>> onePass explicitAllocations >>> passes [ simplifyExplicitMemory ...
542
false
true
0
10
185
92
50
42
null
null
2dor/99-problems-Haskell
31-41-arithmetic/problem-34.hs
bsd-2-clause
eulerTotient :: Int -> Int eulerTotient n | n <= 0 = error "The argument must be positive.\n" | otherwise = length [x | x <- [0..n], (coprime x n)]
155
eulerTotient :: Int -> Int eulerTotient n | n <= 0 = error "The argument must be positive.\n" | otherwise = length [x | x <- [0..n], (coprime x n)]
155
eulerTotient n | n <= 0 = error "The argument must be positive.\n" | otherwise = length [x | x <- [0..n], (coprime x n)]
128
false
true
0
10
37
71
34
37
null
null
nevrenato/Hets_Fork
Common/Utils.hs
gpl-2.0
-- | trims a string only on the left side trimLeft :: String -> String trimLeft = dropWhile isSpace
99
trimLeft :: String -> String trimLeft = dropWhile isSpace
57
trimLeft = dropWhile isSpace
28
true
true
0
5
18
19
10
9
null
null
gridaphobe/target
examples/XMonad/Properties.hs
mit
prop_mapLayoutId (x::T) = x == mapLayout id x
45
prop_mapLayoutId (x::T) = x == mapLayout id x
45
prop_mapLayoutId (x::T) = x == mapLayout id x
45
false
false
0
7
7
25
12
13
null
null
edom/sound
src/Sound/Tempo.hs
bsd-3-clause
{- | The beat must be a monotonically nondecreasing sequence. Transform logical time (beats) into physical time (seconds). Use 'Rational' for exact calculation. The first argument is the second-per-beat signal. The rate of this signal is the number of ticks (subdivisions of the beat). The bigger this signal goes, th...
877
applytempo :: RL (Spb Rational) -> L (Beat Rational) -> L (Second Rational) applytempo spb = -- applytempo :: (Fractional a, Ord a) => RL (Spb a) -> L (Beat a) -> L (Second a) loop 0 (unrated $ rltempos spb) where r = _unRate $ rateOf spb loop tick ss@(MkL sh st) bs@(MkL bh bt) = ...
528
applytempo spb = -- applytempo :: (Fractional a, Ord a) => RL (Spb a) -> L (Beat a) -> L (Second a) loop 0 (unrated $ rltempos spb) where r = _unRate $ rateOf spb loop tick ss@(MkL sh st) bs@(MkL bh bt) = let b = fromIntegral (tick :: Int) / fromIntegral r ...
452
true
true
0
13
266
181
90
91
null
null
HJvT/GeBoP
Halma.hs
bsd-3-clause
romgrate :: (Int, Int) -> (Int, Int) fromgrate (i, j) = (-10 + (i + j) `div` 2, -8 + j)
88
fromgrate :: (Int, Int) -> (Int, Int) fromgrate (i, j) = (-10 + (i + j) `div` 2, -8 + j)
88
fromgrate (i, j) = (-10 + (i + j) `div` 2, -8 + j)
50
false
true
0
9
21
72
40
32
null
null
khalilfazal/IANA
src/Data/IANAQ.hs
gpl-2.0
-- Type parser pType :: Parsec String () Type pType = choice [string "language" $> Language, string "extlang" $> ExtendedLang, string "script" $> Script, try (string "region" $> Region), string "variant" $> Variant, string "grandfathered" $> Grandfathered, str...
353
pType :: Parsec String () Type pType = choice [string "language" $> Language, string "extlang" $> ExtendedLang, string "script" $> Script, try (string "region" $> Region), string "variant" $> Variant, string "grandfathered" $> Grandfathered, string "redundant"...
338
pType = choice [string "language" $> Language, string "extlang" $> ExtendedLang, string "script" $> Script, try (string "region" $> Region), string "variant" $> Variant, string "grandfathered" $> Grandfathered, string "redundant" $> Redundant]
307
true
true
0
10
104
106
51
55
null
null
lifengsun/haskell-exercise
scheme/03/evaluator2.hs
gpl-3.0
parseAtom :: Parser LispVal parseAtom = do first <- letter <|> symbol rest <- many (letter <|> symbol <|> digit) let atom = first : rest return $ case atom of "#t" -> Bool True "#f" -> Bool False _ -> Atom atom
234
parseAtom :: Parser LispVal parseAtom = do first <- letter <|> symbol rest <- many (letter <|> symbol <|> digit) let atom = first : rest return $ case atom of "#t" -> Bool True "#f" -> Bool False _ -> Atom atom
234
parseAtom = do first <- letter <|> symbol rest <- many (letter <|> symbol <|> digit) let atom = first : rest return $ case atom of "#t" -> Bool True "#f" -> Bool False _ -> Atom atom
206
false
true
0
11
66
97
45
52
null
null
Alexander-Ignatyev/astro
src/Data/Astro/Planet/PlanetDetails.hs
bsd-3-clause
j2010PlanetDetails Jupiter = PlanetDetails Jupiter j2010 11.857911 337.917132 14.6633 0.048907 5.20278 1.3035 100.595 (arcsecs 196.74)
143
j2010PlanetDetails Jupiter = PlanetDetails Jupiter j2010 11.857911 337.917132 14.6633 0.048907 5.20278 1.3035 100.595 (arcsecs 196.74)
143
j2010PlanetDetails Jupiter = PlanetDetails Jupiter j2010 11.857911 337.917132 14.6633 0.048907 5.20278 1.3035 100.595 (arcsecs 196.74)
143
false
false
0
7
23
37
17
20
null
null