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
elliottt/dang
src/Dang/Message.hs
bsd-3-clause
mkWarning :: Warning -> SourceRange -> Doc -> Message mkWarning warn msgSource msgDoc = Message { msgType = Warning warn, .. }
126
mkWarning :: Warning -> SourceRange -> Doc -> Message mkWarning warn msgSource msgDoc = Message { msgType = Warning warn, .. }
126
mkWarning warn msgSource msgDoc = Message { msgType = Warning warn, .. }
72
false
true
0
8
21
50
24
26
null
null
xixi4Den/BSUIR-Haskell-lw2
src/CsvParser.hs
mit
filterFirstColumn :: ProgramOptions -> [String] -> [String] filterFirstColumn opts splittedStr = if (ignoreFirstCol opts) then tail splittedStr else splittedStr
168
filterFirstColumn :: ProgramOptions -> [String] -> [String] filterFirstColumn opts splittedStr = if (ignoreFirstCol opts) then tail splittedStr else splittedStr
168
filterFirstColumn opts splittedStr = if (ignoreFirstCol opts) then tail splittedStr else splittedStr
108
false
true
0
7
26
47
25
22
null
null
ksaveljev/brainfuck-hs
brainfuck.hs
mit
parseBF :: B.ByteString -> Either String BFProgram parseBF = A.parseOnly (parseBFProgram <* A.endOfInput)
105
parseBF :: B.ByteString -> Either String BFProgram parseBF = A.parseOnly (parseBFProgram <* A.endOfInput)
105
parseBF = A.parseOnly (parseBFProgram <* A.endOfInput)
54
false
true
0
8
12
36
18
18
null
null
alanz/Hs2010To201x
test/TransformSpec.hs
bsd-3-clause
compareStrings :: String -> String -> [Diff [String]] compareStrings astr bstr = filter (\c -> not( isBoth c)) $ getGroupedDiff (lines astr) (lines bstr) where isBoth (Both _ _) = True isBoth _ = False -- ---------------------------------------------------------------------
298
compareStrings :: String -> String -> [Diff [String]] compareStrings astr bstr = filter (\c -> not( isBoth c)) $ getGroupedDiff (lines astr) (lines bstr) where isBoth (Both _ _) = True isBoth _ = False -- ---------------------------------------------------------------------
298
compareStrings astr bstr = filter (\c -> not( isBoth c)) $ getGroupedDiff (lines astr) (lines bstr) where isBoth (Both _ _) = True isBoth _ = False -- ---------------------------------------------------------------------
244
false
true
0
11
60
101
51
50
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
tagOf_PrimOp ReadByteArrayOp_Word16 = _ILIT(210)
48
tagOf_PrimOp ReadByteArrayOp_Word16 = _ILIT(210)
48
tagOf_PrimOp ReadByteArrayOp_Word16 = _ILIT(210)
48
false
false
0
6
3
15
7
8
null
null
RefactoringTools/HaRe
test/RenamingSpec.hs
bsd-3-clause
spec :: Spec spec = do describe "Renaming" $ do it "renames in D1 B1 C1 A1 6 6" $ do r <- ct $ rename defaultTestSettings testOptions "./Renaming/D1.hs" "AnotherTree" (6,6) -- r <- ct $ rename logTestSettings testOptions "./Renaming/D1.hs" "AnotherTree" (6,6) r' <- ct $ mapM makeRelativeToCurrent...
30,119
spec :: Spec spec = do describe "Renaming" $ do it "renames in D1 B1 C1 A1 6 6" $ do r <- ct $ rename defaultTestSettings testOptions "./Renaming/D1.hs" "AnotherTree" (6,6) -- r <- ct $ rename logTestSettings testOptions "./Renaming/D1.hs" "AnotherTree" (6,6) r' <- ct $ mapM makeRelativeToCurrent...
30,119
spec = do describe "Renaming" $ do it "renames in D1 B1 C1 A1 6 6" $ do r <- ct $ rename defaultTestSettings testOptions "./Renaming/D1.hs" "AnotherTree" (6,6) -- r <- ct $ rename logTestSettings testOptions "./Renaming/D1.hs" "AnotherTree" (6,6) r' <- ct $ mapM makeRelativeToCurrentDirectory r ...
30,106
false
true
0
21
7,465
4,475
2,223
2,252
null
null
rfranek/duckling
Duckling/Numeral/AR/Rules.hs
bsd-3-clause
ruleInteger5 :: Rule ruleInteger5 = Rule { name = "integer 4" , pattern = [ regex "(\x0623\x0631\x0628\x0639(\x0629)?)" ] , prod = \_ -> integer 4 }
164
ruleInteger5 :: Rule ruleInteger5 = Rule { name = "integer 4" , pattern = [ regex "(\x0623\x0631\x0628\x0639(\x0629)?)" ] , prod = \_ -> integer 4 }
164
ruleInteger5 = Rule { name = "integer 4" , pattern = [ regex "(\x0623\x0631\x0628\x0639(\x0629)?)" ] , prod = \_ -> integer 4 }
143
false
true
0
9
41
49
27
22
null
null
ppelleti/lifx-table-scraper
Main.hs
bsd-3-clause
extractJson :: String -> Either String String extractJson s = unlines <$> snipLines (lines s) where snipLines (x:xs) = do let y = init xs z = last xs expectx = "[block:parameters]" expectz = "[/block]" unless (x == expectx) $ Left $ "got '" ++ ...
486
extractJson :: String -> Either String String extractJson s = unlines <$> snipLines (lines s) where snipLines (x:xs) = do let y = init xs z = last xs expectx = "[block:parameters]" expectz = "[/block]" unless (x == expectx) $ Left $ "got '" ++ ...
486
extractJson s = unlines <$> snipLines (lines s) where snipLines (x:xs) = do let y = init xs z = last xs expectx = "[block:parameters]" expectz = "[/block]" unless (x == expectx) $ Left $ "got '" ++ x ++ "' but expected '" ++ expectx ++ "'" ...
440
false
true
2
16
184
171
80
91
null
null
christiaanb/cabal
cabal-install/Distribution/Client/Init.hs
bsd-3-clause
generateCabalFile :: String -> InitFlags -> String generateCabalFile fileName c = (++ "\n") . renderStyle style { lineLength = 79, ribbonsPerLine = 1.1 } $ (if minimal c /= Flag True then showComment (Just $ "Initial " ++ fileName ++ " generated by cabal " ++ "init. For further docu...
6,812
generateCabalFile :: String -> InitFlags -> String generateCabalFile fileName c = (++ "\n") . renderStyle style { lineLength = 79, ribbonsPerLine = 1.1 } $ (if minimal c /= Flag True then showComment (Just $ "Initial " ++ fileName ++ " generated by cabal " ++ "init. For further docu...
6,812
generateCabalFile fileName c = (++ "\n") . renderStyle style { lineLength = 79, ribbonsPerLine = 1.1 } $ (if minimal c /= Flag True then showComment (Just $ "Initial " ++ fileName ++ " generated by cabal " ++ "init. For further documentation, see " ++ "http...
6,761
false
true
28
18
2,742
1,663
802
861
null
null
fmapfmapfmap/amazonka
amazonka-glacier/gen/Network/AWS/Glacier/GetVaultNotifications.hs
mpl-2.0
-- | The 'AccountId' value is the AWS account ID of the account that owns the -- vault. You can either specify an AWS account ID or optionally a single -- apos'-'apos (hyphen), in which case Amazon Glacier uses the AWS account -- ID associated with the credentials used to sign the request. If you use -- an account ID, ...
484
gvnAccountId :: Lens' GetVaultNotifications Text gvnAccountId = lens _gvnAccountId (\ s a -> s{_gvnAccountId = a})
114
gvnAccountId = lens _gvnAccountId (\ s a -> s{_gvnAccountId = a})
65
true
true
1
9
84
49
26
23
null
null
Lignumm/LambdaCraft
asm/src/Instruction.hs
mit
parseInst :: String -> Inst parseInst name | i == "nop" = Nop | i == "push" = Push | i == "pop" = Pop | i == "add" = Add | i == "sub" = Sub | i == "mul" = Mul | i == "div" = Div | i == "mod" = Mod | i == "jmp" = Jmp | i == "poke" = Poke | i == "peek" = Peek | i == "fget" ...
594
parseInst :: String -> Inst parseInst name | i == "nop" = Nop | i == "push" = Push | i == "pop" = Pop | i == "add" = Add | i == "sub" = Sub | i == "mul" = Mul | i == "div" = Div | i == "mod" = Mod | i == "jmp" = Jmp | i == "poke" = Poke | i == "peek" = Peek | i == "fget" ...
594
parseInst name | i == "nop" = Nop | i == "push" = Push | i == "pop" = Pop | i == "add" = Add | i == "sub" = Sub | i == "mul" = Mul | i == "div" = Div | i == "mod" = Mod | i == "jmp" = Jmp | i == "poke" = Poke | i == "peek" = Peek | i == "fget" = Fget | i == "fset" = F...
566
false
true
1
8
234
348
163
185
null
null
mainland/nikola
src/Data/Vector/UnboxedForeign.hs
bsd-3-clause
enumFromTo = G.enumFromTo
25
enumFromTo = G.enumFromTo
25
enumFromTo = G.enumFromTo
25
false
false
0
5
2
8
4
4
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_QUAD_LUMINANCE4_SGIS :: GLenum gl_QUAD_LUMINANCE4_SGIS = 0x8120
66
gl_QUAD_LUMINANCE4_SGIS :: GLenum gl_QUAD_LUMINANCE4_SGIS = 0x8120
66
gl_QUAD_LUMINANCE4_SGIS = 0x8120
32
false
true
0
4
5
11
6
5
null
null
dmcclean/dimensional-dk
src/Numeric/Units/Dimensional/SIUnits.hs
bsd-3-clause
{- $multiples Prefixes are used to form decimal multiples and submultiples of SI Units as described in section 4.4. We will define the SI prefixes in terms of the 'prefix' function which applies a scale factor to a unit. By defining SI prefixes as functions applied to a 'Unit' we satisfy section 6.2.6 "Unacceptability...
713
applyMultiple :: (Num a) => Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a applyMultiple p u | denominator x == 1 = mkUnitZ n' (numerator x) u | otherwise = error "Attempt to apply a submultiple prefix as a multiple." where n' = N.applyPrefix p (name u) x = N.scaleFactor p
304
applyMultiple p u | denominator x == 1 = mkUnitZ n' (numerator x) u | otherwise = error "Attempt to apply a submultiple prefix as a multiple." where n' = N.applyPrefix p (name u) x = N.scaleFactor p
226
true
true
2
9
152
127
57
70
null
null
Heather/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
highestFC (PTrue fc _) = Just fc
43
highestFC (PTrue fc _) = Just fc
43
highestFC (PTrue fc _) = Just fc
43
false
false
0
7
17
20
9
11
null
null
dmjio/unagi-streams
src/System/IO/Streams/Concurrent/Unagi/Bounded.hs
bsd-3-clause
-------------------------------------------------------------------------------- -- | Create a new input stream duplicated from the 'InChan' -- dupStream :: InChan (Maybe a) -> IO (InputStream a) dupStream = dupChan >=> chanToInput
231
dupStream :: InChan (Maybe a) -> IO (InputStream a) dupStream = dupChan >=> chanToInput
87
dupStream = dupChan >=> chanToInput
35
true
true
0
8
26
40
21
19
null
null
facebookarchive/lex-pass
src/Lang/Php/Transf.hs
bsd-3-clause
onWSCap1 :: (WS -> WS) -> WSCap a -> WSCap a onWSCap1 f (WSCap w1 a w2) = WSCap (f w1) a w2
91
onWSCap1 :: (WS -> WS) -> WSCap a -> WSCap a onWSCap1 f (WSCap w1 a w2) = WSCap (f w1) a w2
91
onWSCap1 f (WSCap w1 a w2) = WSCap (f w1) a w2
46
false
true
0
7
22
60
29
31
null
null
apyrgio/snf-ganeti
src/Ganeti/Constants.hs
bsd-2-clause
idiskSize :: String idiskSize = "size"
38
idiskSize :: String idiskSize = "size"
38
idiskSize = "size"
18
false
true
0
4
5
11
6
5
null
null
arnizamani/aiw
Instances.hs
gpl-2.0
containsVar :: Exp -> Bool containsVar e = case e of Var _ -> True Root _ -> False Unary (OVar _) _ -> True Unary _ e -> containsVar e Binary (OVar _) _ _ -> True Binary _ e f -> containsVar e || containsVar f
249
containsVar :: Exp -> Bool containsVar e = case e of Var _ -> True Root _ -> False Unary (OVar _) _ -> True Unary _ e -> containsVar e Binary (OVar _) _ _ -> True Binary _ e f -> containsVar e || containsVar f
249
containsVar e = case e of Var _ -> True Root _ -> False Unary (OVar _) _ -> True Unary _ e -> containsVar e Binary (OVar _) _ _ -> True Binary _ e f -> containsVar e || containsVar f
222
false
true
0
10
87
118
53
65
null
null
facebookincubator/duckling
Duckling/Time/IT/Rules.hs
bsd-3-clause
ruleToday :: Rule ruleToday = Rule { name = "today" , pattern = [ regex "(di )?oggi|in giornata" ] , prod = \_ -> tt today }
140
ruleToday :: Rule ruleToday = Rule { name = "today" , pattern = [ regex "(di )?oggi|in giornata" ] , prod = \_ -> tt today }
140
ruleToday = Rule { name = "today" , pattern = [ regex "(di )?oggi|in giornata" ] , prod = \_ -> tt today }
122
false
true
0
9
42
49
27
22
null
null
vzaccaria/bddtool
src/Backend/InductiveGraph/Proto1.hs
bsd-3-clause
v1 = s1 .& m1 .+ m2
19
v1 = s1 .& m1 .+ m2
19
v1 = s1 .& m1 .+ m2
19
false
false
0
6
6
14
7
7
null
null
Potregon/while
src/Helper/List.hs
gpl-3.0
atMost n (_:ys) = atMost (n-1) ys
33
atMost n (_:ys) = atMost (n-1) ys
33
atMost n (_:ys) = atMost (n-1) ys
33
false
false
0
7
6
30
15
15
null
null
m-alvarez/jhc
src/Util/UnionSolve.hs
mit
equals (Left v1) (Left v2) = C (S.singleton (CV v1 OpEq v2))
62
equals (Left v1) (Left v2) = C (S.singleton (CV v1 OpEq v2))
62
equals (Left v1) (Left v2) = C (S.singleton (CV v1 OpEq v2))
62
false
false
0
9
13
44
21
23
null
null
remyoudompheng/hs-language-go
Language/Go/Parser/Parser.hs
gpl-3.0
goImportSpec :: GoParser [GoImpSpec] goImportSpec = goImpSpecs'' <|> goImpSpecs' where goImpSpecs' = liftM (replicate 1) goImpSpec goImpSpecs'' = goParen $ many $ goSemi goImpSpec goImpSpec :: GoParser GoImpSpec goImpSpec = do ty <- try goImpType ip <- goString -- Go @ImportPath@ ret...
609
goImportSpec :: GoParser [GoImpSpec] goImportSpec = goImpSpecs'' <|> goImpSpecs' where goImpSpecs' = liftM (replicate 1) goImpSpec goImpSpecs'' = goParen $ many $ goSemi goImpSpec goImpSpec :: GoParser GoImpSpec goImpSpec = do ty <- try goImpType ip <- goString -- Go @ImportPath@ ret...
609
goImportSpec = goImpSpecs'' <|> goImpSpecs' where goImpSpecs' = liftM (replicate 1) goImpSpec goImpSpecs'' = goParen $ many $ goSemi goImpSpec goImpSpec :: GoParser GoImpSpec goImpSpec = do ty <- try goImpType ip <- goString -- Go @ImportPath@ return $ GoImpSpec ty ip goImpType ...
572
false
true
0
12
154
176
89
87
null
null
Muzietto/transformerz
haskell/faust-stack/test/Faust/FaustSpec.hs
mit
-- Expressions for exercises -- var xxxx, yyyy watIsXxxx = Var "xxxx"
73
watIsXxxx = Var "xxxx"
22
watIsXxxx = Var "xxxx"
22
true
false
0
5
15
11
6
5
null
null
kwibus/myLang
src/Lexer.hs
bsd-3-clause
reservedWords :: [ReservedWord] reservedWords = [minBound .. maxBound]
70
reservedWords :: [ReservedWord] reservedWords = [minBound .. maxBound]
70
reservedWords = [minBound .. maxBound]
38
false
true
0
5
7
20
12
8
null
null
Daniel-Diaz/post-mess-age
Control/Concurrent/PostMessAge.hs
bsd-3-clause
- | Passer object feeder loop. feedHandle :: (handle -> msg -> IO ()) -> Passer handle msg -> IO () feedHandle f p = loop where ch = passerChannel p h = passerHandle p loop = do mx <- readChan ch case mx of Nothing -> return () Just x -> f h x >> loop -- | Check if a passer ob...
482
feedHandle :: (handle -> msg -> IO ()) -> Passer handle msg -> IO () feedHandle f p = loop where ch = passerChannel p h = passerHandle p loop = do mx <- readChan ch case mx of Nothing -> return () Just x -> f h x >> loop -- | Check if a passer object is closed. When a passer o...
450
feedHandle f p = loop where ch = passerChannel p h = passerHandle p loop = do mx <- readChan ch case mx of Nothing -> return () Just x -> f h x >> loop -- | Check if a passer object is closed. When a passer object -- is closed, it won't send any more messages to its attached...
381
true
true
6
11
140
150
67
83
null
null
green-haskell/ghc
compiler/stgSyn/CoreToStg.hs
bsd-3-clause
-- The Var is so we can gather up the free variables -- as a set. -- -- The HowBound info just saves repeated lookups; -- we look up just once when we encounter the occurrence. -- INVARIANT: Any ImportBound Ids are HaveCafRef Ids -- Imported Ids without CAF ref...
1,203
emptyFVInfo :: FreeVarsInfo emptyFVInfo = emptyVarEnv
53
emptyFVInfo = emptyVarEnv
25
true
true
0
6
389
42
31
11
null
null
robstewart57/ripl
src/Inference/BitWidth.hs
bsd-3-clause
-- | returns the worst case bit width for the two expressions -- combined with the given arithmetic operator. operatorBitWidthBinary :: VarInfo -> R.Exp -> R.Exp -> (Int -> Int -> t) -> t operatorBitWidthBinary dfGraph e1 e2 o...
471
operatorBitWidthBinary :: VarInfo -> R.Exp -> R.Exp -> (Int -> Int -> t) -> t operatorBitWidthBinary dfGraph e1 e2 op = let e1BitWidth = bitwidth dfGraph e1 e2BitWidth = bitwidth dfGraph e2 worstCaseType = (e1BitWi...
359
operatorBitWidthBinary dfGraph e1 e2 op = let e1BitWidth = bitwidth dfGraph e1 e2BitWidth = bitwidth dfGraph e2 worstCaseType = (e1BitWidth `op` e2BitWidth) in worstCaseType
189
true
true
0
11
167
93
49
44
null
null
twittner/zeromq-haskell
src/System/ZMQ4.hs
mit
setDelayAttachOnConnect :: Bool -> Socket a -> IO () setDelayAttachOnConnect x s = setIntOpt s B.delayAttachOnConnect (bool2cint x)
131
setDelayAttachOnConnect :: Bool -> Socket a -> IO () setDelayAttachOnConnect x s = setIntOpt s B.delayAttachOnConnect (bool2cint x)
131
setDelayAttachOnConnect x s = setIntOpt s B.delayAttachOnConnect (bool2cint x)
78
false
true
0
8
17
51
23
28
null
null
arnizamani/occam
occam.hs
mit
langUnits _ _ = []
18
langUnits _ _ = []
18
langUnits _ _ = []
18
false
false
0
5
4
13
6
7
null
null
jcollard/unm-hip
Data/Image/Binary.hs
gpl-3.0
neighbors :: VM.STVector s Double -> Int -> Int -> Int -> Int -> ST s [Double] neighbors labels rows cols r c = do let n' = neighbor labels rows cols center <- n' r c north <- n' (r-1) c ne <- n' (r-1) (c+1) east <- n' r (c+1) se <- n' (r+1) (c+1) south <- n' (r+1) c sw <- n' (r+1) (c-1) west <- n' r ...
423
neighbors :: VM.STVector s Double -> Int -> Int -> Int -> Int -> ST s [Double] neighbors labels rows cols r c = do let n' = neighbor labels rows cols center <- n' r c north <- n' (r-1) c ne <- n' (r-1) (c+1) east <- n' r (c+1) se <- n' (r+1) (c+1) south <- n' (r+1) c sw <- n' (r+1) (c-1) west <- n' r ...
423
neighbors labels rows cols r c = do let n' = neighbor labels rows cols center <- n' r c north <- n' (r-1) c ne <- n' (r-1) (c+1) east <- n' r (c+1) se <- n' (r+1) (c+1) south <- n' (r+1) c sw <- n' (r+1) (c-1) west <- n' r (c-1) nw <- n' (r-1) (c-1) return $ filter (> 0) [center, north, ne, east, ...
344
false
true
0
11
112
308
154
154
null
null
kulshrax/haskml
src/Selectors.hs
mit
prev :: HtmlZipper -> Maybe HtmlZipper prev (HZ _ ((HH _ [] _):_)) = Nothing
76
prev :: HtmlZipper -> Maybe HtmlZipper prev (HZ _ ((HH _ [] _):_)) = Nothing
76
prev (HZ _ ((HH _ [] _):_)) = Nothing
37
false
true
0
14
14
53
25
28
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Text/Greek/Script/Abstract.hs
mit
toLetterCaseFinal Concrete.C_π = (L_π, Lowercase, FinalNotSupported)
68
toLetterCaseFinal Concrete.C_π = (L_π, Lowercase, FinalNotSupported)
68
toLetterCaseFinal Concrete.C_π = (L_π, Lowercase, FinalNotSupported)
68
false
false
0
6
5
25
13
12
null
null
romanb/amazonka
amazonka-directconnect/gen/Network/AWS/DirectConnect/AllocatePrivateVirtualInterface.hs
mpl-2.0
-- | 'AllocatePrivateVirtualInterfaceResponse' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'apvirAmazonAddress' @::@ 'Maybe' 'Text' -- -- * 'apvirAsn' @::@ 'Maybe' 'Int' -- -- * 'apvirAuthKey' @::@ 'Maybe' 'Text' -- -- * 'apvirConnectionId' @::@ 'Maybe' 'Text' -- -- * 'apvirCustom...
1,724
allocatePrivateVirtualInterfaceResponse :: AllocatePrivateVirtualInterfaceResponse allocatePrivateVirtualInterfaceResponse = AllocatePrivateVirtualInterfaceResponse { _apvirOwnerAccount = Nothing , _apvirVirtualInterfaceId = Nothing , _apvirLocation = Nothing , _apvirConnectionI...
829
allocatePrivateVirtualInterfaceResponse = AllocatePrivateVirtualInterfaceResponse { _apvirOwnerAccount = Nothing , _apvirVirtualInterfaceId = Nothing , _apvirLocation = Nothing , _apvirConnectionId = Nothing , _apvirVirtualInterfaceType = Nothing , _apvirVirtua...
746
true
true
0
7
355
141
102
39
null
null
ChristopherBiscardi/snaplet-haxl
haxl-snaplet-example/src/Site.hs
bsd-3-clause
------------------------------------------------------------------------------ -- | The application's routes. routes :: [(ByteString, Handler App App ())] routes = [("", serveDirectory "static") ,("testhaxl", with haxl $ haxlHandler)]
253
routes :: [(ByteString, Handler App App ())] routes = [("", serveDirectory "static") ,("testhaxl", with haxl $ haxlHandler)]
143
routes = [("", serveDirectory "static") ,("testhaxl", with haxl $ haxlHandler)]
98
true
true
0
8
41
59
34
25
null
null
kishoredbn/barrelfish
tools/flounder/BackendCommon.hs
mit
connect_callback_name n = ifscope n "connect_fn"
48
connect_callback_name n = ifscope n "connect_fn"
48
connect_callback_name n = ifscope n "connect_fn"
48
false
false
1
5
5
17
6
11
null
null
verement/etamoo
src/MOO/List.hs
bsd-3-clause
snoc :: MOOList -> Value -> MOOList snoc lst = fromVector . V.snoc (toVector lst)
81
snoc :: MOOList -> Value -> MOOList snoc lst = fromVector . V.snoc (toVector lst)
81
snoc lst = fromVector . V.snoc (toVector lst)
45
false
true
0
8
14
40
19
21
null
null
glutamate/cmdtheline
src/System/Console/CmdTheLine/Term.hs
mit
fromErr :: Err a -> EvalErr a fromErr = mapErrorT . fmap $ either (Left . fromFail) Right
89
fromErr :: Err a -> EvalErr a fromErr = mapErrorT . fmap $ either (Left . fromFail) Right
89
fromErr = mapErrorT . fmap $ either (Left . fromFail) Right
59
false
true
0
8
17
41
20
21
null
null
green-haskell/ghc
compiler/basicTypes/BasicTypes.hs
bsd-3-clause
inlinePragmaActivation :: InlinePragma -> Activation inlinePragmaActivation (InlinePragma { inl_act = activation }) = activation
128
inlinePragmaActivation :: InlinePragma -> Activation inlinePragmaActivation (InlinePragma { inl_act = activation }) = activation
128
inlinePragmaActivation (InlinePragma { inl_act = activation }) = activation
75
false
true
0
9
13
30
16
14
null
null
lamdu/lamdu
src/Lamdu/Eval/Manager.hs
gpl-3.0
runViewTransactionInIO :: MVar (Maybe (Transaction.Store DbM)) -> T ViewM a -> IO a runViewTransactionInIO dbM trans = withDb dbM $ \db -> DbLayout.runDbTransaction db (VersionControl.runAction trans)
208
runViewTransactionInIO :: MVar (Maybe (Transaction.Store DbM)) -> T ViewM a -> IO a runViewTransactionInIO dbM trans = withDb dbM $ \db -> DbLayout.runDbTransaction db (VersionControl.runAction trans)
208
runViewTransactionInIO dbM trans = withDb dbM $ \db -> DbLayout.runDbTransaction db (VersionControl.runAction trans)
124
false
true
0
11
33
76
36
40
null
null
tabemann/amphibian
src/Network/IRC/Client/Amphibian/IRCConnection.hs
bsd-3-clause
ircConnectionEventOfConnectionEvent ReverseLookupCanceled = IRCReverseLookupCanceled
86
ircConnectionEventOfConnectionEvent ReverseLookupCanceled = IRCReverseLookupCanceled
86
ircConnectionEventOfConnectionEvent ReverseLookupCanceled = IRCReverseLookupCanceled
86
false
false
0
5
5
9
4
5
null
null
vincenthz/tvm
tvm.hs
bsd-3-clause
doGetQemu cfg ("qemuDrives":index:xs) = doGetQemuDrive ((qemuDrives cfg)!!(read index)) xs where doGetQemuDrive driveCfg ["diskFile"] = show $ diskFile driveCfg doGetQemuDrive driveCfg ["diskInterface"] = show $ diskInterface driveCfg doGetQemuDrive driveCfg ["diskMedia"] = show $ d...
407
doGetQemu cfg ("qemuDrives":index:xs) = doGetQemuDrive ((qemuDrives cfg)!!(read index)) xs where doGetQemuDrive driveCfg ["diskFile"] = show $ diskFile driveCfg doGetQemuDrive driveCfg ["diskInterface"] = show $ diskInterface driveCfg doGetQemuDrive driveCfg ["diskMedia"] = show $ d...
407
doGetQemu cfg ("qemuDrives":index:xs) = doGetQemuDrive ((qemuDrives cfg)!!(read index)) xs where doGetQemuDrive driveCfg ["diskFile"] = show $ diskFile driveCfg doGetQemuDrive driveCfg ["diskInterface"] = show $ diskInterface driveCfg doGetQemuDrive driveCfg ["diskMedia"] = show $ d...
407
false
false
3
9
106
118
59
59
null
null
nevrenato/Hets_Fork
CSL/AS_BASIC_CSL.hs
gpl-2.0
lookupOpInfoForParsing :: OpInfoMap -- ^ map to be used for lookup -> String -- ^ operator name -> Int -- ^ operator arity -> Either Bool OpInfo lookupOpInfoForParsing oiMap op arit = case Map.lookup op oiMap of Just oim -> case Map.lookup arit oim of ...
693
lookupOpInfoForParsing :: OpInfoMap -- ^ map to be used for lookup -> String -- ^ operator name -> Int -- ^ operator arity -> Either Bool OpInfo lookupOpInfoForParsing oiMap op arit = case Map.lookup op oiMap of Just oim -> case Map.lookup arit oim of ...
693
lookupOpInfoForParsing oiMap op arit = case Map.lookup op oiMap of Just oim -> case Map.lookup arit oim of Just x -> Right x Nothing -> case Map.lookup (-1) oim of Just x -> Right x _ -> Left True _ -> Left False -- |...
509
false
true
0
14
248
140
67
73
null
null
comonoidial/ALFIN
Backend/OptimizeAsm.hs
mit
reachFunB :: AsmBlock -> [FName] reachFunB (AsmBlock xs t) = concatMap reachFunS xs ++ reachFunT t
98
reachFunB :: AsmBlock -> [FName] reachFunB (AsmBlock xs t) = concatMap reachFunS xs ++ reachFunT t
98
reachFunB (AsmBlock xs t) = concatMap reachFunS xs ++ reachFunT t
65
false
true
0
6
15
45
21
24
null
null
giorgidze/Hydra
src/Hydra/Stages/ToLLVM.hs
bsd-3-clause
voidPointerType :: LLVM.TypeRef voidPointerType = LLVM.pointerType LLVM.int8Type 0
82
voidPointerType :: LLVM.TypeRef voidPointerType = LLVM.pointerType LLVM.int8Type 0
82
voidPointerType = LLVM.pointerType LLVM.int8Type 0
50
false
true
0
7
7
28
12
16
null
null
ulricha/dsh-sql
src/Database/DSH/Backend/Sql/MultisetAlgebra/Dot.hs
bsd-3-clause
bracketList :: (a -> Doc) -> [a] -> Doc bracketList f = brackets . hsep . punctuate comma . map f
97
bracketList :: (a -> Doc) -> [a] -> Doc bracketList f = brackets . hsep . punctuate comma . map f
97
bracketList f = brackets . hsep . punctuate comma . map f
57
false
true
0
7
20
50
25
25
null
null
pasberth/paradocs
Language/Paradocs/Token.hs
mit
isQuote1 :: Token a -> Bool isQuote1 (Token Quote1 _) = True
62
isQuote1 :: Token a -> Bool isQuote1 (Token Quote1 _) = True
62
isQuote1 (Token Quote1 _) = True
34
false
true
0
7
13
29
14
15
null
null
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/UI/Button.hs
mit
buttonSetRepeatDelay :: (Parent Button a, Pointer ptr a, MonadIO m) => ptr -- ^ Pointer to button or ascentor -> Float -- ^ delay -> m () buttonSetRepeatDelay p d = liftIO $ do let ptr = parentPointer p d' = realToFrac d [C.exp| void {$(Button* ptr)->SetRepeatDelay($(float d'))} |] -- | Set repeat rate...
356
buttonSetRepeatDelay :: (Parent Button a, Pointer ptr a, MonadIO m) => ptr -- ^ Pointer to button or ascentor -> Float -- ^ delay -> m () buttonSetRepeatDelay p d = liftIO $ do let ptr = parentPointer p d' = realToFrac d [C.exp| void {$(Button* ptr)->SetRepeatDelay($(float d'))} |] -- | Set repeat rate...
356
buttonSetRepeatDelay p d = liftIO $ do let ptr = parentPointer p d' = realToFrac d [C.exp| void {$(Button* ptr)->SetRepeatDelay($(float d'))} |] -- | Set repeat rate. -- void SetRepeatRate(float rate);
212
false
true
0
11
74
92
48
44
null
null
ocus/TinyASM_Haskell
library/TinyASM/Instruction.hs
bsd-3-clause
toByteCode (Or (Address a) (Literal b)) = BC3 0x03 a b
56
toByteCode (Or (Address a) (Literal b)) = BC3 0x03 a b
56
toByteCode (Or (Address a) (Literal b)) = BC3 0x03 a b
56
false
false
0
9
12
36
17
19
null
null
tsujigiri/gosh
src/ColorCodes.hs
mit
fgLightWhite :: String fgLightWhite = esc "97"
46
fgLightWhite :: String fgLightWhite = esc "97"
46
fgLightWhite = esc "97"
23
false
true
0
5
6
14
7
7
null
null
vinnymac/glot-www
Widget/Languages.hs
mit
languagesWidget :: Maybe Text -> Widget languagesWidget mTitle = $(widgetFile "widgets/languages")
102
languagesWidget :: Maybe Text -> Widget languagesWidget mTitle = $(widgetFile "widgets/languages")
102
languagesWidget mTitle = $(widgetFile "widgets/languages")
62
false
true
0
8
14
34
14
20
null
null
jtdaugherty/mix-assembler
src/MIX/Assembler/IO.hs
bsd-3-clause
readProgram :: Handle -> IO (Either String Program) readProgram h = decode <$> BS.hGetContents h
96
readProgram :: Handle -> IO (Either String Program) readProgram h = decode <$> BS.hGetContents h
96
readProgram h = decode <$> BS.hGetContents h
44
false
true
0
8
14
38
18
20
null
null
cblp/hindent
src/HIndent/Pretty.hs
bsd-3-clause
prettyTopName :: Name NodeInfo -> Printer () prettyTopName x@Ident{} = pretty x
79
prettyTopName :: Name NodeInfo -> Printer () prettyTopName x@Ident{} = pretty x
79
prettyTopName x@Ident{} = pretty x
34
false
true
0
7
11
36
17
19
null
null
tolysz/prepare-ghcjs
spec-lts8/base/GHC/IO/Handle.hs
bsd-3-clause
hDuplicateTo :: Handle -> Handle -> IO () hDuplicateTo h1@(FileHandle path m1) h2@(FileHandle _ m2) = do withHandle__' "hDuplicateTo" h2 m2 $ \h2_ -> do _ <- hClose_help h2_ withHandle_' "hDuplicateTo" h1 m1 $ \h1_ -> do dupHandleTo path h1 Nothing h2_ h1_ (Just handleFinalizer)
292
hDuplicateTo :: Handle -> Handle -> IO () hDuplicateTo h1@(FileHandle path m1) h2@(FileHandle _ m2) = do withHandle__' "hDuplicateTo" h2 m2 $ \h2_ -> do _ <- hClose_help h2_ withHandle_' "hDuplicateTo" h1 m1 $ \h1_ -> do dupHandleTo path h1 Nothing h2_ h1_ (Just handleFinalizer)
292
hDuplicateTo h1@(FileHandle path m1) h2@(FileHandle _ m2) = do withHandle__' "hDuplicateTo" h2 m2 $ \h2_ -> do _ <- hClose_help h2_ withHandle_' "hDuplicateTo" h1 m1 $ \h1_ -> do dupHandleTo path h1 Nothing h2_ h1_ (Just handleFinalizer)
250
false
true
10
7
57
112
59
53
null
null
ekmett/objective-c
Objective/C/Protocol.hs
bsd-3-clause
copyProtocols :: (Ptr CInt -> IO (Ptr Protocol)) -> IO [Protocol] copyProtocols f = alloca $ \p -> do ps <- f p count <- peek p xs <- forM [0..fromIntegral count-1] $ peekElemOff ps free ps return xs
209
copyProtocols :: (Ptr CInt -> IO (Ptr Protocol)) -> IO [Protocol] copyProtocols f = alloca $ \p -> do ps <- f p count <- peek p xs <- forM [0..fromIntegral count-1] $ peekElemOff ps free ps return xs
209
copyProtocols f = alloca $ \p -> do ps <- f p count <- peek p xs <- forM [0..fromIntegral count-1] $ peekElemOff ps free ps return xs
143
false
true
0
14
48
113
51
62
null
null
mbakke/ganeti
src/Ganeti/WConfd/TempRes.hs
bsd-2-clause
generateRand :: (MonadError GanetiException m, Show a, Ord a, Ord j, RandomGen g) => g -> j -> S.Set a -> (g -> (Maybe a, g)) -> TempRes j a -> m (a, TempRes j a) generateRand rgen jobid existing genfn tr = evalStateT (generate jobid existing (state genfn) tr) rgen
273
generateRand :: (MonadError GanetiException m, Show a, Ord a, Ord j, RandomGen g) => g -> j -> S.Set a -> (g -> (Maybe a, g)) -> TempRes j a -> m (a, TempRes j a) generateRand rgen jobid existing genfn tr = evalStateT (generate jobid existing (state genfn) tr) rgen
273
generateRand rgen jobid existing genfn tr = evalStateT (generate jobid existing (state genfn) tr) rgen
104
false
true
0
14
58
144
71
73
null
null
HakeIO/hake-solver
tests/UnitTests.hs
bsd-3-clause
solve :: [TestPackageName] -> [TestPackage] -> IO (Maybe InstallPlan) solve targets available = do env <- Z3.newEnv Nothing stdOpts (x, _) <- runHakeSolverT st env $ do _ <- getInstallationPlan (Platform X86_64 Linux) (CompilerId GHC $ simpleVersion 7) Set.empty ...
854
solve :: [TestPackageName] -> [TestPackage] -> IO (Maybe InstallPlan) solve targets available = do env <- Z3.newEnv Nothing stdOpts (x, _) <- runHakeSolverT st env $ do _ <- getInstallationPlan (Platform X86_64 Linux) (CompilerId GHC $ simpleVersion 7) Set.empty ...
854
solve targets available = do env <- Z3.newEnv Nothing stdOpts (x, _) <- runHakeSolverT st env $ do _ <- getInstallationPlan (Platform X86_64 Linux) (CompilerId GHC $ simpleVersion 7) Set.empty Map.empty targetMap getResults ...
784
false
true
1
15
247
262
129
133
null
null
dmoverton/finite-domain
src/Domain.hs
mit
singleton :: Int -> Domain singleton x = Set (IntSet.singleton x)
65
singleton :: Int -> Domain singleton x = Set (IntSet.singleton x)
65
singleton x = Set (IntSet.singleton x)
38
false
true
0
8
10
35
15
20
null
null
li-zhirui/EoplLangs
test/InferredLang/EvaluatorSuite.hs
bsd-3-clause
testProc :: Test testProc = TestList [ testEq "Eval proc and call expression (no parameter)" (ExprNum 1) "(proc () 1)" , testEq "Eval proc and call expression (1 parameter)" (ExprNum 2) "(proc (x: int) + (x, x) 1)" , testEq "Eval proc and call expression (many parameter...
672
testProc :: Test testProc = TestList [ testEq "Eval proc and call expression (no parameter)" (ExprNum 1) "(proc () 1)" , testEq "Eval proc and call expression (1 parameter)" (ExprNum 2) "(proc (x: int) + (x, x) 1)" , testEq "Eval proc and call expression (many parameter...
672
testProc = TestList [ testEq "Eval proc and call expression (no parameter)" (ExprNum 1) "(proc () 1)" , testEq "Eval proc and call expression (1 parameter)" (ExprNum 2) "(proc (x: int) + (x, x) 1)" , testEq "Eval proc and call expression (many parameters)" (E...
655
false
true
0
8
215
94
47
47
null
null
dmeysman/tiny-compiler
src/Language/Tiny/Synthesis/X86.hs
mit
clearLocals :: State.State (Map.Map SymbolTableEntry Int, Map.Map SymbolTableEntry String, Map.Map Operand Int, Int, Map.Map Operand Int, Int, String, String, String) () clearLocals = do (arrays, globals, parameters, parameterOffset, _, _, data', bss, x86) <- State.get State.put (arrays, globals, parameters, ...
368
clearLocals :: State.State (Map.Map SymbolTableEntry Int, Map.Map SymbolTableEntry String, Map.Map Operand Int, Int, Map.Map Operand Int, Int, String, String, String) () clearLocals = do (arrays, globals, parameters, parameterOffset, _, _, data', bss, x86) <- State.get State.put (arrays, globals, parameters, ...
368
clearLocals = do (arrays, globals, parameters, parameterOffset, _, _, data', bss, x86) <- State.get State.put (arrays, globals, parameters, parameterOffset, Map.empty, -4, data', bss, x86)
198
false
true
1
10
54
154
85
69
null
null
wavewave/madgraph-auto-model
src/HEP/Automation/MadGraph/Model/WpZpFull.hs
bsd-2-clause
gammaWpZpFullBelowTopMass :: Double -> Double -> Double -> Double -> Double -> Double-> (Double,Double) gammaWpZpFullBelowTopMass mWp' mZp' gWpub' gZpuu' gZpdd' gZpbb' = let gammaWp = gWpub'^(2::Int)*(1/(16.0*pi)) * mWp' gammaZp = (gZpuu'^(2::Int)+gZpdd'^(2::Int)+gZpbb'^(2::Int))*(2.0/(16.0*pi))*mZp' in ...
338
gammaWpZpFullBelowTopMass :: Double -> Double -> Double -> Double -> Double -> Double-> (Double,Double) gammaWpZpFullBelowTopMass mWp' mZp' gWpub' gZpuu' gZpdd' gZpbb' = let gammaWp = gWpub'^(2::Int)*(1/(16.0*pi)) * mWp' gammaZp = (gZpuu'^(2::Int)+gZpdd'^(2::Int)+gZpbb'^(2::Int))*(2.0/(16.0*pi))*mZp' in (...
336
gammaWpZpFullBelowTopMass mWp' mZp' gWpub' gZpuu' gZpdd' gZpbb' = let gammaWp = gWpub'^(2::Int)*(1/(16.0*pi)) * mWp' gammaZp = (gZpuu'^(2::Int)+gZpdd'^(2::Int)+gZpbb'^(2::Int))*(2.0/(16.0*pi))*mZp' in (gammaWp,gammaZp)
232
false
true
0
17
48
171
94
77
null
null
jimfarrand/RatCalc
src/Xyxyx/RatCalc/ConstructiveReal.hs
gpl-3.0
approximate :: CReal -> Double approximate r = approximate' 0 where approximate' n | lb' == ub' = lb' | otherwise = approximate' (n+1) where (lb, ub) = bounds r n lb' = fromRational lb ub' = fromRational ub
254
approximate :: CReal -> Double approximate r = approximate' 0 where approximate' n | lb' == ub' = lb' | otherwise = approximate' (n+1) where (lb, ub) = bounds r n lb' = fromRational lb ub' = fromRational ub
254
approximate r = approximate' 0 where approximate' n | lb' == ub' = lb' | otherwise = approximate' (n+1) where (lb, ub) = bounds r n lb' = fromRational lb ub' = fromRational ub
223
false
true
3
8
86
94
46
48
null
null
mpickering/ghc-exactprint
tests/examples/ghc710/InfixPatternSynonyms.hs
bsd-3-clause
-- | Destructor for boolean implications. destImp :: HOLTerm -> Maybe (HOLTerm, HOLTerm) destImp = destBinary "==>"
115
destImp :: HOLTerm -> Maybe (HOLTerm, HOLTerm) destImp = destBinary "==>"
73
destImp = destBinary "==>"
26
true
true
0
7
16
28
15
13
null
null
markstoehr/Approximate-Generalized-Flows-in-Haskell
FunctionalGraph.hs
mit
-- | Takes a graph and outputs a pretty printed version -- Should look like: -- ([],0,1.0,[(10.0,1), -- (5.0,2)]) & -- (([(10.0,0)],1,3.0,[(7.0,2)]) & -- (([(5.0,0), -- (7.0,1)], 2,1.0,[]) & Empty)) graphPrettyPrint :: Graph a b -> String graphPret...
339
graphPrettyPrint :: Graph a b -> String graphPrettyPrint = undefined
68
graphPrettyPrint = undefined
28
true
true
0
7
111
34
18
16
null
null
GaloisInc/ivory
ivory-opts/src/Ivory/Opts/ConstFoldComp.hs
bsd-3-clause
cfBitOr :: I.Type -> [CfVal] -> CfVal cfBitOr ty [l, r] = case (ty, l, r) of (I.TyWord _, CfInteger Min _, _) -> r (I.TyWord _, CfInteger Max _, _) -> l (I.TyWord _, _, CfInteger Min _) -> l (I.TyWord _, _, CfInteger Max _) -> r _ -> abc (combineBits (.|.)) ty I.ExpBitOr l r
285
cfBitOr :: I.Type -> [CfVal] -> CfVal cfBitOr ty [l, r] = case (ty, l, r) of (I.TyWord _, CfInteger Min _, _) -> r (I.TyWord _, CfInteger Max _, _) -> l (I.TyWord _, _, CfInteger Min _) -> l (I.TyWord _, _, CfInteger Max _) -> r _ -> abc (combineBits (.|.)) ty I.ExpBitOr l r
285
cfBitOr ty [l, r] = case (ty, l, r) of (I.TyWord _, CfInteger Min _, _) -> r (I.TyWord _, CfInteger Max _, _) -> l (I.TyWord _, _, CfInteger Min _) -> l (I.TyWord _, _, CfInteger Max _) -> r _ -> abc (combineBits (.|.)) ty I.ExpBitOr l r
247
false
true
0
10
67
180
94
86
null
null
smurphy8/phonetical
test/Data/Text/PhoneticalSpec.hs
bsd-3-clause
dictString :: ByteString dictString = "[{ \"find\":\".\",\"use\":\"dot\"},{\"find\":{\"start\":\"O(\",\"end\":\")\"}, \"use\":\"Big O of \"}]"
143
dictString :: ByteString dictString = "[{ \"find\":\".\",\"use\":\"dot\"},{\"find\":{\"start\":\"O(\",\"end\":\")\"}, \"use\":\"Big O of \"}]"
143
dictString = "[{ \"find\":\".\",\"use\":\"dot\"},{\"find\":{\"start\":\"O(\",\"end\":\")\"}, \"use\":\"Big O of \"}]"
118
false
true
0
4
11
11
6
5
null
null
CarstenKoenig/AdventOfCode2016
Day23/Main.hs
mit
decrRegister :: Register -> Runtime () decrRegister = modRegister (subtract 1)
78
decrRegister :: Register -> Runtime () decrRegister = modRegister (subtract 1)
78
decrRegister = modRegister (subtract 1)
39
false
true
0
7
10
29
14
15
null
null
gbwey/persistentold
persistent/Database/Persist/Types/Base.hs
mit
fromPersistValueText (PersistBool b) = Right $ T.pack $ show b
62
fromPersistValueText (PersistBool b) = Right $ T.pack $ show b
62
fromPersistValueText (PersistBool b) = Right $ T.pack $ show b
62
false
false
0
7
9
28
13
15
null
null
esmolanka/sexp-grammar
sexp-grammar/src/Language/SexpGrammar/Base.hs
bsd-3-clause
endProperties :: Grammar Position t (PropertyList :- t) endProperties = PartialIso (\t -> PropertyList [] :- t) (\(PropertyList lst :- t) -> case lst of [] -> Right t ((k, _) : _rest) -> Left (unexpected (ppKey k)))
243
endProperties :: Grammar Position t (PropertyList :- t) endProperties = PartialIso (\t -> PropertyList [] :- t) (\(PropertyList lst :- t) -> case lst of [] -> Right t ((k, _) : _rest) -> Left (unexpected (ppKey k)))
243
endProperties = PartialIso (\t -> PropertyList [] :- t) (\(PropertyList lst :- t) -> case lst of [] -> Right t ((k, _) : _rest) -> Left (unexpected (ppKey k)))
185
false
true
1
15
65
119
59
60
null
null
nushio3/ghc
compiler/deSugar/Coverage.hs
bsd-3-clause
addTickLHsBind patsyn_bind@(L _ (PatSynBind {})) = return patsyn_bind
69
addTickLHsBind patsyn_bind@(L _ (PatSynBind {})) = return patsyn_bind
69
addTickLHsBind patsyn_bind@(L _ (PatSynBind {})) = return patsyn_bind
69
false
false
0
9
7
31
15
16
null
null
rahulmutt/ghcvm
compiler/Eta/Utils/UniqDSet.hs
bsd-3-clause
unionManyUniqDSets :: [UniqDSet a] -> UniqDSet a unionManyUniqDSets [] = emptyUniqDSet
86
unionManyUniqDSets :: [UniqDSet a] -> UniqDSet a unionManyUniqDSets [] = emptyUniqDSet
86
unionManyUniqDSets [] = emptyUniqDSet
37
false
true
0
7
10
29
14
15
null
null
jsavatgy/hatupist
code/timing-02.hs
gpl-2.0
untilLen (t:ts) s n | s+x<n || s==0 = t : untilLen ts (s+x) n | otherwise = [] where x = length t + 1
118
untilLen (t:ts) s n | s+x<n || s==0 = t : untilLen ts (s+x) n | otherwise = [] where x = length t + 1
118
untilLen (t:ts) s n | s+x<n || s==0 = t : untilLen ts (s+x) n | otherwise = [] where x = length t + 1
118
false
false
2
11
42
92
42
50
null
null
tylerjl/adventofcode
src/Y2015/D23.hs
mit
toOperation ["jmp",offset] = Jump $ toInt offset
55
toOperation ["jmp",offset] = Jump $ toInt offset
55
toOperation ["jmp",offset] = Jump $ toInt offset
55
false
false
0
6
13
22
11
11
null
null
geraldus/yesod
yesod-core/src/Yesod/Core/Widget.hs
mit
-- | Link to the specified local script. addScriptAttrs :: MonadWidget m => Route (HandlerSite m) -> [(Text, Text)] -> m () addScriptAttrs x y = tell $ GWData mempty mempty (toUnique $ Script (Local x) y) mempty mempty mempty mempty
232
addScriptAttrs :: MonadWidget m => Route (HandlerSite m) -> [(Text, Text)] -> m () addScriptAttrs x y = tell $ GWData mempty mempty (toUnique $ Script (Local x) y) mempty mempty mempty mempty
191
addScriptAttrs x y = tell $ GWData mempty mempty (toUnique $ Script (Local x) y) mempty mempty mempty mempty
108
true
true
0
11
40
96
47
49
null
null
mishun/tangles
src/Math/Topology/KnotTh/Algebra/Dihedral/D4.hs
lgpl-3.0
-- ECS = {I, EC} -- D4 / ECS = { {I, EC}, {C, E}, {CC, ECCC}, {CCC, ECC} } subGroupECS = SubGroup 6 (PV.fromList [0, 1, 1, 0, 2, 3, 3, 2]) [d4I, d4C, d4C2, d4C3]
161
subGroupECS = SubGroup 6 (PV.fromList [0, 1, 1, 0, 2, 3, 3, 2]) [d4I, d4C, d4C2, d4C3]
86
subGroupECS = SubGroup 6 (PV.fromList [0, 1, 1, 0, 2, 3, 3, 2]) [d4I, d4C, d4C2, d4C3]
86
true
false
1
8
36
62
36
26
null
null
cacay/language-sill
Language/Krill/Monad/Compiler.hs
mit
-- | Extract the result of a Compiler computation runCompiler :: Compiler a -> Either CompilerError a runCompiler = runIdentity . runCompilerT
142
runCompiler :: Compiler a -> Either CompilerError a runCompiler = runIdentity . runCompilerT
92
runCompiler = runIdentity . runCompilerT
40
true
true
0
7
21
34
15
19
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
not_RDR, getTag_RDR, succ_RDR, pred_RDR, minBound_RDR, maxBound_RDR, and_RDR, range_RDR, inRange_RDR, index_RDR, unsafeIndex_RDR, unsafeRangeSize_RDR :: RdrName and_RDR = varQual_RDR gHC_CLASSES (fsLit "&&")
231
not_RDR, getTag_RDR, succ_RDR, pred_RDR, minBound_RDR, maxBound_RDR, and_RDR, range_RDR, inRange_RDR, index_RDR, unsafeIndex_RDR, unsafeRangeSize_RDR :: RdrName and_RDR = varQual_RDR gHC_CLASSES (fsLit "&&")
231
and_RDR = varQual_RDR gHC_CLASSES (fsLit "&&")
62
false
true
5
7
43
55
33
22
null
null
brendanhay/gogol
gogol-cloudsearch/gen/Network/Google/CloudSearch/Types/Product.hs
mpl-2.0
-- | The scoring configuration for the source. scScoringConfig :: Lens' SourceConfig (Maybe SourceScoringConfig) scScoringConfig = lens _scScoringConfig (\ s a -> s{_scScoringConfig = a})
195
scScoringConfig :: Lens' SourceConfig (Maybe SourceScoringConfig) scScoringConfig = lens _scScoringConfig (\ s a -> s{_scScoringConfig = a})
148
scScoringConfig = lens _scScoringConfig (\ s a -> s{_scScoringConfig = a})
82
true
true
1
9
32
52
25
27
null
null
rdavison/snake
snake.hs
gpl-3.0
main :: IO () main = do (arg:args) <- getArgs snakeGame . take (read arg :: Int) . cycle $ [DOWN, DOWN, DOWN, RIGHT, RIGHT, RIGHT, UP, UP, RIGHT, RIGHT, DOWN, DOWN, DOWN, DOWN, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEF...
379
main :: IO () main = do (arg:args) <- getArgs snakeGame . take (read arg :: Int) . cycle $ [DOWN, DOWN, DOWN, RIGHT, RIGHT, RIGHT, UP, UP, RIGHT, RIGHT, DOWN, DOWN, DOWN, DOWN, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEF...
379
main = do (arg:args) <- getArgs snakeGame . take (read arg :: Int) . cycle $ [DOWN, DOWN, DOWN, RIGHT, RIGHT, RIGHT, UP, UP, RIGHT, RIGHT, DOWN, DOWN, DOWN, DOWN, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, LEFT, UP, UP, UP,...
365
false
true
0
12
76
204
126
78
null
null
gitfoxi/ascii-vector-avc
JtagStateMachine.hs
gpl-2.0
-- jtag pins while reset -- TODO: use types to make it clearer what's going on rather than just gluing strings -- TODO: Can I hold chip_reset_n while testing the phys? resetHard = rptLine 10 $ tapInRst ++ rstHard ++ (comment "Hard Reset")
242
resetHard = rptLine 10 $ tapInRst ++ rstHard ++ (comment "Hard Reset")
72
resetHard = rptLine 10 $ tapInRst ++ rstHard ++ (comment "Hard Reset")
72
true
false
0
8
46
30
16
14
null
null
zaxtax/hakaru
haskell/Language/Hakaru/Sample.hs
bsd-3-clause
evaluateSuperpose pms@((_, m) :| _) env = case evaluate m env of VMeasure m' -> let pms' = L.toList pms weights = map ((flip evaluate env) . fst) pms' (x,y,ys) = normalize weights in VMeasure $ \(VProb p) g -> if not (y > (0::Double)) then return Nothing ...
780
evaluateSuperpose pms@((_, m) :| _) env = case evaluate m env of VMeasure m' -> let pms' = L.toList pms weights = map ((flip evaluate env) . fst) pms' (x,y,ys) = normalize weights in VMeasure $ \(VProb p) g -> if not (y > (0::Double)) then return Nothing ...
780
evaluateSuperpose pms@((_, m) :| _) env = case evaluate m env of VMeasure m' -> let pms' = L.toList pms weights = map ((flip evaluate env) . fst) pms' (x,y,ys) = normalize weights in VMeasure $ \(VProb p) g -> if not (y > (0::Double)) then return Nothing ...
780
false
false
1
23
274
310
159
151
null
null
spechub/Hets
Common/XPath.hs
gpl-2.0
-- | show expression with minimal parens showExpr :: Expr -> String showExpr e = case e of GenExpr infx op args -> if infx then showInfixExpr op args else op ++ paren (intercalate "," $ map showExpr args) PathExpr m p -> case m of Nothing -> "" Just f -> showExpr f ++ show p Filter...
879
showExpr :: Expr -> String showExpr e = case e of GenExpr infx op args -> if infx then showInfixExpr op args else op ++ paren (intercalate "," $ map showExpr args) PathExpr m p -> case m of Nothing -> "" Just f -> showExpr f ++ show p FilterExpr pe ps -> (if isPrimExpr pe then ...
838
showExpr e = case e of GenExpr infx op args -> if infx then showInfixExpr op args else op ++ paren (intercalate "," $ map showExpr args) PathExpr m p -> case m of Nothing -> "" Just f -> showExpr f ++ show p FilterExpr pe ps -> (if isPrimExpr pe then id else paren) (showExpr pe...
811
true
true
5
10
211
194
95
99
null
null
brendanhay/gogol
gogol-monitoring/gen/Network/Google/Monitoring/Types/Product.hs
mpl-2.0
-- | The version of collectd that collected the data. Example: -- \"5.3.0-192.el6\". cctsrCollectdVersion :: Lens' CreateCollectdTimeSeriesRequest (Maybe Text) cctsrCollectdVersion = lens _cctsrCollectdVersion (\ s a -> s{_cctsrCollectdVersion = a})
257
cctsrCollectdVersion :: Lens' CreateCollectdTimeSeriesRequest (Maybe Text) cctsrCollectdVersion = lens _cctsrCollectdVersion (\ s a -> s{_cctsrCollectdVersion = a})
172
cctsrCollectdVersion = lens _cctsrCollectdVersion (\ s a -> s{_cctsrCollectdVersion = a})
97
true
true
0
8
37
50
26
24
null
null
grandpascorpion/canon
Math/NumberTheory/Canon.hs
gpl-3.0
-- | Compare the level and the "mantissa" cSuperLogCmp :: SuperPairC -> SuperPairC -> Ordering cSuperLogCmp (l1, m1) (l2, m2) | l1 > l2 = GT | l1 < l2 = LT | abs (m1 - m2) < slEpsilon = EQ | ...
400
cSuperLogCmp :: SuperPairC -> SuperPairC -> Ordering cSuperLogCmp (l1, m1) (l2, m2) | l1 > l2 = GT | l1 < l2 = LT | abs (m1 - m2) < slEpsilon = EQ | otherwise = if l1 >= 0 the...
358
cSuperLogCmp (l1, m1) (l2, m2) | l1 > l2 = GT | l1 < l2 = LT | abs (m1 - m2) < slEpsilon = EQ | otherwise = if l1 >= 0 then (compare m1 m2) else (compare m2 m1)
305
true
true
0
11
200
126
62
64
null
null
david-caro/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
parents params = getPath (parentMap params)
43
parents params = getPath (parentMap params)
43
parents params = getPath (parentMap params)
43
false
false
0
7
5
18
8
10
null
null
cohitt/cs2-adts-logging
LogAnalysis.hs
bsd-3-clause
parseMessage s = Unknown s
26
parseMessage s = Unknown s
26
parseMessage s = Unknown s
26
false
false
0
5
4
12
5
7
null
null
jfischoff/repa-image
src/Data/Array/Repa/Image/Resample.hs
bsd-3-clause
closestFour :: DIM2 -> DIM2 -> DIM2Neighborhood closestFour !extent (Z :. i :. j) = DIM2Neighborhood (clampToBorder2' (Z :. i :. j )) (clampToBorder2' (Z :. i :. j + 1)) (clampToBorder2' (Z :. i + 1 :. j )) (clampToBorder2' (Z :. i + 1...
441
closestFour :: DIM2 -> DIM2 -> DIM2Neighborhood closestFour !extent (Z :. i :. j) = DIM2Neighborhood (clampToBorder2' (Z :. i :. j )) (clampToBorder2' (Z :. i :. j + 1)) (clampToBorder2' (Z :. i + 1 :. j )) (clampToBorder2' (Z :. i + 1 ...
440
closestFour !extent (Z :. i :. j) = DIM2Neighborhood (clampToBorder2' (Z :. i :. j )) (clampToBorder2' (Z :. i :. j + 1)) (clampToBorder2' (Z :. i + 1 :. j )) (clampToBorder2' (Z :. i + 1 :. j + 1)) where {-# INLINE clampToBorder2'...
392
false
true
0
12
176
140
72
68
null
null
erantapaa/haskellnews
src/HN/View/Home.hs
bsd-3-clause
mixedRows now items = forM_ items $ \item -> tr ! id (toValue ("item-" ++ epoch (iPublished item))) $ do td !. "icon" $ img ! src (if iSource item == HaskellCafe then "http://www.haskell.org/favicon.ico" else toValue (show ((iLink item) { uriPath = "/favic...
768
mixedRows now items = forM_ items $ \item -> tr ! id (toValue ("item-" ++ epoch (iPublished item))) $ do td !. "icon" $ img ! src (if iSource item == HaskellCafe then "http://www.haskell.org/favicon.ico" else toValue (show ((iLink item) { uriPath = "/favic...
768
mixedRows now items = forM_ items $ \item -> tr ! id (toValue ("item-" ++ epoch (iPublished item))) $ do td !. "icon" $ img ! src (if iSource item == HaskellCafe then "http://www.haskell.org/favicon.ico" else toValue (show ((iLink item) { uriPath = "/favic...
768
false
false
5
25
275
305
141
164
null
null
d10genes/haskell-edu
e2/LogAnalysis.hs
bsd-2-clause
l3 = LogMessage (Error 80) 5 "help help"
40
l3 = LogMessage (Error 80) 5 "help help"
40
l3 = LogMessage (Error 80) 5 "help help"
40
false
false
1
7
7
23
9
14
null
null
yi-editor/dynamic-state
src/Data/ConcreteTypeRep.hs
gpl-2.0
-- | Converts to the underlying 'TypeRep' toTypeRep :: ConcreteTypeRep -> TypeRep toTypeRep = unCTR
99
toTypeRep :: ConcreteTypeRep -> TypeRep toTypeRep = unCTR
57
toTypeRep = unCTR
17
true
true
0
7
14
23
10
13
null
null
sandrolovnicki/lambda-calculus-interpreter
src/Parser.hs
mit
createChurch n exp = createChurch (n -1) (Application (Variable (LambdaVar 'f' 0)) exp)
87
createChurch n exp = createChurch (n -1) (Application (Variable (LambdaVar 'f' 0)) exp)
87
createChurch n exp = createChurch (n -1) (Application (Variable (LambdaVar 'f' 0)) exp)
87
false
false
0
11
12
45
22
23
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxLANGUAGE_SANGHO :: Int wxLANGUAGE_SANGHO = 159
48
wxLANGUAGE_SANGHO :: Int wxLANGUAGE_SANGHO = 159
48
wxLANGUAGE_SANGHO = 159
23
false
true
0
6
5
18
7
11
null
null
JPMoresmau/haskell-ide-engine
hie-ghc-mod/Haskell/Ide/GhcModPlugin.hs
bsd-3-clause
lintCmd :: CommandFunc T.Text lintCmd = CmdSync $ \_ctxs req -> do case getParams (IdFile "file" :& RNil) req of Left err -> return err Right (ParamFile fileName :& RNil) -> do fmap T.pack <$> runGhcModCommand fileName (GM.lint GM.defaultLintOpts) Right _ -> return $ IdeResponseError (IdeError Inter...
477
lintCmd :: CommandFunc T.Text lintCmd = CmdSync $ \_ctxs req -> do case getParams (IdFile "file" :& RNil) req of Left err -> return err Right (ParamFile fileName :& RNil) -> do fmap T.pack <$> runGhcModCommand fileName (GM.lint GM.defaultLintOpts) Right _ -> return $ IdeResponseError (IdeError Inter...
477
lintCmd = CmdSync $ \_ctxs req -> do case getParams (IdFile "file" :& RNil) req of Left err -> return err Right (ParamFile fileName :& RNil) -> do fmap T.pack <$> runGhcModCommand fileName (GM.lint GM.defaultLintOpts) Right _ -> return $ IdeResponseError (IdeError InternalError "GhcModPlugin.l...
447
false
true
0
18
82
134
63
71
null
null
AlexanderPankiv/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
recConErrorIdKey = mkPreludeMiscIdUnique 16
56
recConErrorIdKey = mkPreludeMiscIdUnique 16
56
recConErrorIdKey = mkPreludeMiscIdUnique 16
56
false
false
0
5
16
9
4
5
null
null
GaloisInc/saw-script
heapster-saw/src/Verifier/SAW/Heapster/archival/Permissions.hs
bsd-3-clause
splitLLVMFieldAt off (shape : shapes) = fmap (\(spl, p, shapes') -> (spl, p, shape:shapes')) $ splitLLVMFieldAt off shapes
126
splitLLVMFieldAt off (shape : shapes) = fmap (\(spl, p, shapes') -> (spl, p, shape:shapes')) $ splitLLVMFieldAt off shapes
126
splitLLVMFieldAt off (shape : shapes) = fmap (\(spl, p, shapes') -> (spl, p, shape:shapes')) $ splitLLVMFieldAt off shapes
126
false
false
0
10
21
60
33
27
null
null
Alasdair/Mella
Lang/Util/WaldmeisterInput/Tokenizer.hs
bsd-3-clause
openBracket :: Parser Token openBracket = char '(' >> return TokOpenBracket
75
openBracket :: Parser Token openBracket = char '(' >> return TokOpenBracket
75
openBracket = char '(' >> return TokOpenBracket
47
false
true
2
6
10
31
12
19
null
null
binesiyu/ifl
examples/ch28/Check.hs
mit
left _ (Right x) = Right x
26
left _ (Right x) = Right x
26
left _ (Right x) = Right x
26
false
false
0
7
6
20
9
11
null
null
adgalad/Epilog
src/Haskell/Language/Epilog/MIPS/MIPS.hs
bsd-3-clause
-------------------------------------------------------------------------------- emitMIPS :: ([Int32], Seq MIPS) -> Text emitMIPS (sss, mips) = snd $ evalRWS (emips mips) () sss
178
emitMIPS :: ([Int32], Seq MIPS) -> Text emitMIPS (sss, mips) = snd $ evalRWS (emips mips) () sss
96
emitMIPS (sss, mips) = snd $ evalRWS (emips mips) () sss
56
true
true
0
8
19
60
31
29
null
null
psibi/yesod
yesod-auth/Yesod/Auth/Email.hs
mit
parsePassword :: Value -> Parser (Text, Text, Maybe Text) parsePassword = withObject "password" (\obj -> do email' <- obj .: "new" pass <- obj .: "confirm" curr <- obj .:? "current" ...
374
parsePassword :: Value -> Parser (Text, Text, Maybe Text) parsePassword = withObject "password" (\obj -> do email' <- obj .: "new" pass <- obj .: "confirm" curr <- obj .:? "current" ...
374
parsePassword = withObject "password" (\obj -> do email' <- obj .: "new" pass <- obj .: "confirm" curr <- obj .:? "current" return (email', pass, curr))
316
false
true
0
11
198
91
46
45
null
null