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
sapek/optparse-applicative
tests/Tests.hs
bsd-3-clause
case_ambiguous :: Assertion case_ambiguous = do let p = flag' (1 :: Int) (long "foo") <|> flag' 2 (long "bar") <|> flag' 3 (long "baz") i = info p idm result = execParserPure (prefs disambiguate) i ["--ba"] case result of Success val -> assertFailure $ "unexpected result " ++ show ...
342
case_ambiguous :: Assertion case_ambiguous = do let p = flag' (1 :: Int) (long "foo") <|> flag' 2 (long "bar") <|> flag' 3 (long "baz") i = info p idm result = execParserPure (prefs disambiguate) i ["--ba"] case result of Success val -> assertFailure $ "unexpected result " ++ show ...
342
case_ambiguous = do let p = flag' (1 :: Int) (long "foo") <|> flag' 2 (long "bar") <|> flag' 3 (long "baz") i = info p idm result = execParserPure (prefs disambiguate) i ["--ba"] case result of Success val -> assertFailure $ "unexpected result " ++ show val _ -> return ()
314
false
true
0
15
96
143
67
76
null
null
laurencer/confluence-sync
vendor/haxr/Network/XmlRpc/Pretty.hs
bsd-3-clause
maybe f (Just x) = f x
22
maybe f (Just x) = f x
22
maybe f (Just x) = f x
22
false
false
0
7
6
20
9
11
null
null
vkomenda/CoALP
lib/CoALP/Tree.hs
lgpl-3.0
branching :: Oper a -> Bool branching (Right (Just _)) = True
61
branching :: Oper a -> Bool branching (Right (Just _)) = True
61
branching (Right (Just _)) = True
33
false
true
0
8
11
37
17
20
null
null
rodrigogribeiro/mptc
test/Data/Full/PreludeList.hs
bsd-3-clause
take :: Int -> [a] -> [a] take n _ | n <= 0 = []
48
take :: Int -> [a] -> [a] take n _ | n <= 0 = []
48
take n _ | n <= 0 = []
22
false
true
0
8
15
42
21
21
null
null
batterseapower/chsc
Evaluator/Syntax.hs
bsd-3-clause
heapBindingSize _ = 0
55
heapBindingSize _ = 0
55
heapBindingSize _ = 0
55
false
false
0
5
37
9
4
5
null
null
bgold-cosmos/Tidal
src/Sound/Tidal/Params.hs
gpl-3.0
kcutoffbus :: Pattern Int -> Pattern Double -> ControlPattern kcutoffbus busid pat = (pF "kcutoff" pat) # (pI "^kcutoff" busid)
127
kcutoffbus :: Pattern Int -> Pattern Double -> ControlPattern kcutoffbus busid pat = (pF "kcutoff" pat) # (pI "^kcutoff" busid)
127
kcutoffbus busid pat = (pF "kcutoff" pat) # (pI "^kcutoff" busid)
65
false
true
2
8
19
57
25
32
null
null
martindavid/code-sandbox
comp90048/assignments/assignment1/Lab1.hs
mit
interleave (x:xs) (y:ys) = x : y : interleave xs ys
51
interleave (x:xs) (y:ys) = x : y : interleave xs ys
51
interleave (x:xs) (y:ys) = x : y : interleave xs ys
51
false
false
0
7
10
38
19
19
null
null
t4sk/upenn-cis194
hw-08/Party.hs
mit
-- ex 3 nextLevel :: Employee -> [(GuestList, GuestList)] -> (GuestList, GuestList) nextLevel e gs = let withE = foldr mappendSnd (GL [e] (empFun e)) gs withoutE = foldr mappendMax mempty gs in (withE, withoutE)
223
nextLevel :: Employee -> [(GuestList, GuestList)] -> (GuestList, GuestList) nextLevel e gs = let withE = foldr mappendSnd (GL [e] (empFun e)) gs withoutE = foldr mappendMax mempty gs in (withE, withoutE)
215
nextLevel e gs = let withE = foldr mappendSnd (GL [e] (empFun e)) gs withoutE = foldr mappendMax mempty gs in (withE, withoutE)
139
true
true
0
13
46
93
50
43
null
null
ndmitchell/qed
v1/Exp.hs
bsd-3-clause
eval :: Exp -> Exp eval = relabel . nf . relabel where whnf (Let v x y) = whnf $ subst [(v,x)] y whnf (App (whnf -> Lam v x) y) = whnf $ subst [(v,y)] x whnf (App (whnf -> Case x alts) y) = whnf $ Case x $ map (second $ flip App y) alts whnf (Case (whnf -> x) alts) | Just (bs, bod) <...
511
eval :: Exp -> Exp eval = relabel . nf . relabel where whnf (Let v x y) = whnf $ subst [(v,x)] y whnf (App (whnf -> Lam v x) y) = whnf $ subst [(v,y)] x whnf (App (whnf -> Case x alts) y) = whnf $ Case x $ map (second $ flip App y) alts whnf (Case (whnf -> x) alts) | Just (bs, bod) <...
511
eval = relabel . nf . relabel where whnf (Let v x y) = whnf $ subst [(v,x)] y whnf (App (whnf -> Lam v x) y) = whnf $ subst [(v,y)] x whnf (App (whnf -> Case x alts) y) = whnf $ Case x $ map (second $ flip App y) alts whnf (Case (whnf -> x) alts) | Just (bs, bod) <- caseCon $ Case x ...
492
false
true
5
10
170
326
155
171
null
null
peterokagey/haskellOEIS
src/HelperSequences/A003056.hs
apache-2.0
a003056 :: Integral a => a -> a a003056 n = a002024 (n + 1) - 1
63
a003056 :: Integral a => a -> a a003056 n = a002024 (n + 1) - 1
63
a003056 n = a002024 (n + 1) - 1
31
false
true
0
8
16
39
19
20
null
null
tjakway/ghcjvm
libraries/template-haskell/Language/Haskell/TH/Lib.hs
bsd-3-clause
unboundVarE :: Name -> ExpQ unboundVarE s = return (UnboundVarE s)
66
unboundVarE :: Name -> ExpQ unboundVarE s = return (UnboundVarE s)
66
unboundVarE s = return (UnboundVarE s)
38
false
true
0
7
10
32
14
18
null
null
y-usuzumi/survive-the-course
www.icourse163.org/ZJU-93001/第五周编程作业/1.hs
bsd-3-clause
split :: String -> [String] split "" = [""]
43
split :: String -> [String] split "" = [""]
43
split "" = [""]
15
false
true
0
6
8
24
13
11
null
null
andyarvanitis/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
ibc i (IBCLib tgt n) f = return f { ibc_libs = (tgt, n) : ibc_libs f }
70
ibc i (IBCLib tgt n) f = return f { ibc_libs = (tgt, n) : ibc_libs f }
70
ibc i (IBCLib tgt n) f = return f { ibc_libs = (tgt, n) : ibc_libs f }
70
false
false
1
9
17
51
23
28
null
null
rootzlevel/hlwm-haskell
src/HLWM/IPC/Internal.hs
bsd-2-clause
findHookWindow :: Display -> Window -> IO (Maybe Window) findHookWindow display root = do atom <- internAtom display herbstHookWinIdAtom False getWindowProperty32 display atom root >>= \case Just (winid:_) -> do let win = fromIntegral winid inputMask = structureNotifyMask .|. propertyChangeMask ...
775
findHookWindow :: Display -> Window -> IO (Maybe Window) findHookWindow display root = do atom <- internAtom display herbstHookWinIdAtom False getWindowProperty32 display atom root >>= \case Just (winid:_) -> do let win = fromIntegral winid inputMask = structureNotifyMask .|. propertyChangeMask ...
775
findHookWindow display root = do atom <- internAtom display herbstHookWinIdAtom False getWindowProperty32 display atom root >>= \case Just (winid:_) -> do let win = fromIntegral winid inputMask = structureNotifyMask .|. propertyChangeMask selectInput display win inputMask return $ ...
718
false
true
0
17
157
142
68
74
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/nativeGen/X86/Instr.hs
bsd-3-clause
canShortcut :: Instr -> Maybe JumpDest canShortcut (JXX ALWAYS id) = Just (DestBlockId id)
95
canShortcut :: Instr -> Maybe JumpDest canShortcut (JXX ALWAYS id) = Just (DestBlockId id)
95
canShortcut (JXX ALWAYS id) = Just (DestBlockId id)
56
false
true
0
7
18
38
18
20
null
null
bmillwood/pointfree
Plugin/Pl/Transform.hs
mit
fresh :: [String] -> String fresh variables = head . filter (not . flip elem variables) $ varNames
98
fresh :: [String] -> String fresh variables = head . filter (not . flip elem variables) $ varNames
98
fresh variables = head . filter (not . flip elem variables) $ varNames
70
false
true
0
10
17
44
22
22
null
null
fpco/streaming-commons
Data/Streaming/Network.hs
mit
unassignedPortsList :: [Int] unassignedPortsList = concat [ [43124..44320] , [28120..29166] , [45967..46997] , [28241..29117] , [40001..40840] , [29170..29998] , [38866..39680] , [43442..44122] , [41122..41793] , [35358..36000] ]
273
unassignedPortsList :: [Int] unassignedPortsList = concat [ [43124..44320] , [28120..29166] , [45967..46997] , [28241..29117] , [40001..40840] , [29170..29998] , [38866..39680] , [43442..44122] , [41122..41793] , [35358..36000] ]
273
unassignedPortsList = concat [ [43124..44320] , [28120..29166] , [45967..46997] , [28241..29117] , [40001..40840] , [29170..29998] , [38866..39680] , [43442..44122] , [41122..41793] , [35358..36000] ]
244
false
true
0
7
70
97
59
38
null
null
isomorphism/webgl
src/Graphics/Rendering/WebGL/Constants.hs
mit
gl_TEXTURE_CUBE_MAP_NEGATIVE_X :: GLenum gl_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516
80
gl_TEXTURE_CUBE_MAP_NEGATIVE_X :: GLenum gl_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516
80
gl_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516
39
false
true
0
4
5
11
6
5
null
null
YoEight/hk-coolc
src/Compiler/Semantic.hs
bsd-3-clause
methodEnv ∷ (MonadReader TypecheckEnv m, MonadError CompilerError m) ⇒ String → m (Type, [Type]) methodEnv name = do (cls, meths) <- asks ((className . tcCurrentClass) &&& tcMethodMap) let ((Method _ typ formals _), _) = unsafeLookup_u (getUnique name) meths typ' = if typ == "SELF_TY...
382
methodEnv ∷ (MonadReader TypecheckEnv m, MonadError CompilerError m) ⇒ String → m (Type, [Type]) methodEnv name = do (cls, meths) <- asks ((className . tcCurrentClass) &&& tcMethodMap) let ((Method _ typ formals _), _) = unsafeLookup_u (getUnique name) meths typ' = if typ == "SELF_TY...
382
methodEnv name = do (cls, meths) <- asks ((className . tcCurrentClass) &&& tcMethodMap) let ((Method _ typ formals _), _) = unsafeLookup_u (getUnique name) meths typ' = if typ == "SELF_TYPE" then cls else typ return (typ', fmap formalType formals)
259
false
true
0
12
91
152
79
73
null
null
bitemyapp/ganeti
src/Ganeti/WConfd/Monad.hs
bsd-2-clause
-- | Atomically modifies the configuration state in the WConfdMonad -- with a computation that can possibly fail; immediately afterwards, -- while config write is still going on, do the followup action. Return -- only after replication is finished. modifyConfigStateErrWithImmediate :: (TempResState -> ConfigState -> ...
1,655
modifyConfigStateErrWithImmediate :: (TempResState -> ConfigState -> AtomicModifyMonad (a, ConfigState)) -> WConfdMonad () -> WConfdMonad a modifyConfigStateErrWithImmediate f immediateFollowup = do dh <- daemonHandle now <- liftIO getClockTime let modCS ds@(DaemonState { dsTempRes = tr }) = mapMOf...
1,406
modifyConfigStateErrWithImmediate f immediateFollowup = do dh <- daemonHandle now <- liftIO getClockTime let modCS ds@(DaemonState { dsTempRes = tr }) = mapMOf2 dsConfigStateL (\cs -> liftM (unpackConfigResult now cs) (f tr cs)) ds (r, modified, distSync) <- atomicModifyIORefErrLog (dhDaemonS...
1,260
true
true
0
17
442
312
149
163
null
null
mpahrens/fun-with-propagators
src/Main.hs
mit
example1 :: Maybe Double example1 = runST $ do { x <- mycell ; y <- mycell ; z <- mycell ; _ <- lift2 (+) x y z ; _ <- lift2 (-) z y x ; _ <- lift2 (-) z x y ; _ <- write y (1.0 :: Double) ; _ <- write x (2.0 :: Double) ; content z }
235
example1 :: Maybe Double example1 = runST $ do { x <- mycell ; y <- mycell ; z <- mycell ; _ <- lift2 (+) x y z ; _ <- lift2 (-) z y x ; _ <- lift2 (-) z x y ; _ <- write y (1.0 :: Double) ; _ <- write x (2.0 :: Double) ; content z }
235
example1 = runST $ do { x <- mycell ; y <- mycell ; z <- mycell ; _ <- lift2 (+) x y z ; _ <- lift2 (-) z y x ; _ <- lift2 (-) z x y ; _ <- write y (1.0 :: Double) ; _ <- write x (2.0 :: Double) ; content z }
210
false
true
2
10
66
152
76
76
null
null
tnrangwi/grill
test/functional/test_EvalTrees.hs
mit
escape :: Char -> String escape x = if x == '"' then "\"\"" else [x]
68
escape :: Char -> String escape x = if x == '"' then "\"\"" else [x]
68
escape x = if x == '"' then "\"\"" else [x]
43
false
true
0
7
15
37
19
18
null
null
wavewave/hoodle-cache
lib/Application/Hoodle/Cache/Command.hs
bsd-2-clause
commandLineProcess :: Hoodle_cache -> IO () commandLineProcess Test = do putStrLn "test called" startJob
109
commandLineProcess :: Hoodle_cache -> IO () commandLineProcess Test = do putStrLn "test called" startJob
109
commandLineProcess Test = do putStrLn "test called" startJob
65
false
true
0
8
18
37
15
22
null
null
glesica/jenerator
src/Jenerator.hs
bsd-3-clause
parseTags :: String -> [String] parseTags = splitOn "_"
55
parseTags :: String -> [String] parseTags = splitOn "_"
55
parseTags = splitOn "_"
23
false
true
0
6
8
21
11
10
null
null
rrnewton/accelerate
Data/Array/Accelerate/Interpreter.hs
bsd-3-clause
evalGtEq (NumScalarType (FloatingNumType ty)) | FloatingDict <- floatingDict ty = uncurry (>=)
94
evalGtEq (NumScalarType (FloatingNumType ty)) | FloatingDict <- floatingDict ty = uncurry (>=)
94
evalGtEq (NumScalarType (FloatingNumType ty)) | FloatingDict <- floatingDict ty = uncurry (>=)
94
false
false
0
9
11
40
18
22
null
null
toothbrush/dotfs
System/DotFS/Core/HeaderParser.hs
bsd-3-clause
-- | assignState parses an assignment. That is, an identifier, an equals (=) -- symbol, and then an expression. assignState :: VarParser () assignState = do{ name <- identifier lex ; whiteSpace lex ; _ <- symbol lex "=" ; whiteSpace lex ; val <- exprP ...
457
assignState :: VarParser () assignState = do{ name <- identifier lex ; whiteSpace lex ; _ <- symbol lex "=" ; whiteSpace lex ; val <- exprP ; s <- getState ; let e = eval s val ; updateState (insert name (P...
345
assignState = do{ name <- identifier lex ; whiteSpace lex ; _ <- symbol lex "=" ; whiteSpace lex ; val <- exprP ; s <- getState ; let e = eval s val ; updateState (insert name (Prim e)) }
317
true
true
0
11
193
109
53
56
null
null
bsl/GLFW-b
Graphics/UI/GLFW.hs
bsd-2-clause
-- | See <https://www.glfw.org/docs/3.3/group__native.html#ga72f23e3980b83788c70aa854eca31430 glfwGetX11SelectionString> getX11SelectionString :: IO String getX11SelectionString = c'glfwGetX11SelectionString >>= peekCString
223
getX11SelectionString :: IO String getX11SelectionString = c'glfwGetX11SelectionString >>= peekCString
102
getX11SelectionString = c'glfwGetX11SelectionString >>= peekCString
67
true
true
0
5
13
19
10
9
null
null
smoothdeveloper/GeoAlgLib
src/MonotonePartition.hs
gpl-3.0
point :: Vertex a -> Point2 a point (Start x) = x
79
point :: Vertex a -> Point2 a point (Start x) = x
79
point (Start x) = x
32
false
true
0
7
41
30
14
16
null
null
mrakgr/futhark
src/Futhark/CodeGen/ImpGen/Kernels.hs
bsd-3-clause
readKernelInput :: KernelInput -> InKernelGen () readKernelInput inp = when (primType t) $ do (srcmem, space, srcoffset) <- ImpGen.fullyIndexArray arr $ map SE.intSubExpToScalExp is ImpGen.emit $ Imp.SetScalar name $ Imp.Index srcmem srcoffset (elemType t) space where arr = kernelInputArray inp ...
422
readKernelInput :: KernelInput -> InKernelGen () readKernelInput inp = when (primType t) $ do (srcmem, space, srcoffset) <- ImpGen.fullyIndexArray arr $ map SE.intSubExpToScalExp is ImpGen.emit $ Imp.SetScalar name $ Imp.Index srcmem srcoffset (elemType t) space where arr = kernelInputArray inp ...
422
readKernelInput inp = when (primType t) $ do (srcmem, space, srcoffset) <- ImpGen.fullyIndexArray arr $ map SE.intSubExpToScalExp is ImpGen.emit $ Imp.SetScalar name $ Imp.Index srcmem srcoffset (elemType t) space where arr = kernelInputArray inp name = kernelInputName inp t = ke...
373
false
true
6
10
99
156
67
89
null
null
SKA-ScienceDataProcessor/RC
MS6/dna/core/DNA/Interpreter/Spawn.hs
apache-2.0
execSpawnActor :: (Serializable a, Serializable b) => Res -> Spawn (Closure (Actor a b)) -> DnaMonad (Shell (Val a) (Val b)) -- BLOCKING execSpawnActor res actorCmd = do let (act,flags) = runSpawn $ closureApply $(mkStaticClosure 'runActor) <$> actorCmd aid <- AID <$> uniqID ...
529
execSpawnActor :: (Serializable a, Serializable b) => Res -> Spawn (Closure (Actor a b)) -> DnaMonad (Shell (Val a) (Val b)) execSpawnActor res actorCmd = do let (act,flags) = runSpawn $ closureApply $(mkStaticClosure 'runActor) <$> actorCmd aid <- AID <$> uniqID cad <- a...
517
execSpawnActor res actorCmd = do let (act,flags) = runSpawn $ closureApply $(mkStaticClosure 'runActor) <$> actorCmd aid <- AID <$> uniqID cad <- acquireResources res flags spawnSingleActor aid cad $ SpawnSingle act (Rank 0) (GroupSize 1) SimpleActor RcvTySimple flags retur...
376
true
true
0
16
135
191
90
101
null
null
rumblesan/improviz
src/Gfx/VertexBuffers.hs
bsd-3-clause
deleteVBO :: VBO -> IO () deleteVBO (VBO bufferObject arrayBuffers _ _ _) = do forM_ arrayBuffers GL.deleteObjectName GL.deleteObjectName bufferObject
154
deleteVBO :: VBO -> IO () deleteVBO (VBO bufferObject arrayBuffers _ _ _) = do forM_ arrayBuffers GL.deleteObjectName GL.deleteObjectName bufferObject
154
deleteVBO (VBO bufferObject arrayBuffers _ _ _) = do forM_ arrayBuffers GL.deleteObjectName GL.deleteObjectName bufferObject
128
false
true
0
9
23
60
26
34
null
null
WSCU/JSEuterpea
Euterpea Examples/Basics.hs
gpl-3.0
p2a = arp' doremiTwo tc2 std
29
tp2a = arp' doremiTwo tc2 std
29
tp2a = arp' doremiTwo tc2 std
29
false
false
1
5
6
17
6
11
null
null
mhwombat/creatur-realtra.OLD
src/ALife/Realtra/ExamineAgent.hs
bsd-3-clause
getAndExamineAll :: (Universe u, Agent u ~ Astronomer) => StateT u IO () getAndExamineAll = do names <- agentIds mapM_ getAndExamine names
148
getAndExamineAll :: (Universe u, Agent u ~ Astronomer) => StateT u IO () getAndExamineAll = do names <- agentIds mapM_ getAndExamine names
148
getAndExamineAll = do names <- agentIds mapM_ getAndExamine names
69
false
true
0
8
31
60
27
33
null
null
Hi-Angel/yi
yi-core/src/Yi/Buffer/HighLevel.hs
gpl-2.0
deleteBlankLinesB :: BufferM () deleteBlankLinesB = do isThisBlank <- isBlank <$> readLnB when isThisBlank $ do p <- pointB -- go up to the 1st blank line in the group void $ whileB (R.null <$> getNextLineB Backward) lineUp q <- pointB -- delete the whole blank region. deleteRegionB $ mkRegi...
431
deleteBlankLinesB :: BufferM () deleteBlankLinesB = do isThisBlank <- isBlank <$> readLnB when isThisBlank $ do p <- pointB -- go up to the 1st blank line in the group void $ whileB (R.null <$> getNextLineB Backward) lineUp q <- pointB -- delete the whole blank region. deleteRegionB $ mkRegi...
431
deleteBlankLinesB = do isThisBlank <- isBlank <$> readLnB when isThisBlank $ do p <- pointB -- go up to the 1st blank line in the group void $ whileB (R.null <$> getNextLineB Backward) lineUp q <- pointB -- delete the whole blank region. deleteRegionB $ mkRegion p q -- | Get a (lazy) stream...
399
false
true
0
14
101
91
43
48
null
null
alexander-at-github/eta
compiler/ETA/TypeCheck/TcType.hs
bsd-3-clause
isCharTy = is_tc charTyConKey
35
isCharTy = is_tc charTyConKey
35
isCharTy = is_tc charTyConKey
35
false
false
1
5
9
13
4
9
null
null
brendanhay/gogol
gogol-chat/gen/Network/Google/Chat/Types/Product.hs
mpl-2.0
-- | The onclick action for this action item. caOnClick :: Lens' CardAction (Maybe OnClick) caOnClick = lens _caOnClick (\ s a -> s{_caOnClick = a})
150
caOnClick :: Lens' CardAction (Maybe OnClick) caOnClick = lens _caOnClick (\ s a -> s{_caOnClick = a})
104
caOnClick = lens _caOnClick (\ s a -> s{_caOnClick = a})
58
true
true
1
9
27
52
25
27
null
null
DougBurke/swish
src/Swish/RDF/Vocabulary/Provenance.hs
lgpl-2.1
-- | @prov:wasScheduledAfter@ from <http://www.w3.org/TR/prov-o/#wasscheduledafter>. provwasScheduledAfter :: ScopedName provwasScheduledAfter = toS "wasScheduledAfter"
168
provwasScheduledAfter :: ScopedName provwasScheduledAfter = toS "wasScheduledAfter"
83
provwasScheduledAfter = toS "wasScheduledAfter"
47
true
true
0
5
11
15
8
7
null
null
k0001/haskell-opaleye
Opaleye/Internal/Values.hs
bsd-3-clause
extractValuesField :: T.Tag -> HPQ.PrimExpr -> PM.PM [(String, HPQ.PrimExpr)] HPQ.PrimExpr extractValuesField = extractAttr ("values" ++)
156
extractValuesField :: T.Tag -> HPQ.PrimExpr -> PM.PM [(String, HPQ.PrimExpr)] HPQ.PrimExpr extractValuesField = extractAttr ("values" ++)
156
extractValuesField = extractAttr ("values" ++)
46
false
true
0
10
33
50
27
23
null
null
mxswd/slideshow
slideshow.hs
bsd-3-clause
mkSlideshow (Opts {ver = True}) = putStrLn $ "version: " ++ version
67
mkSlideshow (Opts {ver = True}) = putStrLn $ "version: " ++ version
67
mkSlideshow (Opts {ver = True}) = putStrLn $ "version: " ++ version
67
false
false
0
9
11
29
15
14
null
null
GunioRobot/web-mongrel2
src/Web/Mongrel2.hs
bsd-3-clause
recv _ _ _ = return ()
22
recv _ _ _ = return ()
22
recv _ _ _ = return ()
22
false
false
1
6
6
19
7
12
null
null
tonymorris/hbudget
src/Math/Budget/FixedPeriod.hs
bsd-3-clause
everyYear :: FixedPeriod everyYear = everyYears 1
53
everyYear :: FixedPeriod everyYear = everyYears 1
53
everyYear = everyYears 1
26
false
true
0
5
10
14
7
7
null
null
RTS2013/RTS
server/src/MIO/Repa.hs
mit
foldP a b c = Change $! \_ -> R.foldP a b c
43
foldP a b c = Change $! \_ -> R.foldP a b c
43
foldP a b c = Change $! \_ -> R.foldP a b c
43
false
false
1
8
12
36
15
21
null
null
yamadapc/stack-run-auto
test-files/DistributedProcess.hs
mit
client st c sid = do me <- getSelfPid send sid (me,c) liftIO $ putStrLn $ "Sent a Ping with value : " ++ (show c) (v :: Int) <- expect liftIO $ putStrLn $ "Got a Pong with value : " ++ (show v) client st (c+1) sid
226
client st c sid = do me <- getSelfPid send sid (me,c) liftIO $ putStrLn $ "Sent a Ping with value : " ++ (show c) (v :: Int) <- expect liftIO $ putStrLn $ "Got a Pong with value : " ++ (show v) client st (c+1) sid
226
client st c sid = do me <- getSelfPid send sid (me,c) liftIO $ putStrLn $ "Sent a Ping with value : " ++ (show c) (v :: Int) <- expect liftIO $ putStrLn $ "Got a Pong with value : " ++ (show v) client st (c+1) sid
226
false
false
0
9
61
107
51
56
null
null
nomeata/ghc
compiler/cmm/CmmType.hs
bsd-3-clause
cmmBits, cmmFloat :: Width -> CmmType cmmBits = CmmType BitsCat
64
cmmBits, cmmFloat :: Width -> CmmType cmmBits = CmmType BitsCat
64
cmmBits = CmmType BitsCat
26
false
true
2
7
10
31
12
19
null
null
DanielSchiavini/ampersand
src/Database/Design/Ampersand/ADL1/Expression.hs
gpl-3.0
foldrMapExpression f g a (EDcD d) = f (g d) a
49
foldrMapExpression f g a (EDcD d) = f (g d) a
49
foldrMapExpression f g a (EDcD d) = f (g d) a
49
false
false
0
7
14
32
15
17
null
null
gombocarti/erlang-ffi
src/Foreign/Erlang/OTP/Mnesia.hs
gpl-3.0
dirtySelect :: MBox -> Node -> String -> ErlType -> IO ErlType dirtySelect mbox node tab spec = mnesia mbox node "dirty_select" [spec]
134
dirtySelect :: MBox -> Node -> String -> ErlType -> IO ErlType dirtySelect mbox node tab spec = mnesia mbox node "dirty_select" [spec]
134
dirtySelect mbox node tab spec = mnesia mbox node "dirty_select" [spec]
71
false
true
0
9
22
51
25
26
null
null
prezi/itsitsdangerous
tests/Foreign/Python.hs
bsd-3-clause
-- |@'isPythonException' exception@ determines whether the given @exception@ is -- an exception thrown from Python code. -- -- Unlike 'isFatalError' these exceptions can occur in the regular use of Python -- libraries. isPythonException :: PythonException -> Bool isPythonException = not.isFatalError
300
isPythonException :: PythonException -> Bool isPythonException = not.isFatalError
81
isPythonException = not.isFatalError
36
true
true
0
5
39
22
14
8
null
null
bgamari/shaking-up-ghc
src/Base.hs
bsd-3-clause
-- | Path to source files of the build system, e.g. this file is located at -- @sourcePath -/- "Base.hs"@. We use this to track some of the source files. sourcePath :: FilePath sourcePath = hadrianPath -/- "src"
211
sourcePath :: FilePath sourcePath = hadrianPath -/- "src"
57
sourcePath = hadrianPath -/- "src"
34
true
true
0
5
37
17
10
7
null
null
adityagupta1089/Project-Euler-Haskell
src/problems/Problem203.hs
bsd-3-clause
main :: IO () main = print $ sum . nub . concat . elems $ map fst . filter (all (< 2) . snd) . elems <$> pascal
193
main :: IO () main = print $ sum . nub . concat . elems $ map fst . filter (all (< 2) . snd) . elems <$> pascal
193
main = print $ sum . nub . concat . elems $ map fst . filter (all (< 2) . snd) . elems <$> pascal
179
false
true
11
8
110
82
35
47
null
null
gromakovsky/Orchid
src/Orchid/Codegen/Module.hs
mit
mkModuleState :: Text -> Bool -> AST.Module -> FunctionsMap -> ClassesMap -> VariablesMap -> ModuleState mkModuleState moduleName optimizeTailRecursion preludeModule preludeFunctions preludeClasses preludeVariables = ModuleState { _msFunctions = preludeFunctions , _msPrivateFunct...
582
mkModuleState :: Text -> Bool -> AST.Module -> FunctionsMap -> ClassesMap -> VariablesMap -> ModuleState mkModuleState moduleName optimizeTailRecursion preludeModule preludeFunctions preludeClasses preludeVariables = ModuleState { _msFunctions = preludeFunctions , _msPrivateFunct...
582
mkModuleState moduleName optimizeTailRecursion preludeModule preludeFunctions preludeClasses preludeVariables = ModuleState { _msFunctions = preludeFunctions , _msPrivateFunctions = S.empty , _msClasses = preludeClasses , _msVariables = preludeVariables , _msClass = Nothing , _msModule = pre...
449
false
true
0
10
134
109
62
47
null
null
foreverbell/project-euler-solutions
src/346.hs
bsd-3-clause
repunits :: [Int] repunits = 1 : nub' (concatMap get [2 .. root])
65
repunits :: [Int] repunits = 1 : nub' (concatMap get [2 .. root])
65
repunits = 1 : nub' (concatMap get [2 .. root])
47
false
true
2
8
12
43
20
23
null
null
haroldcarr/pept
src/Lib.hs
apache-2.0
testEncoder :: Encoder testEncoder = Encoder { encodeAndSend = flip sendC }
88
testEncoder :: Encoder testEncoder = Encoder { encodeAndSend = flip sendC }
88
testEncoder = Encoder { encodeAndSend = flip sendC }
62
false
true
0
7
24
22
12
10
null
null
redongjun/haskellschool
homework/HW03.hs
unlicense
desugar (For st1 exp1 st2 st3) = desugar (Sequence st1 $ While exp1 $ Sequence st3 st2)
87
desugar (For st1 exp1 st2 st3) = desugar (Sequence st1 $ While exp1 $ Sequence st3 st2)
87
desugar (For st1 exp1 st2 st3) = desugar (Sequence st1 $ While exp1 $ Sequence st3 st2)
87
false
false
0
9
16
47
21
26
null
null
alephcloud/hs-configuration-tools
src/Configuration/Utils/ConfigFile.hs
mit
defaultConfigFilesConfig ∷ ConfigFilesConfig defaultConfigFilesConfig = ConfigFilesConfig { _cfcHttpsPolicy = defaultHttpsCertPolicy }
142
defaultConfigFilesConfig ∷ ConfigFilesConfig defaultConfigFilesConfig = ConfigFilesConfig { _cfcHttpsPolicy = defaultHttpsCertPolicy }
142
defaultConfigFilesConfig = ConfigFilesConfig { _cfcHttpsPolicy = defaultHttpsCertPolicy }
97
false
true
0
6
18
19
11
8
null
null
GaloisInc/saw-script
heapster-saw/src/Verifier/SAW/Heapster/RustTypes.hs
bsd-3-clause
-- | Convert a 'RustName' to a string by interspersing "::" flattenRustName :: RustName -> String flattenRustName (RustName ids) = concat $ intersperse "::" $ map name ids
171
flattenRustName :: RustName -> String flattenRustName (RustName ids) = concat $ intersperse "::" $ map name ids
111
flattenRustName (RustName ids) = concat $ intersperse "::" $ map name ids
73
true
true
0
7
27
41
20
21
null
null
rsasse/tamarin-prover
lib/theory/src/Theory/Constraint/System/Guarded.hs
gpl-3.0
-- | @formulaToGuarded fm@ returns a guarded formula @gf@ that is -- equivalent to @fm@ under the assumption that this is possible. -- If not, then 'error' is called. formulaToGuarded_ :: LNFormula -> LNGuarded formulaToGuarded_ = either (error . render) id . formulaToGuarded
277
formulaToGuarded_ :: LNFormula -> LNGuarded formulaToGuarded_ = either (error . render) id . formulaToGuarded
110
formulaToGuarded_ = either (error . render) id . formulaToGuarded
65
true
true
0
8
43
42
20
22
null
null
iu-parfunc/containers
tests/deprecated-properties.hs
bsd-3-clause
prop_intmapInsertWithKey'Strict :: [(Int, Int)] -> (Int -> Int -> Int -> Int) -> [(Int, Int)] -> Bool prop_intmapInsertWithKey'Strict xs f kxxs = let m = IM.fromList xs insertList ins = foldr (\(kx, x) -> ins f kx x) m kxxs in insertList IM.insertWithKey' == insertList SIM.insertWithKey
297
prop_intmapInsertWithKey'Strict :: [(Int, Int)] -> (Int -> Int -> Int -> Int) -> [(Int, Int)] -> Bool prop_intmapInsertWithKey'Strict xs f kxxs = let m = IM.fromList xs insertList ins = foldr (\(kx, x) -> ins f kx x) m kxxs in insertList IM.insertWithKey' == insertList SIM.insertWithKey
297
prop_intmapInsertWithKey'Strict xs f kxxs = let m = IM.fromList xs insertList ins = foldr (\(kx, x) -> ins f kx x) m kxxs in insertList IM.insertWithKey' == insertList SIM.insertWithKey
195
false
true
0
12
55
129
67
62
null
null
kellino/TypeSystems
fullSub/PrettyPrint.hs
mit
gatherBinders :: Term -> M ([Doc], Doc) gatherBinders (TmAbs b) = lunbind b $ \((n, _), body) -> do let dn = text $ name2String n (rest, bdy) <- gatherBinders body return (dn : rest, bdy)
215
gatherBinders :: Term -> M ([Doc], Doc) gatherBinders (TmAbs b) = lunbind b $ \((n, _), body) -> do let dn = text $ name2String n (rest, bdy) <- gatherBinders body return (dn : rest, bdy)
215
gatherBinders (TmAbs b) = lunbind b $ \((n, _), body) -> do let dn = text $ name2String n (rest, bdy) <- gatherBinders body return (dn : rest, bdy)
175
false
true
0
13
63
108
56
52
null
null
Javran/misc
gaussian-elim/src/Solver.hs
mit
shuffler :: Int -> ([a] -> [a], [a] -> [a]) shuffler i = if i <= 0 then (id, id) else let doShuffle xs = if i >= l then xs else let (pres, h : tl) = splitAt i xs in h : pres <> tl where l = length xs ...
600
shuffler :: Int -> ([a] -> [a], [a] -> [a]) shuffler i = if i <= 0 then (id, id) else let doShuffle xs = if i >= l then xs else let (pres, h : tl) = splitAt i xs in h : pres <> tl where l = length xs ...
600
shuffler i = if i <= 0 then (id, id) else let doShuffle xs = if i >= l then xs else let (pres, h : tl) = splitAt i xs in h : pres <> tl where l = length xs unShuffle xs = if i >= l ...
556
false
true
0
16
338
222
116
106
null
null
lostbean/DeUni
src/DeUni/GeometricTools.hs
gpl-3.0
-- | Projection A on B = B * (A°B)/(B°B) projAonB::(LinearMap a v, DotProd a v, Fractional a) => v a -> v a -> v a projAonB a b = b &* ((a &. b) / (b &. b))
156
projAonB::(LinearMap a v, DotProd a v, Fractional a) => v a -> v a -> v a projAonB a b = b &* ((a &. b) / (b &. b))
115
projAonB a b = b &* ((a &. b) / (b &. b))
41
true
true
0
9
39
84
43
41
null
null
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Util/Stack.hs
bsd-2-clause
-- * Zipper functions -- ** Insertion, movement -- | Insert an element before the focused one, and focus it insertUpZ :: a -> Zipper a -> Zipper a insertUpZ a Nothing = W.differentiate [a]
190
insertUpZ :: a -> Zipper a -> Zipper a insertUpZ a Nothing = W.differentiate [a]
80
insertUpZ a Nothing = W.differentiate [a]
41
true
true
0
8
36
45
22
23
null
null
Shimuuar/gccxml
Language/Cpp/GccXml.hs
bsd-3-clause
-- Declaration with nested elements declaration :: (MonadThrow m) => Name -> AttrParser ([x] -> a) -> Sink Event m (Maybe x) -> Sink Event m (Maybe (ID, a)) declaration nm atts chld = tagName nm (ignore $ (,) <$> paramID "id" <*> atts) $ \(i,f) -> do xs <- many chld...
360
declaration :: (MonadThrow m) => Name -> AttrParser ([x] -> a) -> Sink Event m (Maybe x) -> Sink Event m (Maybe (ID, a)) declaration nm atts chld = tagName nm (ignore $ (,) <$> paramID "id" <*> atts) $ \(i,f) -> do xs <- many chld return (i, f xs) -- Subdeclara...
324
declaration nm atts chld = tagName nm (ignore $ (,) <$> paramID "id" <*> atts) $ \(i,f) -> do xs <- many chld return (i, f xs) -- Subdeclaration
155
true
true
0
12
116
152
78
74
null
null
m00nlight/hackerrank
functional/recursion/Convex-Hull/main.hs
gpl-2.0
-- | This function judge whether the vector P1P2 P2P3 is counter-clock-wise ccw :: Point -> Point -> Point -> Bool ccw p1 p2 p3 = (doubleCmp (cross (p2 - p1) (p3 - p2)) (fromIntegral 0)) /= LT
192
ccw :: Point -> Point -> Point -> Bool ccw p1 p2 p3 = (doubleCmp (cross (p2 - p1) (p3 - p2)) (fromIntegral 0)) /= LT
116
ccw p1 p2 p3 = (doubleCmp (cross (p2 - p1) (p3 - p2)) (fromIntegral 0)) /= LT
77
true
true
0
11
37
77
38
39
null
null
brendanhay/gogol
gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Bidders/Accounts/FilterSets/Delete.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). bafsdUploadType :: Lens' BiddersAccountsFilterSetsDelete (Maybe Text) bafsdUploadType = lens _bafsdUploadType (\ s a -> s{_bafsdUploadType = a})
223
bafsdUploadType :: Lens' BiddersAccountsFilterSetsDelete (Maybe Text) bafsdUploadType = lens _bafsdUploadType (\ s a -> s{_bafsdUploadType = a})
152
bafsdUploadType = lens _bafsdUploadType (\ s a -> s{_bafsdUploadType = a})
82
true
true
1
9
34
51
25
26
null
null
khumba/khph
src/Khph/Query/Parse.hs
agpl-3.0
entrySpec :: MonadProject m => TermParserT m EntrySpec entrySpec = do str <- stringTerm case toEntrySpec str of Left err -> fail $ concat ["Couldn't parse an EntrySpec from ", show str, ": ", err] Right entrySpec -> return entrySpec
260
entrySpec :: MonadProject m => TermParserT m EntrySpec entrySpec = do str <- stringTerm case toEntrySpec str of Left err -> fail $ concat ["Couldn't parse an EntrySpec from ", show str, ": ", err] Right entrySpec -> return entrySpec
260
entrySpec = do str <- stringTerm case toEntrySpec str of Left err -> fail $ concat ["Couldn't parse an EntrySpec from ", show str, ": ", err] Right entrySpec -> return entrySpec
205
false
true
0
14
67
89
40
49
null
null
DataStewardshipPortal/ds-elixir-cz
Server/app/Main.hs
apache-2.0
saveHandler :: PGPool -> Action saveHandler pool = do ps <- W.params let maybeRespondentKey = lookup (TL.fromStrict respondentKeyFieldName) ps case maybeRespondentKey of Nothing -> W.text "No respondent key" Just respondentKey -> do maybeRespondent <- runQuery pool $ R.getRespondent $ TL.toStrict re...
1,231
saveHandler :: PGPool -> Action saveHandler pool = do ps <- W.params let maybeRespondentKey = lookup (TL.fromStrict respondentKeyFieldName) ps case maybeRespondentKey of Nothing -> W.text "No respondent key" Just respondentKey -> do maybeRespondent <- runQuery pool $ R.getRespondent $ TL.toStrict re...
1,231
saveHandler pool = do ps <- W.params let maybeRespondentKey = lookup (TL.fromStrict respondentKeyFieldName) ps case maybeRespondentKey of Nothing -> W.text "No respondent key" Just respondentKey -> do maybeRespondent <- runQuery pool $ R.getRespondent $ TL.toStrict respondentKey case maybeResp...
1,199
false
true
0
23
286
408
195
213
null
null
silky/csound-expression
src/Csound/Types.hs
bsd-3-clause
-- | Gets an control/audio-rate value from the list by index. atTuple :: (Tuple a) => [a] -> Sig -> a atTuple as ind = guardedTuple (zip (fmap (\x -> sig (int x) ==* ind) [0 .. ]) as) (head as)
193
atTuple :: (Tuple a) => [a] -> Sig -> a atTuple as ind = guardedTuple (zip (fmap (\x -> sig (int x) ==* ind) [0 .. ]) as) (head as)
131
atTuple as ind = guardedTuple (zip (fmap (\x -> sig (int x) ==* ind) [0 .. ]) as) (head as)
91
true
true
0
15
40
89
47
42
null
null
alexander-at-github/eta
compiler/ETA/Types/TypeRep.hs
bsd-3-clause
pprInfixApp :: TyPrec -> (TyPrec -> a -> SDoc) -> SDoc -> a -> a -> SDoc pprInfixApp p pp pp_tc ty1 ty2 = maybeParen p TyOpPrec $ sep [pp TyOpPrec ty1, pprInfixVar True pp_tc <+> pp TyOpPrec ty2]
201
pprInfixApp :: TyPrec -> (TyPrec -> a -> SDoc) -> SDoc -> a -> a -> SDoc pprInfixApp p pp pp_tc ty1 ty2 = maybeParen p TyOpPrec $ sep [pp TyOpPrec ty1, pprInfixVar True pp_tc <+> pp TyOpPrec ty2]
201
pprInfixApp p pp pp_tc ty1 ty2 = maybeParen p TyOpPrec $ sep [pp TyOpPrec ty1, pprInfixVar True pp_tc <+> pp TyOpPrec ty2]
128
false
true
0
11
44
97
45
52
null
null
mgrabmueller/harpy
Harpy/X86CodeGen.hs
bsd-3-clause
x86_movsd_from_reg :: XMMLocation xmm => Word8 -> xmm -> CodeGen e s () x86_movsd_from_reg dreg reg = do emit8 0xf2 emit8 0x0f emit8 0x11 xmm_location_emit dreg reg -- | xmm must not be a register
223
x86_movsd_from_reg :: XMMLocation xmm => Word8 -> xmm -> CodeGen e s () x86_movsd_from_reg dreg reg = do emit8 0xf2 emit8 0x0f emit8 0x11 xmm_location_emit dreg reg -- | xmm must not be a register
223
x86_movsd_from_reg dreg reg = do emit8 0xf2 emit8 0x0f emit8 0x11 xmm_location_emit dreg reg -- | xmm must not be a register
151
false
true
0
9
61
67
29
38
null
null
nevrenato/Hets_Fork
Logic/Grothendieck.hs
gpl-2.0
startSigId :: SigId startSigId = SigId 0
40
startSigId :: SigId startSigId = SigId 0
40
startSigId = SigId 0
20
false
true
0
5
6
14
7
7
null
null
WSCU/JSEuterpea
Euterpea Examples/Basics.hs
gpl-3.0
HarmBit4 = e f3 + e f3 + e f3 + e e3 + e f3 + e g3 + e g3 + e g3
65
bHarmBit4 = e f3 + e f3 + e f3 + e e3 + e f3 + e g3 + e g3 + e g3
65
bHarmBit4 = e f3 + e f3 + e f3 + e e3 + e f3 + e g3 + e g3 + e g3
65
false
false
1
12
25
61
25
36
null
null
kwf/data-kiln
Data/Kiln/Examples.hs
bsd-3-clause
editEdges :: ([(e, MNode s n e)] -> [(e, MNode s n e)]) -> MNode s n e -> Squishy s () editEdges f = flip modifyClay (composedly . composedly . second $ f)
155
editEdges :: ([(e, MNode s n e)] -> [(e, MNode s n e)]) -> MNode s n e -> Squishy s () editEdges f = flip modifyClay (composedly . composedly . second $ f)
155
editEdges f = flip modifyClay (composedly . composedly . second $ f)
68
false
true
0
10
33
95
49
46
null
null
DasIch/haskell-muster
test/Charset.hs
bsd-3-clause
propNone :: Char -> Bool propNone c = c `notElem` none
54
propNone :: Char -> Bool propNone c = c `notElem` none
54
propNone c = c `notElem` none
29
false
true
0
7
10
32
15
17
null
null
kongra/kask-base
app/Test011.hs
bsd-3-clause
f :: Value -> Value f = runWrapper . fromJust . gen . Wrapper
61
f :: Value -> Value f = runWrapper . fromJust . gen . Wrapper
61
f = runWrapper . fromJust . gen . Wrapper
41
false
true
0
7
13
34
15
19
null
null
spechub/Hets
CspCASL/Print_CspCASL.hs
gpl-2.0
printCspBasicExt :: CspBasicExt -> Doc printCspBasicExt ccs = case ccs of Channels cs _ -> keyword (channelS ++ pluralS cs) <+> semiAnnos printChanDecl cs ProcItems ps _ -> keyword processS <+> semiAnnos printProcItem ps
232
printCspBasicExt :: CspBasicExt -> Doc printCspBasicExt ccs = case ccs of Channels cs _ -> keyword (channelS ++ pluralS cs) <+> semiAnnos printChanDecl cs ProcItems ps _ -> keyword processS <+> semiAnnos printProcItem ps
232
printCspBasicExt ccs = case ccs of Channels cs _ -> keyword (channelS ++ pluralS cs) <+> semiAnnos printChanDecl cs ProcItems ps _ -> keyword processS <+> semiAnnos printProcItem ps
193
false
true
0
12
45
78
36
42
null
null
ezyang/ghc
compiler/nativeGen/RegAlloc/Graph/ArchX86.hs
bsd-3-clause
queese :: RegClass -> [(Int, RegClass)] -> Int squeese classN countCs = sum (map (\(i, classC) -> worst i classN classC) countCs)
138
squeese :: RegClass -> [(Int, RegClass)] -> Int squeese classN countCs = sum (map (\(i, classC) -> worst i classN classC) countCs)
138
squeese classN countCs = sum (map (\(i, classC) -> worst i classN classC) countCs)
90
false
true
0
10
30
65
35
30
null
null
phischu/fragnix
tests/packages/scotty/Network.HTTP.Types.Status.hs
bsd-3-clause
-- | Proxy Authentication Required 407 proxyAuthenticationRequired407 :: Status proxyAuthenticationRequired407 = status407
122
proxyAuthenticationRequired407 :: Status proxyAuthenticationRequired407 = status407
83
proxyAuthenticationRequired407 = status407
42
true
true
0
4
11
12
7
5
null
null
zalora/Angel
src/Angel/Util.hs
bsd-3-clause
strip :: String -> String strip = reverse . dropWhile isSpace . reverse . dropWhile isSpace
91
strip :: String -> String strip = reverse . dropWhile isSpace . reverse . dropWhile isSpace
91
strip = reverse . dropWhile isSpace . reverse . dropWhile isSpace
65
false
true
1
7
15
40
17
23
null
null
nickbart1980/pandoc
src/Text/Pandoc/Writers/LaTeX.hs
gpl-2.0
-- Determine listings language from list of class attributes. getListingsLanguage :: [String] -> Maybe String getListingsLanguage [] = Nothing
142
getListingsLanguage :: [String] -> Maybe String getListingsLanguage [] = Nothing
80
getListingsLanguage [] = Nothing
32
true
true
0
6
18
27
14
13
null
null
yousufmsoliman/music
Source (Haskell)/main.hs
gpl-3.0
prettyPrint bcxt = do putStrLn "Cantus Firmus" print (focus (front (cantusFirmus (board bcxt)))) putStrLn "Counter Point" print (focus (front (counterPoint (board bcxt)))) putStrLn "Hard Violations" print (hard...
435
prettyPrint bcxt = do putStrLn "Cantus Firmus" print (focus (front (cantusFirmus (board bcxt)))) putStrLn "Counter Point" print (focus (front (counterPoint (board bcxt)))) putStrLn "Hard Violations" print (hard...
435
prettyPrint bcxt = do putStrLn "Cantus Firmus" print (focus (front (cantusFirmus (board bcxt)))) putStrLn "Counter Point" print (focus (front (counterPoint (board bcxt)))) putStrLn "Hard Violations" print (hard...
435
false
false
0
15
187
117
50
67
null
null
charleso/bantam
bantam-service/src/Bantam/Service/Webship.hs
unlicense
redirect :: Path a -> a -> Response redirect p a = responseLBS HTTP.status302 [(HTTP.hLocation, encodedPath p a)] ""
118
redirect :: Path a -> a -> Response redirect p a = responseLBS HTTP.status302 [(HTTP.hLocation, encodedPath p a)] ""
118
redirect p a = responseLBS HTTP.status302 [(HTTP.hLocation, encodedPath p a)] ""
82
false
true
0
8
20
59
27
32
null
null
nevrenato/Hets_Fork
DFOL/AS_DFOL.hs
gpl-2.0
getFreeVarsInTerm :: TERM -> Set.Set NAME getFreeVarsInTerm t = getFreeVarsInTermH $ termRecForm t
98
getFreeVarsInTerm :: TERM -> Set.Set NAME getFreeVarsInTerm t = getFreeVarsInTermH $ termRecForm t
98
getFreeVarsInTerm t = getFreeVarsInTermH $ termRecForm t
56
false
true
0
7
12
30
14
16
null
null
ctford/Idris-Elba-dev
src/Idris/REPL.hs
bsd-3-clause
ideslaveProcess fn (DoProofSearch False pos str xs) = process stdout fn (DoProofSearch False pos str xs)
104
ideslaveProcess fn (DoProofSearch False pos str xs) = process stdout fn (DoProofSearch False pos str xs)
104
ideslaveProcess fn (DoProofSearch False pos str xs) = process stdout fn (DoProofSearch False pos str xs)
104
false
false
0
7
15
42
20
22
null
null
phadej/semver-range
src/Data/SemVer/Range.hs
bsd-3-clause
identifiers' :: RE Char [Identifier] identifiers' = (:) <$ sym '-' <*> identifier <*> many (sym '.' *> identifier)
114
identifiers' :: RE Char [Identifier] identifiers' = (:) <$ sym '-' <*> identifier <*> many (sym '.' *> identifier)
114
identifiers' = (:) <$ sym '-' <*> identifier <*> many (sym '.' *> identifier)
77
false
true
0
9
18
49
25
24
null
null
mumuki/mulang
spec/PrologSpec.hs
gpl-3.0
unpackPl = pl.unpack
20
unpackPl = pl.unpack
20
unpackPl = pl.unpack
20
false
false
2
5
2
16
5
11
null
null
DavidAlphaFox/darcs
src/Darcs/Repository/HashedRepo.hs
gpl-2.0
patchesDir, patchesDirPath :: String patchesDir = "patches"
59
patchesDir, patchesDirPath :: String patchesDir = "patches"
59
patchesDir = "patches"
22
false
true
2
6
6
21
8
13
null
null
eriksvedang/Carp
src/Deftype.hs
mpl-2.0
-- | The template for setters of a concrete deftype. templateSetter :: TypeEnv -> Env -> String -> Ty -> Template templateSetter typeEnv env memberName memberTy = let callToDelete = memberDeletion typeEnv env (memberName, memberTy) in Template (FuncTy [VarTy "p", VarTy "t"] (VarTy "p")) (const (toTemplate...
850
templateSetter :: TypeEnv -> Env -> String -> Ty -> Template templateSetter typeEnv env memberName memberTy = let callToDelete = memberDeletion typeEnv env (memberName, memberTy) in Template (FuncTy [VarTy "p", VarTy "t"] (VarTy "p")) (const (toTemplate "$p $NAME($p p, $t newValue)")) (const (toTempla...
797
templateSetter typeEnv env memberName memberTy = let callToDelete = memberDeletion typeEnv env (memberName, memberTy) in Template (FuncTy [VarTy "p", VarTy "t"] (VarTy "p")) (const (toTemplate "$p $NAME($p p, $t newValue)")) (const (toTemplate (unlines ["$DECL {" ,callT...
736
true
true
0
13
277
228
111
117
null
null
vizziv/Darjeelang
parser.hs
mit
matchCase = do reservedOp "&" args <- M.fromList <$> (braces . commaSep) ((,) <$> typ <* colon <*> identifier) reservedOp "->" body <- exp return (TProd (M.keysSet args), ("__", E $ EMatch (E $ EVar "__") args body))
236
matchCase = do reservedOp "&" args <- M.fromList <$> (braces . commaSep) ((,) <$> typ <* colon <*> identifier) reservedOp "->" body <- exp return (TProd (M.keysSet args), ("__", E $ EMatch (E $ EVar "__") args body))
236
matchCase = do reservedOp "&" args <- M.fromList <$> (braces . commaSep) ((,) <$> typ <* colon <*> identifier) reservedOp "->" body <- exp return (TProd (M.keysSet args), ("__", E $ EMatch (E $ EVar "__") args body))
236
false
false
1
15
57
120
56
64
null
null
5outh/cypher
src/Cypher/Actions.hs
mit
deleteNodeProperties :: Id ~> () deleteNodeProperties nodeId = liftF (DeleteNodeProperties nodeId ())
101
deleteNodeProperties :: Id ~> () deleteNodeProperties nodeId = liftF (DeleteNodeProperties nodeId ())
101
deleteNodeProperties nodeId = liftF (DeleteNodeProperties nodeId ())
68
false
true
0
8
11
33
16
17
null
null
uProxy/uproxy-idl-compiler
Parse/Parser.hs
apache-2.0
parameter = choice [ try $ RequiredOrOptionalParameter <$> optionMaybe publicOrPrivate <*> identifier <*> optionMaybe (lexeme (char '?' >> return Optional)) <*> optionMaybe typeAnnotation , RestParameter <$> (lexeme (string "...") *> identifier) <*> optionMaybe typeAnnotation ]
284
parameter = choice [ try $ RequiredOrOptionalParameter <$> optionMaybe publicOrPrivate <*> identifier <*> optionMaybe (lexeme (char '?' >> return Optional)) <*> optionMaybe typeAnnotation , RestParameter <$> (lexeme (string "...") *> identifier) <*> optionMaybe typeAnnotation ]
284
parameter = choice [ try $ RequiredOrOptionalParameter <$> optionMaybe publicOrPrivate <*> identifier <*> optionMaybe (lexeme (char '?' >> return Optional)) <*> optionMaybe typeAnnotation , RestParameter <$> (lexeme (string "...") *> identifier) <*> optionMaybe typeAnnotation ]
284
false
false
1
14
40
94
43
51
null
null
j-mueller/hldb
webapp/VirtualHom/Svg.hs
bsd-3-clause
makeSvgElem :: Text -> Element makeSvgElem tpe = elm tpe & namespace .~ "http://www.w3.org/2000/svg"
103
makeSvgElem :: Text -> Element makeSvgElem tpe = elm tpe & namespace .~ "http://www.w3.org/2000/svg"
103
makeSvgElem tpe = elm tpe & namespace .~ "http://www.w3.org/2000/svg"
72
false
true
2
5
16
30
14
16
null
null
brodyberg/Notes
ProjectRosalind.hsproj/LearnHaskell/lib/HaskellBook/AsPatternsChapter11.hs
mit
testMatchStart :: IO () testMatchStart = if isSubseqOf "blah" "blahwoot" then putStrLn "match start: pass" else putStrLn "match start: fail"
147
testMatchStart :: IO () testMatchStart = if isSubseqOf "blah" "blahwoot" then putStrLn "match start: pass" else putStrLn "match start: fail"
147
testMatchStart = if isSubseqOf "blah" "blahwoot" then putStrLn "match start: pass" else putStrLn "match start: fail"
123
false
true
0
7
26
41
18
23
null
null
acowley/roshask
src/Ros/Graph/Master.hs
bsd-3-clause
-- |Unregister the caller as a subscriber of the topic. Takes the URI -- of the master, the caller_id, the topic name, and the API URI of -- the subscriber to unregister. Returns zero if the caller was not -- registered as a subscriber. unregisterSubscriber :: URI -> String -> TopicName -> String -> ...
405
unregisterSubscriber :: URI -> String -> TopicName -> String -> IO (Int, String, Int) unregisterSubscriber = flip remote "unregisterSubscriber"
168
unregisterSubscriber = flip remote "unregisterSubscriber"
57
true
true
0
10
87
48
27
21
null
null
brendanhay/gogol
gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Product.hs
mpl-2.0
-- | The URL of the XML VAST for a native ad. Note this is a separate field -- from resource.video_url. cnataVideoURL :: Lens' CreativeNATiveAd (Maybe Text) cnataVideoURL = lens _cnataVideoURL (\ s a -> s{_cnataVideoURL = a})
233
cnataVideoURL :: Lens' CreativeNATiveAd (Maybe Text) cnataVideoURL = lens _cnataVideoURL (\ s a -> s{_cnataVideoURL = a})
129
cnataVideoURL = lens _cnataVideoURL (\ s a -> s{_cnataVideoURL = a})
76
true
true
1
9
45
53
26
27
null
null
mpwillson/mal
haskell/step2_eval.hs
mpl-2.0
repl_loop :: IO () repl_loop = do line <- readline "user> " case line of Nothing -> return () Just "" -> repl_loop Just str -> do res <- runErrorT $ rep str out <- case res of Left (StringError str) -> return $ "Error: " ++ str Left...
485
repl_loop :: IO () repl_loop = do line <- readline "user> " case line of Nothing -> return () Just "" -> repl_loop Just str -> do res <- runErrorT $ rep str out <- case res of Left (StringError str) -> return $ "Error: " ++ str Left...
485
repl_loop = do line <- readline "user> " case line of Nothing -> return () Just "" -> repl_loop Just str -> do res <- runErrorT $ rep str out <- case res of Left (StringError str) -> return $ "Error: " ++ str Left (MalValError mv) -...
466
false
true
0
18
208
166
74
92
null
null
mkaput/janus
spec/Language/Janus/TestUtil.hs
mit
shouldEvalThrow :: Evaluable a => a -> EvalError -> Expectation shouldEvalThrow ast err = run ast `shouldReturn` Left err
122
shouldEvalThrow :: Evaluable a => a -> EvalError -> Expectation shouldEvalThrow ast err = run ast `shouldReturn` Left err
122
shouldEvalThrow ast err = run ast `shouldReturn` Left err
58
false
true
0
7
19
43
21
22
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/RegionBackendServices/Insert.hs
mpl-2.0
-- | Name of the region scoping this request. rbsiRegion :: Lens' RegionBackendServicesInsert Text rbsiRegion = lens _rbsiRegion (\ s a -> s{_rbsiRegion = a})
160
rbsiRegion :: Lens' RegionBackendServicesInsert Text rbsiRegion = lens _rbsiRegion (\ s a -> s{_rbsiRegion = a})
114
rbsiRegion = lens _rbsiRegion (\ s a -> s{_rbsiRegion = a})
61
true
true
1
9
26
46
22
24
null
null
joris-r/labaskel
Parsing.hs
apache-2.0
opPred = [ "&" , "!" , "#" , "=>" , "<=>" ]
55
opPred = [ "&" , "!" , "#" , "=>" , "<=>" ]
55
opPred = [ "&" , "!" , "#" , "=>" , "<=>" ]
55
false
false
0
5
24
21
13
8
null
null
li-zhirui/EoplLangs
test/MutablePairs/EvaluatorSuite.hs
bsd-3-clause
testEq :: String -> ExpressedValue -> String -> Test testEq msg expect input = TestCase $ assertEqual msg (Right expect) evalRes where evalRes = case runParser expression "Test equal case" input of Right pRes -> evalStateT (valueOf pRes initEnv) initStore Left pError -> Left $ show pError
310
testEq :: String -> ExpressedValue -> String -> Test testEq msg expect input = TestCase $ assertEqual msg (Right expect) evalRes where evalRes = case runParser expression "Test equal case" input of Right pRes -> evalStateT (valueOf pRes initEnv) initStore Left pError -> Left $ show pError
310
testEq msg expect input = TestCase $ assertEqual msg (Right expect) evalRes where evalRes = case runParser expression "Test equal case" input of Right pRes -> evalStateT (valueOf pRes initEnv) initStore Left pError -> Left $ show pError
257
false
true
1
10
67
114
50
64
null
null
MostAwesomeDude/lollerskates
Handler/Champ.hs
bsd-2-clause
repack :: ChampParams -> (Champ, Level, [Item]) repack (ChampParams c l i1 i2 i3 i4 i5 i6) = (c, l, [i1,i2,i3,i4,i5,i6])
120
repack :: ChampParams -> (Champ, Level, [Item]) repack (ChampParams c l i1 i2 i3 i4 i5 i6) = (c, l, [i1,i2,i3,i4,i5,i6])
120
repack (ChampParams c l i1 i2 i3 i4 i5 i6) = (c, l, [i1,i2,i3,i4,i5,i6])
72
false
true
0
9
20
83
46
37
null
null