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
uuhan/Idris-dev
src/Idris/REPL.hs
bsd-3-clause
idemodeProcess :: FilePath -> Command -> Idris () idemodeProcess fn Warranty = process fn Warranty
98
idemodeProcess :: FilePath -> Command -> Idris () idemodeProcess fn Warranty = process fn Warranty
98
idemodeProcess fn Warranty = process fn Warranty
48
false
true
0
8
14
34
16
18
null
null
ntc2/cryptol
src/Cryptol/TypeCheck/Monad.hs
bsd-3-clause
addHasGoal :: HasGoal -> InferM () addHasGoal g = IM $ sets_ $ \s -> s { iHasCts = g : iHasCts s }
98
addHasGoal :: HasGoal -> InferM () addHasGoal g = IM $ sets_ $ \s -> s { iHasCts = g : iHasCts s }
98
addHasGoal g = IM $ sets_ $ \s -> s { iHasCts = g : iHasCts s }
63
false
true
0
10
23
51
26
25
null
null
yamadapc/haskell-ascii-progress
lib/System/Console/AsciiProgress.hs
mit
tick :: ProgressBar -> IO () tick pg = tickN pg 1
49
tick :: ProgressBar -> IO () tick pg = tickN pg 1
49
tick pg = tickN pg 1
20
false
true
0
8
11
32
14
18
null
null
cocreature/leksah
src/IDE/Pane/Preferences.hs
gpl-2.0
getPrefs (Just pp) = forceGetPane (Left pp)
44
getPrefs (Just pp) = forceGetPane (Left pp)
44
getPrefs (Just pp) = forceGetPane (Left pp)
44
false
false
0
7
7
24
11
13
null
null
dorchard/camfort
src/Camfort/Specification/Stencils/InferenceFrontend.hs
apache-2.0
getMarker :: Inferer Char getMarker = asks ieMarker
51
getMarker :: Inferer Char getMarker = asks ieMarker
51
getMarker = asks ieMarker
25
false
true
0
6
7
23
9
14
null
null
tomahawkins/gigl
Language/GIGL.hs
bsd-3-clause
bnot :: E Bool -> E Bool bnot = Not
35
bnot :: E Bool -> E Bool bnot = Not
35
bnot = Not
10
false
true
0
6
9
21
10
11
null
null
forked-upstream-packages-for-ghcjs/ghcjs
ghcjs/src/Compiler/JMacro/Base.hs
mit
flattenBlocks (y:ys) = y : flattenBlocks ys
43
flattenBlocks (y:ys) = y : flattenBlocks ys
43
flattenBlocks (y:ys) = y : flattenBlocks ys
43
false
false
0
7
6
23
11
12
null
null
ancientlanguage/haskell-analysis
prepare/src/Prepare/Decompose.hs
mit
decomposeChar '\x06C2' = "\x06C1\x0654"
39
decomposeChar '\x06C2' = "\x06C1\x0654"
39
decomposeChar '\x06C2' = "\x06C1\x0654"
39
false
false
1
5
3
13
4
9
null
null
muspellsson/hiccup
TclErr.hs
lgpl-2.1
errData _ = T.empty
34
errData _ = T.empty
34
errData _ = T.empty
34
false
false
0
5
18
11
5
6
null
null
jjwchoy/hotdb
tests/TransformationTest.hs
mit
testTransformChildRootSet :: TestTree testTransformChildRootSet = let dop1 = O.DirectedOperation "/" $ O.IntInc 1 dop2 = O.DirectedOperation "/foo" $ O.IntInc 1 dop3 = O.DirectedOperation "" $ O.IntInc 1 rs = O.DirectedOperation "" $ O.RootSet c 0 in testCase "Transform Child against RootSet" $ do...
769
testTransformChildRootSet :: TestTree testTransformChildRootSet = let dop1 = O.DirectedOperation "/" $ O.IntInc 1 dop2 = O.DirectedOperation "/foo" $ O.IntInc 1 dop3 = O.DirectedOperation "" $ O.IntInc 1 rs = O.DirectedOperation "" $ O.RootSet c 0 in testCase "Transform Child against RootSet" $ do...
769
testTransformChildRootSet = let dop1 = O.DirectedOperation "/" $ O.IntInc 1 dop2 = O.DirectedOperation "/foo" $ O.IntInc 1 dop3 = O.DirectedOperation "" $ O.IntInc 1 rs = O.DirectedOperation "" $ O.RootSet c 0 in testCase "Transform Child against RootSet" $ do assertEqual "a" (Just O.directedN...
731
false
true
0
14
140
272
124
148
null
null
RichardPerry/irc
core/src/IRC.hs
mit
noticeParser :: Parser Message noticeParser = do _ <- "NOTICE" <* skipSpace target <- targetParser <* skipSpace message <- messageParser return $ Notice target message
183
noticeParser :: Parser Message noticeParser = do _ <- "NOTICE" <* skipSpace target <- targetParser <* skipSpace message <- messageParser return $ Notice target message
183
noticeParser = do _ <- "NOTICE" <* skipSpace target <- targetParser <* skipSpace message <- messageParser return $ Notice target message
152
false
true
1
9
40
59
25
34
null
null
periodic/Simple-Yesod-ToDo
Handler/List.hs
bsd-2-clause
isSeparator _ = Nothing
62
isSeparator _ = Nothing
62
isSeparator _ = Nothing
62
false
false
0
5
42
9
4
5
null
null
diogob/postgrest
test/SpecHelper.hs
mit
validateOpenApiResponse :: [Header] -> WaiSession () validateOpenApiResponse headers = do r <- request methodGet "/" headers "" liftIO $ let respStatus = simpleStatus r in respStatus `shouldSatisfy` \s -> s == Status { statusCode = 200, statusMessage="OK" } liftIO $ let respHeaders = simpleHeade...
879
validateOpenApiResponse :: [Header] -> WaiSession () validateOpenApiResponse headers = do r <- request methodGet "/" headers "" liftIO $ let respStatus = simpleStatus r in respStatus `shouldSatisfy` \s -> s == Status { statusCode = 200, statusMessage="OK" } liftIO $ let respHeaders = simpleHeade...
879
validateOpenApiResponse headers = do r <- request methodGet "/" headers "" liftIO $ let respStatus = simpleStatus r in respStatus `shouldSatisfy` \s -> s == Status { statusCode = 200, statusMessage="OK" } liftIO $ let respHeaders = simpleHeaders r in respHeaders `shouldSatisfy` \hs -> ...
826
false
true
0
14
205
278
141
137
null
null
AlexanderPankiv/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
emitPrimOp dflags [res] CtzOp [w] = emitCtzCall res w (wordWidth dflags)
74
emitPrimOp dflags [res] CtzOp [w] = emitCtzCall res w (wordWidth dflags)
74
emitPrimOp dflags [res] CtzOp [w] = emitCtzCall res w (wordWidth dflags)
74
false
false
0
7
12
34
17
17
null
null
hguenther/fac
Formula.hs
gpl-3.0
toCNF nxt (Not (Not x)) = toCNF nxt x
37
toCNF nxt (Not (Not x)) = toCNF nxt x
37
toCNF nxt (Not (Not x)) = toCNF nxt x
37
false
false
0
8
8
30
13
17
null
null
jwvg0425/HaskellScratchPad
ffi/ffi_test.hs
mit
main = return ()
16
main = return ()
16
main = return ()
16
false
false
0
6
3
11
5
6
null
null
thielema/wxhaskell
wxdirect/src/Classes.hs
lgpl-2.1
psymbol s = lexeme (string s)
31
psymbol s = lexeme (string s)
31
psymbol s = lexeme (string s)
31
false
false
0
7
7
18
8
10
null
null
martinra/hlinear
src/HLinear/Hook/EchelonForm/Basic.hs
gpl-3.0
-------------------------------------------------------------------------------- -- normalization -------------------------------------------------------------------------------- normalize :: ( DivisionRing a, DecidableZero a ) => EchelonForm a -> EchelonForm a normalize (EchelonForm nrs ncs rs) = EchelonForm nrs ...
347
normalize :: ( DivisionRing a, DecidableZero a ) => EchelonForm a -> EchelonForm a normalize (EchelonForm nrs ncs rs) = EchelonForm nrs ncs $ fmap EFR.normalize rs
167
normalize (EchelonForm nrs ncs rs) = EchelonForm nrs ncs $ fmap EFR.normalize rs
80
true
true
0
7
35
71
35
36
null
null
mikehat/blaze-all
tests/Text/Blaze/Tests.hs
bsd-3-clause
-- | Check that the "<>" characters are well-nested. -- wellNestedBrackets :: Markup -> Bool wellNestedBrackets = wellNested False . LBC.unpack . renderUsingUtf8 where wellNested isOpen [] = not isOpen wellNested isOpen (x:xs) = case x of '<' -> if isOpen then False else wellNested True xs '>'...
405
wellNestedBrackets :: Markup -> Bool wellNestedBrackets = wellNested False . LBC.unpack . renderUsingUtf8 where wellNested isOpen [] = not isOpen wellNested isOpen (x:xs) = case x of '<' -> if isOpen then False else wellNested True xs '>' -> if isOpen then wellNested False xs else False ...
349
wellNestedBrackets = wellNested False . LBC.unpack . renderUsingUtf8 where wellNested isOpen [] = not isOpen wellNested isOpen (x:xs) = case x of '<' -> if isOpen then False else wellNested True xs '>' -> if isOpen then wellNested False xs else False _ -> wellNested isOpen xs
312
true
true
0
9
97
118
60
58
null
null
teleshoes/taffybar
src/System/Taffybar/Information/X11DesktopInfo.hs
bsd-3-clause
fetchWindowHints :: X11Window -> X11Property WMHints fetchWindowHints window = do (X11Context d _ _) <- ask liftIO $ getWMHints d window -- | Emit an event of type @ClientMessage@ that can be listened to and consumed -- by XMonad event hooks.
247
fetchWindowHints :: X11Window -> X11Property WMHints fetchWindowHints window = do (X11Context d _ _) <- ask liftIO $ getWMHints d window -- | Emit an event of type @ClientMessage@ that can be listened to and consumed -- by XMonad event hooks.
247
fetchWindowHints window = do (X11Context d _ _) <- ask liftIO $ getWMHints d window -- | Emit an event of type @ClientMessage@ that can be listened to and consumed -- by XMonad event hooks.
194
false
true
0
10
45
57
26
31
null
null
ezyang/ghc
testsuite/tests/dph/nbody/Body.hs
bsd-3-clause
-- | Set the acceleration of a body. setAccelOfBody :: Accel -> Body -> Body setAccelOfBody acc' (mp, vel, _) = (mp, vel, acc')
135
setAccelOfBody :: Accel -> Body -> Body setAccelOfBody acc' (mp, vel, _) = (mp, vel, acc')
98
setAccelOfBody acc' (mp, vel, _) = (mp, vel, acc')
58
true
true
0
6
31
43
25
18
null
null
notae/haskell-exercise
lens/CP.hs
bsd-3-clause
initOptState :: OptState v initOptState = OptState { _bestSols = Nothing }
74
initOptState :: OptState v initOptState = OptState { _bestSols = Nothing }
74
initOptState = OptState { _bestSols = Nothing }
47
false
true
0
7
11
31
14
17
null
null
sol/hpack
src/Hpack/Syntax/Dependencies.hs
mit
addMixins :: Object -> DependencyVersion -> Parser DependencyInfo addMixins o version = do mixinsMay <- o .:? "mixin" return $ DependencyInfo (fromMaybeList mixinsMay) version
179
addMixins :: Object -> DependencyVersion -> Parser DependencyInfo addMixins o version = do mixinsMay <- o .:? "mixin" return $ DependencyInfo (fromMaybeList mixinsMay) version
179
addMixins o version = do mixinsMay <- o .:? "mixin" return $ DependencyInfo (fromMaybeList mixinsMay) version
113
false
true
0
10
27
56
26
30
null
null
nevrenato/Hets_Fork
RDF/Parse.hs
gpl-2.0
parseObject :: CharParser st Object parseObject = fmap ObjectLiteral literal <|> fmap Object parseSubject
105
parseObject :: CharParser st Object parseObject = fmap ObjectLiteral literal <|> fmap Object parseSubject
105
parseObject = fmap ObjectLiteral literal <|> fmap Object parseSubject
69
false
true
1
6
13
34
14
20
null
null
bfops/Chess
src/Graphics/Rendering/OpenGL/Monad/Wrappers.hs
mit
rotate :: OGL.MatrixComponent c => c -> OGL.Vector3 c -> GL () rotate x = unsafeRunOnGraphicsCard . OGL.rotate x
112
rotate :: OGL.MatrixComponent c => c -> OGL.Vector3 c -> GL () rotate x = unsafeRunOnGraphicsCard . OGL.rotate x
112
rotate x = unsafeRunOnGraphicsCard . OGL.rotate x
49
false
true
0
9
18
50
23
27
null
null
afcastano/cafe-duty
src/App/Roster/AppService.hs
bsd-3-clause
calculatePreviousDuty :: TeamDetails -> IO () calculatePreviousDuty team = do roster <- getTeamRoster team let newRoster = decreaseRosterIndex roster let currentDuty = current newRoster let newTeam = decreaseTimesOnDuty team c...
412
calculatePreviousDuty :: TeamDetails -> IO () calculatePreviousDuty team = do roster <- getTeamRoster team let newRoster = decreaseRosterIndex roster let currentDuty = current newRoster let newTeam = decreaseTimesOnDuty team c...
412
calculatePreviousDuty team = do roster <- getTeamRoster team let newRoster = decreaseRosterIndex roster let currentDuty = current newRoster let newTeam = decreaseTimesOnDuty team currentDuty saveRoster ne...
366
false
true
0
10
171
83
35
48
null
null
lambdageek/small
src/Algo/Elaborate.hs
bsd-3-clause
showSimpleConstraints' :: (Show (t U)) => [Simple.Constraint t U] -> Reader [U] String showSimpleConstraints' ss = do strs <- mapM showSimpleConstraint ss return (intercalate " & " strs)
190
showSimpleConstraints' :: (Show (t U)) => [Simple.Constraint t U] -> Reader [U] String showSimpleConstraints' ss = do strs <- mapM showSimpleConstraint ss return (intercalate " & " strs)
190
showSimpleConstraints' ss = do strs <- mapM showSimpleConstraint ss return (intercalate " & " strs)
103
false
true
0
9
31
77
37
40
null
null
gbwey/persistent
persistent-zookeeper/Database/Persist/Zookeeper/Internal.hs
mit
getFieldsName :: (PersistEntity val) => val -> [T.Text] getFieldsName val = fmap (unDBName.fieldDB) $ entityFields $ entityDef $ Just val
138
getFieldsName :: (PersistEntity val) => val -> [T.Text] getFieldsName val = fmap (unDBName.fieldDB) $ entityFields $ entityDef $ Just val
138
getFieldsName val = fmap (unDBName.fieldDB) $ entityFields $ entityDef $ Just val
82
false
true
0
10
20
60
29
31
null
null
mariefarrell/Hets
Temporal/ModalCaslToMu.hs
gpl-2.0
convert' :: Casl.PathFormula a -> Maybe (Mu.PathFormula a) convert' (Casl.State phi) = liftM Mu.SF (convert phi)
113
convert' :: Casl.PathFormula a -> Maybe (Mu.PathFormula a) convert' (Casl.State phi) = liftM Mu.SF (convert phi)
112
convert' (Casl.State phi) = liftM Mu.SF (convert phi)
53
false
true
0
9
16
55
26
29
null
null
4ZP6Capstone2015/ampersand
src/Database/Design/Ampersand/FSpec/ToFSpec/Calc.hs
gpl-3.0
commaPandocAnd :: Lang -> [Inlines] -> Inlines commaPandocAnd Dutch = commaNLPandoc' "en"
89
commaPandocAnd :: Lang -> [Inlines] -> Inlines commaPandocAnd Dutch = commaNLPandoc' "en"
89
commaPandocAnd Dutch = commaNLPandoc' "en"
42
false
true
0
7
11
28
14
14
null
null
ykst/funlang
src/Parser.hs
mit
keyword s = try $ lx $ string s <* blank
40
keyword s = try $ lx $ string s <* blank
40
keyword s = try $ lx $ string s <* blank
40
false
false
1
7
10
28
11
17
null
null
RossMeikleham/GB-Assembler
GBParser.hs
mit
whiteSpace = Token.whiteSpace lexer
35
whiteSpace = Token.whiteSpace lexer
35
whiteSpace = Token.whiteSpace lexer
35
false
false
0
6
3
11
5
6
null
null
ezyang/ghc
testsuite/tests/polykinds/T11466.hs
bsd-3-clause
-- This should be ook f :: Bla => Int -> Int f y = ?x + y
57
f :: Bla => Int -> Int f y = ?x + y
35
f y = ?x + y
12
true
true
2
8
17
35
15
20
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/nativeGen/X86/Ppr.hs
bsd-3-clause
pprImm (ImmCLbl l) = ppr l
29
pprImm (ImmCLbl l) = ppr l
29
pprImm (ImmCLbl l) = ppr l
29
false
false
0
6
8
19
8
11
null
null
lonnen/alonzo
src/Alonzo.hs
mpl-2.0
bin2dig' digint (x:xs) = let old = 2 * digint + (if x == '0' then 0 else 1) in bin2dig' old xs
94
bin2dig' digint (x:xs) = let old = 2 * digint + (if x == '0' then 0 else 1) in bin2dig' old xs
94
bin2dig' digint (x:xs) = let old = 2 * digint + (if x == '0' then 0 else 1) in bin2dig' old xs
94
false
false
0
12
22
59
29
30
null
null
ahodgen/archer-calc
src/BuiltIn/Text.hs
bsd-2-clause
biProper :: BuiltIn biProper = BuiltIn { evalVal = proper , emitVal = const "PROPER" , typeSig = typeText :-> typeText , argHelp = "text" , addHelp = Nothing }
183
biProper :: BuiltIn biProper = BuiltIn { evalVal = proper , emitVal = const "PROPER" , typeSig = typeText :-> typeText , argHelp = "text" , addHelp = Nothing }
183
biProper = BuiltIn { evalVal = proper , emitVal = const "PROPER" , typeSig = typeText :-> typeText , argHelp = "text" , addHelp = Nothing }
163
false
true
0
8
53
54
31
23
null
null
egaburov/funstuff
Haskell/tytag/l03.hs
apache-2.0
viewI e = viewI' e 0
20
viewI e = viewI' e 0
20
viewI e = viewI' e 0
20
false
false
1
5
5
19
6
13
null
null
kazu-yamamoto/domain-auth
Test.hs
bsd-3-clause
case_prd4 :: Assertion case_prd4 = decidePRD (pushPRD "sender" maddr2 $ pushPRD "sender" maddr2 $ pushPRD "from" maddr1 $ pushPRD "from" maddr1 initialPRD) @?= answer where answer = Nothing
256
case_prd4 :: Assertion case_prd4 = decidePRD (pushPRD "sender" maddr2 $ pushPRD "sender" maddr2 $ pushPRD "from" maddr1 $ pushPRD "from" maddr1 initialPRD) @?= answer where answer = Nothing
256
case_prd4 = decidePRD (pushPRD "sender" maddr2 $ pushPRD "sender" maddr2 $ pushPRD "from" maddr1 $ pushPRD "from" maddr1 initialPRD) @?= answer where answer = Nothing
233
false
true
1
10
94
73
31
42
null
null
deepakjois/hs-logo
src/Logo/Builtins/Arithmetic.hs
bsd-3-clause
arithmeticBuiltins :: M.Map String LogoFunctionDef arithmeticBuiltins = M.fromList [ ("sin", LogoFunctionDef 1 sin_) , ("cos", LogoFunctionDef 1 cos_) , ("tan", LogoFunctionDef 1 tan_) , ("arctan", LogoFunctionDef 1 arctan) , ("sqrt", LogoFunctionDef 1 sqrt_) ]
294
arithmeticBuiltins :: M.Map String LogoFunctionDef arithmeticBuiltins = M.fromList [ ("sin", LogoFunctionDef 1 sin_) , ("cos", LogoFunctionDef 1 cos_) , ("tan", LogoFunctionDef 1 tan_) , ("arctan", LogoFunctionDef 1 arctan) , ("sqrt", LogoFunctionDef 1 sqrt_) ]
294
arithmeticBuiltins = M.fromList [ ("sin", LogoFunctionDef 1 sin_) , ("cos", LogoFunctionDef 1 cos_) , ("tan", LogoFunctionDef 1 tan_) , ("arctan", LogoFunctionDef 1 arctan) , ("sqrt", LogoFunctionDef 1 sqrt_) ]
243
false
true
0
7
66
93
51
42
null
null
nevrenato/Hets_Fork
CASL/Parse_AS_Basic.hs
gpl-2.0
aFormula :: TermParser f => [String] -> AParser st (Annoted (FORMULA f)) aFormula = allAnnoParser . formula
107
aFormula :: TermParser f => [String] -> AParser st (Annoted (FORMULA f)) aFormula = allAnnoParser . formula
107
aFormula = allAnnoParser . formula
34
false
true
0
11
16
46
23
23
null
null
joelburget/haste-compiler
examples/canvas-simple/canvas-simple.hs
bsd-3-clause
animate :: Canvas -> Double -> IO () animate can angle = do -- There are several transformation functions as well. All of them take a -- Picture () as their argument, and apply their transformation only to that -- picture, so the user doesn't need to manage the canvas state machine -- explicitly. render can $...
624
animate :: Canvas -> Double -> IO () animate can angle = do -- There are several transformation functions as well. All of them take a -- Picture () as their argument, and apply their transformation only to that -- picture, so the user doesn't need to manage the canvas state machine -- explicitly. render can $...
624
animate can angle = do -- There are several transformation functions as well. All of them take a -- Picture () as their argument, and apply their transformation only to that -- picture, so the user doesn't need to manage the canvas state machine -- explicitly. render can $ do translate (160, 160) $ rotate...
587
false
true
0
19
147
184
87
97
null
null
mightymoose/liquidhaskell
benchmarks/bytestring-0.9.2.1/Data/ByteString/Fusion.T.hs
bsd-3-clause
-- n.b. perfect fusion fuseMapNoAccEFL :: MapEFL -> NoAccEFL -> NoAccEFL fuseMapNoAccEFL f g e1 = g (f e1)
107
fuseMapNoAccEFL :: MapEFL -> NoAccEFL -> NoAccEFL fuseMapNoAccEFL f g e1 = g (f e1)
83
fuseMapNoAccEFL f g e1 = g (f e1)
33
true
true
0
7
19
36
18
18
null
null
brendanhay/gogol
gogol-admin-directory/gen/Network/Google/Resource/Directory/Resources/Features/Get.hs
mpl-2.0
-- | OAuth access token. rfgAccessToken :: Lens' ResourcesFeaturesGet (Maybe Text) rfgAccessToken = lens _rfgAccessToken (\ s a -> s{_rfgAccessToken = a})
162
rfgAccessToken :: Lens' ResourcesFeaturesGet (Maybe Text) rfgAccessToken = lens _rfgAccessToken (\ s a -> s{_rfgAccessToken = a})
137
rfgAccessToken = lens _rfgAccessToken (\ s a -> s{_rfgAccessToken = a})
79
true
true
0
9
29
48
25
23
null
null
badp/ganeti
src/Ganeti/Utils.hs
gpl-2.0
atomicWriteFile :: FilePath -> String -> IO () atomicWriteFile path contents = do (tmppath, tmphandle) <- openTempFile (takeDirectory path) (takeBaseName path) hPutStr tmphandle contents hClose tmphandle renameFile tmppath path -- | Attempt, in a non-blocking way, to obtain a lock on a given file; report -- ba...
331
atomicWriteFile :: FilePath -> String -> IO () atomicWriteFile path contents = do (tmppath, tmphandle) <- openTempFile (takeDirectory path) (takeBaseName path) hPutStr tmphandle contents hClose tmphandle renameFile tmppath path -- | Attempt, in a non-blocking way, to obtain a lock on a given file; report -- ba...
331
atomicWriteFile path contents = do (tmppath, tmphandle) <- openTempFile (takeDirectory path) (takeBaseName path) hPutStr tmphandle contents hClose tmphandle renameFile tmppath path -- | Attempt, in a non-blocking way, to obtain a lock on a given file; report -- back success.
284
false
true
0
10
56
83
39
44
null
null
qpliu/esolang
pointless/pointless.hs
gpl-3.0
toBits :: String -> [Bool] toBits = concatMap (byteBits 8 . ord) where byteBits b n | b <= 0 = [] | otherwise = (mod n 2 == 1) : byteBits (b-1) (div n 2)
176
toBits :: String -> [Bool] toBits = concatMap (byteBits 8 . ord) where byteBits b n | b <= 0 = [] | otherwise = (mod n 2 == 1) : byteBits (b-1) (div n 2)
176
toBits = concatMap (byteBits 8 . ord) where byteBits b n | b <= 0 = [] | otherwise = (mod n 2 == 1) : byteBits (b-1) (div n 2)
149
false
true
0
9
58
100
49
51
null
null
nomeata/codeworld
funblocks-client/src/Blocks/Types.hs
apache-2.0
numRound = standardFunction "numRound" "rounded" Nothing [typeNumber, typeNumber] ["NUM"] colorNumber "The rounded value of a number"
145
numRound = standardFunction "numRound" "rounded" Nothing [typeNumber, typeNumber] ["NUM"] colorNumber "The rounded value of a number"
145
numRound = standardFunction "numRound" "rounded" Nothing [typeNumber, typeNumber] ["NUM"] colorNumber "The rounded value of a number"
145
false
false
0
6
27
30
16
14
null
null
lukexi/animation-pal
test/Random.hs
bsd-3-clause
randomColorWithHue :: MonadIO m => GLfloat -> m (V4 GLfloat) randomColorWithHue hue = colorHSL <$> pure hue <*> randomRIO' (0,1) <*> randomRIO' (0,1)
161
randomColorWithHue :: MonadIO m => GLfloat -> m (V4 GLfloat) randomColorWithHue hue = colorHSL <$> pure hue <*> randomRIO' (0,1) <*> randomRIO' (0,1)
161
randomColorWithHue hue = colorHSL <$> pure hue <*> randomRIO' (0,1) <*> randomRIO' (0,1)
100
false
true
8
9
34
74
37
37
null
null
jkozlowski/better-bot
app/Main.hs
mit
withCurrentTime :: (MonadCatch m, MonadMask m, MonadLoggerIO m) => [BookingConfig] -> m () withCurrentTime c = do currentTime <- liftIO Time.getCurrentTime let currentDay = Time.utctDay currentTime let sameDayNextWeek = Time.addDays 7 currentDay let dayOfW...
1,025
withCurrentTime :: (MonadCatch m, MonadMask m, MonadLoggerIO m) => [BookingConfig] -> m () withCurrentTime c = do currentTime <- liftIO Time.getCurrentTime let currentDay = Time.utctDay currentTime let sameDayNextWeek = Time.addDays 7 currentDay let dayOfW...
1,025
withCurrentTime c = do currentTime <- liftIO Time.getCurrentTime let currentDay = Time.utctDay currentTime let sameDayNextWeek = Time.addDays 7 currentDay let dayOfWeek = dayOfWeekFromUTCTime currentDay let sameDayNextWeekDayOfWeek = dayOfWeekFromUTCTime sameDayNextWeek ...
902
false
true
0
15
330
252
119
133
null
null
cirquit/Personal-Repository
Haskell/Playground/AdventOfCode/advent-coding/src/Day09.hs
mit
solution :: IO () solution = do txt <- readFile "lib/day09-input.txt" let c = parser txt (c1, c2, _) = unzip3 c cities = nub $ union c1 c2 allpaths = permutations cities possiblePaths = filter (isValid c) allpaths -- result = minimum $ map (calculatePath c) possiblePat...
457
solution :: IO () solution = do txt <- readFile "lib/day09-input.txt" let c = parser txt (c1, c2, _) = unzip3 c cities = nub $ union c1 c2 allpaths = permutations cities possiblePaths = filter (isValid c) allpaths -- result = minimum $ map (calculatePath c) possiblePat...
457
solution = do txt <- readFile "lib/day09-input.txt" let c = parser txt (c1, c2, _) = unzip3 c cities = nub $ union c1 c2 allpaths = permutations cities possiblePaths = filter (isValid c) allpaths -- result = minimum $ map (calculatePath c) possiblePaths -- part1 ...
439
false
true
0
14
139
129
62
67
null
null
meiersi-11ce/stack
src/main/Main.hs
bsd-3-clause
targetsCmd :: Text -> GlobalOpts -> IO () targetsCmd target go@GlobalOpts{..} = withBuildConfig go $ do (_realTargets,_,pkgs) <- ghciSetup Nothing [target] pwd <- getWorkingDir targets <- fmap (concat . snd . unzip) (mapM (getPackageOptsAndTargetFiles pwd) ...
403
targetsCmd :: Text -> GlobalOpts -> IO () targetsCmd target go@GlobalOpts{..} = withBuildConfig go $ do (_realTargets,_,pkgs) <- ghciSetup Nothing [target] pwd <- getWorkingDir targets <- fmap (concat . snd . unzip) (mapM (getPackageOptsAndTargetFiles pwd) ...
403
targetsCmd target go@GlobalOpts{..} = withBuildConfig go $ do (_realTargets,_,pkgs) <- ghciSetup Nothing [target] pwd <- getWorkingDir targets <- fmap (concat . snd . unzip) (mapM (getPackageOptsAndTargetFiles pwd) pkgs) forM_ targets (liftIO . putSt...
361
false
true
0
13
118
129
64
65
null
null
shlevy/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
timesIntegerIdKey = mkPreludeMiscIdUnique 67
56
timesIntegerIdKey = mkPreludeMiscIdUnique 67
56
timesIntegerIdKey = mkPreludeMiscIdUnique 67
56
false
false
0
5
15
9
4
5
null
null
jfischoff/hs-mitsuba
src/Mitsuba/Element/Class.hs
bsd-3-clause
addChild x name e ct = x & elementChildrenL.at name .~ (Just $ ChildItem ct e)
82
addChild x name e ct = x & elementChildrenL.at name .~ (Just $ ChildItem ct e)
82
addChild x name e ct = x & elementChildrenL.at name .~ (Just $ ChildItem ct e)
82
false
false
6
8
19
54
21
33
null
null
Zoetermeer/latro
src/Latro/Reorder.hs
mit
runBuildPrecEnv (ExpAssign p id e) = do e' <- runBuildPrecEnv e return $ ExpAssign p id e'
94
runBuildPrecEnv (ExpAssign p id e) = do e' <- runBuildPrecEnv e return $ ExpAssign p id e'
94
runBuildPrecEnv (ExpAssign p id e) = do e' <- runBuildPrecEnv e return $ ExpAssign p id e'
94
false
false
0
8
20
44
19
25
null
null
expipiplus1/vulkan
src/Vulkan/SPIRVRequirements.hs
bsd-3-clause
-- | Check if the intersection of bits is non-zero (.&&.) :: Bits a => a -> a -> Bool x .&&. y = (x .&. y) /= zeroBits
118
(.&&.) :: Bits a => a -> a -> Bool x .&&. y = (x .&. y) /= zeroBits
67
x .&&. y = (x .&. y) /= zeroBits
32
true
true
0
10
28
47
24
23
null
null
jshholland/savannah-wit
src/Board.hs
bsd-3-clause
fenToPos :: String -> Maybe Position fenToPos str = do let w = words str guard $ length w == 6 let [b, t, c, ep, h, f] = w t' <- case t of "w" -> Just White "b" -> Just Black _ -> Nothing ep' <- case ep of "-" -> Just Nothing s -> Just <$> readSquare s ...
548
fenToPos :: String -> Maybe Position fenToPos str = do let w = words str guard $ length w == 6 let [b, t, c, ep, h, f] = w t' <- case t of "w" -> Just White "b" -> Just Black _ -> Nothing ep' <- case ep of "-" -> Just Nothing s -> Just <$> readSquare s ...
548
fenToPos str = do let w = words str guard $ length w == 6 let [b, t, c, ep, h, f] = w t' <- case t of "w" -> Just White "b" -> Just Black _ -> Nothing ep' <- case ep of "-" -> Just Nothing s -> Just <$> readSquare s h' <- readMaybe h f' <- readMaybe ...
511
false
true
0
13
215
232
112
120
null
null
NorfairKing/project-euler
034/haskell/solution.hs
gpl-2.0
main :: IO () main = print solve
32
main :: IO () main = print solve
32
main = print solve
18
false
true
0
6
7
19
9
10
null
null
mightymoose/liquidhaskell
benchmarks/ghc-7.4.1/Float/RealFracMethods.hs
bsd-3-clause
double2Integer :: Double -> Integer double2Integer (D# x) = case decodeDoubleInteger x of (# m, e #) | e <# 0# -> case TO64 m of n -> FROM64 (n `uncheckedIShiftRA64#` negateInt# e) | otherwise -> shiftLInteger m e
265
double2Integer :: Double -> Integer double2Integer (D# x) = case decodeDoubleInteger x of (# m, e #) | e <# 0# -> case TO64 m of n -> FROM64 (n `uncheckedIShiftRA64#` negateInt# e) | otherwise -> shiftLInteger m e
265
double2Integer (D# x) = case decodeDoubleInteger x of (# m, e #) | e <# 0# -> case TO64 m of n -> FROM64 (n `uncheckedIShiftRA64#` negateInt# e) | otherwise -> shiftLInteger m e
229
false
true
0
15
90
98
46
52
null
null
DougBurke/swish
tests/GraphTest.hs
lgpl-2.1
f20601 = arc v206 f01 v201
26
f20601 = arc v206 f01 v201
26
f20601 = arc v206 f01 v201
26
false
false
1
5
5
16
6
10
null
null
ivan-m/paraphrase
src/Text/Paraphrase.hs
bsd-3-clause
-- | Return the result of the first parser in the list that succeeds. -- -- Consider using 'oneOf'' instead, as it will result in better -- error messages. oneOf :: (ParseInput s) => [Parser e s a] -> Parser e s a oneOf = wrapCommitment . foldr onFail (failWith NoParserSatisfied)
284
oneOf :: (ParseInput s) => [Parser e s a] -> Parser e s a oneOf = wrapCommitment . foldr onFail (failWith NoParserSatisfied)
124
oneOf = wrapCommitment . foldr onFail (failWith NoParserSatisfied)
66
true
true
0
9
54
65
33
32
null
null
notae/haskell-exercise
fop/Fop12_2.hs
bsd-3-clause
pretty (RList ra) [] = lbrack <> rbrack
46
pretty (RList ra) [] = lbrack <> rbrack
46
pretty (RList ra) [] = lbrack <> rbrack
46
false
false
0
7
14
23
11
12
null
null
bitemyapp/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
nvLvlist :: String nvLvlist = "lvlist"
38
nvLvlist :: String nvLvlist = "lvlist"
38
nvLvlist = "lvlist"
19
false
true
0
6
5
18
7
11
null
null
bsloane1650/gi-gtk-hs
src/Data/GI/Gtk/ModelView/CustomStore.hs
lgpl-2.1
tempManagedPtr :: Ptr a -> IO (ManagedPtr a) tempManagedPtr p = do #if MIN_VERSION_haskell_gi_base(0,20,3) isDisowned <- newIORef Nothing fPtr <- newForeignPtr_ p return $ ManagedPtr fPtr isDisowned #else isOwned <- newIORef True fPtr <- newForeignPtr_ p return $ ManagedPtr fPtr isOwned #endif
306
tempManagedPtr :: Ptr a -> IO (ManagedPtr a) tempManagedPtr p = do #if MIN_VERSION_haskell_gi_base(0,20,3) isDisowned <- newIORef Nothing fPtr <- newForeignPtr_ p return $ ManagedPtr fPtr isDisowned #else isOwned <- newIORef True fPtr <- newForeignPtr_ p return $ ManagedPtr fPtr isOwned #endif
306
tempManagedPtr p = do #if MIN_VERSION_haskell_gi_base(0,20,3) isDisowned <- newIORef Nothing fPtr <- newForeignPtr_ p return $ ManagedPtr fPtr isDisowned #else isOwned <- newIORef True fPtr <- newForeignPtr_ p return $ ManagedPtr fPtr isOwned #endif
261
false
true
0
8
53
64
29
35
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/SQSQueue.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-name sqsqQueueName :: Lens' SQSQueue (Maybe (Val Text)) sqsqQueueName = lens _sQSQueueQueueName (\s a -> s { _sQSQueueQueueName = a })
246
sqsqQueueName :: Lens' SQSQueue (Maybe (Val Text)) sqsqQueueName = lens _sQSQueueQueueName (\s a -> s { _sQSQueueQueueName = a })
129
sqsqQueueName = lens _sQSQueueQueueName (\s a -> s { _sQSQueueQueueName = a })
78
true
true
0
9
22
52
28
24
null
null
patperry/hs-linear-algebra
tests-old/STVector.hs
bsd-3-clause
getIndices_S x = ( [0..(length x - 1)], x )
43
getIndices_S x = ( [0..(length x - 1)], x )
43
getIndices_S x = ( [0..(length x - 1)], x )
43
false
false
0
9
9
30
16
14
null
null
Jonplussed/midi-free
src/Sound/MIDI/Values/Note.hs
gpl-3.0
dSharp7 = Note 87
18
dSharp7 = Note 87
18
dSharp7 = Note 87
18
false
false
0
5
4
9
4
5
null
null
noughtmare/yi
yi-keymap-vim/src/Yi/Keymap/Vim/Digraph.hs
gpl-2.0
-- CARON switch '\'' '(' = '\x02D8'
35
switch '\'' '(' = '\x02D8'
26
switch '\'' '(' = '\x02D8'
26
true
false
0
5
6
12
6
6
null
null
gitpan/SMOP
m0ld/dist/build/autogen/Paths_m0ld.hs
artistic-2.0
libdir = "/home/pawel/.cabal/lib/m0ld-0.0/ghc-6.12.1"
57
libdir = "/home/pawel/.cabal/lib/m0ld-0.0/ghc-6.12.1"
57
libdir = "/home/pawel/.cabal/lib/m0ld-0.0/ghc-6.12.1"
57
false
false
1
5
6
10
3
7
null
null
nevrenato/HetsAlloy
utils/GenerateRules/GenerateRules.hs
gpl-2.0
readParseFile :: FilePath -> IO ([String], [Import]) readParseFile fp = do inp <- readFile fp case parseInputFile fp inp of Left err -> fail $ "parse error at " ++ err Right x -> return x
216
readParseFile :: FilePath -> IO ([String], [Import]) readParseFile fp = do inp <- readFile fp case parseInputFile fp inp of Left err -> fail $ "parse error at " ++ err Right x -> return x
216
readParseFile fp = do inp <- readFile fp case parseInputFile fp inp of Left err -> fail $ "parse error at " ++ err Right x -> return x
163
false
true
0
11
64
84
40
44
null
null
dec9ue/jhc_copygc
src/Grin/Grin.hs
gpl-2.0
phaseEvalInlined e = e >= PostInlineEval
40
phaseEvalInlined e = e >= PostInlineEval
40
phaseEvalInlined e = e >= PostInlineEval
40
false
false
0
5
5
13
6
7
null
null
ditto-lang/ditto
src/Ditto/Test.hs
gpl-3.0
intrinsicEvaluator = unlines $ evalData ++ [ "def lookup (A : Tp) (As : Ctx) (i : In A As) (as : Env As) : El A where" , "| A * (here * As) (cons * as * a) = a" , "| A * (there * B As i) (cons * as * a) = lookup A As i as" , "end" , "def eval (As : Ctx) (A : Tp) (a : Exp As A) (as : Env As) : El A where" ,...
711
intrinsicEvaluator = unlines $ evalData ++ [ "def lookup (A : Tp) (As : Ctx) (i : In A As) (as : Env As) : El A where" , "| A * (here * As) (cons * as * a) = a" , "| A * (there * B As i) (cons * as * a) = lookup A As i as" , "end" , "def eval (As : Ctx) (A : Tp) (a : Exp As A) (as : Env As) : El A where" ,...
711
intrinsicEvaluator = unlines $ evalData ++ [ "def lookup (A : Tp) (As : Ctx) (i : In A As) (as : Env As) : El A where" , "| A * (here * As) (cons * as * a) = a" , "| A * (there * B As i) (cons * as * a) = lookup A As i as" , "end" , "def eval (As : Ctx) (A : Tp) (a : Exp As A) (as : Env As) : El A where" ,...
711
false
false
0
6
229
50
31
19
null
null
CaptainPatate/xmonad-contrib
XMonad/Prompt.hs
bsd-3-clause
historyNextMatching :: HistoryMatches -> (W.Stack String -> W.Stack String) -> XP () historyNextMatching hm@(HistoryMatches ref) next = do (completed,completions) <- io $ readIORef ref input <- getInput if input `elem` completed then case completions of Just cs -> do let cmd = W.f...
1,333
historyNextMatching :: HistoryMatches -> (W.Stack String -> W.Stack String) -> XP () historyNextMatching hm@(HistoryMatches ref) next = do (completed,completions) <- io $ readIORef ref input <- getInput if input `elem` completed then case completions of Just cs -> do let cmd = W.f...
1,333
historyNextMatching hm@(HistoryMatches ref) next = do (completed,completions) <- io $ readIORef ref input <- getInput if input `elem` completed then case completions of Just cs -> do let cmd = W.focus cs modify $ setCommand cmd modify $ \s -> s { of...
1,248
false
true
0
17
377
315
161
154
null
null
lukexi/ghc-7.8-arm64
compiler/llvmGen/LlvmCodeGen/Data.hs
bsd-3-clause
genData (CmmUninitialised bytes) = return $ LMUninitType (LMArray bytes i8)
79
genData (CmmUninitialised bytes) = return $ LMUninitType (LMArray bytes i8)
79
genData (CmmUninitialised bytes) = return $ LMUninitType (LMArray bytes i8)
79
false
false
0
8
13
30
14
16
null
null
keithodulaigh/Hets
glade-0.12.5.0/demo/calc/CalcModel.hs
gpl-2.0
times = BinOp (*)
18
times = BinOp (*)
18
times = BinOp (*)
18
false
false
0
5
4
11
6
5
null
null
christiaanb/clash-compiler
clash-lib/src/CLaSH/Core/TysPrim.hs
bsd-2-clause
typeSymbolKindTyConName = string2Name "Symbol"
48
typeSymbolKindTyConName = string2Name "Symbol"
48
typeSymbolKindTyConName = string2Name "Symbol"
48
false
false
0
5
5
9
4
5
null
null
gridaphobe/ghc
compiler/simplCore/SimplEnv.hs
bsd-3-clause
andFF :: FloatFlag -> FloatFlag -> FloatFlag andFF FltCareful _ = FltCareful
85
andFF :: FloatFlag -> FloatFlag -> FloatFlag andFF FltCareful _ = FltCareful
85
andFF FltCareful _ = FltCareful
40
false
true
0
6
20
24
12
12
null
null
snoyberg/ghc
compiler/nativeGen/RegAlloc/Graph/Spill.hs
bsd-3-clause
ccSpillSL :: (Reg, Int, Int) -> (Reg, Int, Int) -> (Reg, Int, Int) accSpillSL (r1, s1, l1) (_, s2, l2) = (r1, s1 + s2, l1 + l2)
136
accSpillSL :: (Reg, Int, Int) -> (Reg, Int, Int) -> (Reg, Int, Int) accSpillSL (r1, s1, l1) (_, s2, l2) = (r1, s1 + s2, l1 + l2)
136
accSpillSL (r1, s1, l1) (_, s2, l2) = (r1, s1 + s2, l1 + l2)
68
false
true
0
7
36
86
52
34
null
null
themoritz/cabal
Cabal/Distribution/Simple/LocalBuildInfo.hs
bsd-3-clause
withExeLBI :: PackageDescription -> LocalBuildInfo -> (Executable -> ComponentLocalBuildInfo -> IO ()) -> IO () withExeLBI pkg lbi f = withAllTargetsInBuildOrder' pkg lbi $ \target -> case targetComponent target of CExe exe -> f exe (targetCLBI target) _ -> return () -- |...
398
withExeLBI :: PackageDescription -> LocalBuildInfo -> (Executable -> ComponentLocalBuildInfo -> IO ()) -> IO () withExeLBI pkg lbi f = withAllTargetsInBuildOrder' pkg lbi $ \target -> case targetComponent target of CExe exe -> f exe (targetCLBI target) _ -> return () -- |...
398
withExeLBI pkg lbi f = withAllTargetsInBuildOrder' pkg lbi $ \target -> case targetComponent target of CExe exe -> f exe (targetCLBI target) _ -> return () -- | Perform the action on each enabled 'Benchmark' in the package -- description.
275
false
true
0
12
102
105
51
54
null
null
tittoassini/flat
benchmarks/Main.hs
bsd-3-clause
prints = do -- plf treeNLargeT -- -- plf treeNLargeT >> plf treeNNNLargeT >> -- plf nativeListT -- print (yv,xv) -- print $ pt carT print $ F.getSize Three print $ F.getSize (Leaf Three) print $ F.getSize (treeNLarge) print $ F.getSize (treeNNNLarge) print $ F.getSize (nativeList) -- print $ B....
1,429
prints = do -- plf treeNLargeT -- -- plf treeNLargeT >> plf treeNNNLargeT >> -- plf nativeListT -- print (yv,xv) -- print $ pt carT print $ F.getSize Three print $ F.getSize (Leaf Three) print $ F.getSize (treeNLarge) print $ F.getSize (treeNNNLarge) print $ F.getSize (nativeList) -- print $ B....
1,429
prints = do -- plf treeNLargeT -- -- plf treeNLargeT >> plf treeNNNLargeT >> -- plf nativeListT -- print (yv,xv) -- print $ pt carT print $ F.getSize Three print $ F.getSize (Leaf Three) print $ F.getSize (treeNLarge) print $ F.getSize (treeNNNLarge) print $ F.getSize (nativeList) -- print $ B....
1,429
false
false
2
12
293
436
214
222
null
null
sdiehl/ghc
testsuite/tests/hiefile/should_compile/hie009.hs
bsd-3-clause
norf2' :: Norf' Quux Foo -> Int norf2' (Bar, Foo ()) = 0
56
norf2' :: Norf' Quux Foo -> Int norf2' (Bar, Foo ()) = 0
56
norf2' (Bar, Foo ()) = 0
24
false
true
0
8
12
34
17
17
null
null
tjakway/ghcjvm
compiler/basicTypes/OccName.hs
bsd-3-clause
mkClsOcc :: String -> OccName mkClsOcc = mkOccName clsName
58
mkClsOcc :: String -> OccName mkClsOcc = mkOccName clsName
58
mkClsOcc = mkOccName clsName
28
false
true
0
5
8
18
9
9
null
null
dhrosa/haskell-avr-simulator
AVR/REPL/Command.hs
gpl-3.0
targetPC :: Parser Target16 targetPC = choice [string "PC", string "pc"] >> return TargetPC
91
targetPC :: Parser Target16 targetPC = choice [string "PC", string "pc"] >> return TargetPC
91
targetPC = choice [string "PC", string "pc"] >> return TargetPC
63
false
true
0
8
13
36
17
19
null
null
urbanslug/ghc
testsuite/tests/stranal/should_compile/T9208.hs
bsd-3-clause
-- | send result back sendResult :: Message -> IO () sendResult msg = return ()
79
sendResult :: Message -> IO () sendResult msg = return ()
57
sendResult msg = return ()
26
true
true
0
7
15
29
14
15
null
null
penguinland/nlp
Verbs.hs
gpl-3.0
pastTenseVerbs :: Data.Set.Set String -> String -> [Rule] -> [Node] -> [Node] pastTenseVerbs list word rules next = let pastTenseNodes = [ Node (Verb word (VerbAttributes AnyPerson EitherPlurality Past)) rules next -- This is for other past-like tenses, such as "could have...
708
pastTenseVerbs :: Data.Set.Set String -> String -> [Rule] -> [Node] -> [Node] pastTenseVerbs list word rules next = let pastTenseNodes = [ Node (Verb word (VerbAttributes AnyPerson EitherPlurality Past)) rules next -- This is for other past-like tenses, such as "could have...
708
pastTenseVerbs list word rules next = let pastTenseNodes = [ Node (Verb word (VerbAttributes AnyPerson EitherPlurality Past)) rules next -- This is for other past-like tenses, such as "could have lived" -- TODO: revisit this when more tenses are supported. ...
630
false
true
0
15
219
190
94
96
null
null
pauloborba/plc
src/EntradaESaidaMonads.hs
cc0-1.0
t2a = getChar >>= (\c -> putChar c >>= (\d -> putChar c))
57
t2a = getChar >>= (\c -> putChar c >>= (\d -> putChar c))
57
t2a = getChar >>= (\c -> putChar c >>= (\d -> putChar c))
57
false
false
0
11
12
36
19
17
null
null
vTurbine/ghc
compiler/coreSyn/MkCore.hs
bsd-3-clause
mkSmallTupleCase :: [Id] -- ^ The tuple args -> CoreExpr -- ^ Body of the case -> Id -- ^ A variable of the same type as the scrutinee -> CoreExpr -- ^ Scrutinee -> CoreExpr mkSmallTupleCase [var] body _scrut_var scrut = bindNonRec var scrut body
315
mkSmallTupleCase :: [Id] -- ^ The tuple args -> CoreExpr -- ^ Body of the case -> Id -- ^ A variable of the same type as the scrutinee -> CoreExpr -- ^ Scrutinee -> CoreExpr mkSmallTupleCase [var] body _scrut_var scrut = bindNonRec var scrut body
314
mkSmallTupleCase [var] body _scrut_var scrut = bindNonRec var scrut body
74
false
true
0
8
114
53
29
24
null
null
kuitang/damon
parser.hs
unlicense
readOrThrow parser input = case parse parser "lisp" input of Left err -> throwError $ Parser err Right val -> return val
125
readOrThrow parser input = case parse parser "lisp" input of Left err -> throwError $ Parser err Right val -> return val
125
readOrThrow parser input = case parse parser "lisp" input of Left err -> throwError $ Parser err Right val -> return val
125
false
false
0
9
26
51
22
29
null
null
spechub/Hets
ExtModal/Ship.hs
gpl-2.0
isPrimFoltl :: Foltl -> Bool isPrimFoltl ftl = case ftl of ABoxass _ -> True Call {} -> True PreOp _ f -> isPrimFoltl f _ -> False
138
isPrimFoltl :: Foltl -> Bool isPrimFoltl ftl = case ftl of ABoxass _ -> True Call {} -> True PreOp _ f -> isPrimFoltl f _ -> False
138
isPrimFoltl ftl = case ftl of ABoxass _ -> True Call {} -> True PreOp _ f -> isPrimFoltl f _ -> False
109
false
true
0
8
35
61
29
32
null
null
contivero/hasmin
src/Hasmin/Parser/Internal.hs
bsd-3-clause
-- @namespace <namespace-prefix>? [ <string> | <uri> ]; -- where -- <namespace-prefix> = IDENT atNamespace :: Parser Rule atNamespace = do i <- skipComments *> A.option mempty ident ret <- if T.null i then AtNamespace i . Left <$> stringtype else decideBasedOn i _ <- skipCommen...
716
atNamespace :: Parser Rule atNamespace = do i <- skipComments *> A.option mempty ident ret <- if T.null i then AtNamespace i . Left <$> stringtype else decideBasedOn i _ <- skipComments <* char ';' pure ret where decideBasedOn x | T.toCaseFold x == "url" = ...
621
atNamespace = do i <- skipComments *> A.option mempty ident ret <- if T.null i then AtNamespace i . Left <$> stringtype else decideBasedOn i _ <- skipComments <* char ';' pure ret where decideBasedOn x | T.toCaseFold x == "url" = do c <- A.peek...
594
true
true
0
15
251
206
97
109
null
null
sdiehl/ghc
compiler/typecheck/FamInst.hs
bsd-3-clause
tcInstNewTyCon_maybe :: TyCon -> [TcType] -> Maybe (TcType, TcCoercion) tcInstNewTyCon_maybe = instNewTyCon_maybe
113
tcInstNewTyCon_maybe :: TyCon -> [TcType] -> Maybe (TcType, TcCoercion) tcInstNewTyCon_maybe = instNewTyCon_maybe
113
tcInstNewTyCon_maybe = instNewTyCon_maybe
41
false
true
0
9
11
37
18
19
null
null
plclub/lngen
src/CoqLNOutputCommon.hs
mit
{- | The root to use for bound variables (indices). -} bvarRoot :: String bvarRoot = "n"
89
bvarRoot :: String bvarRoot = "n"
33
bvarRoot = "n"
14
true
true
0
6
17
19
8
11
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/IoTThingPrincipalAttachment.hs
mit
ioTThingPrincipalAttachment :: Val Text -- ^ 'ittpaPrincipal' -> Val Text -- ^ 'ittpaThingName' -> IoTThingPrincipalAttachment ioTThingPrincipalAttachment principalarg thingNamearg = IoTThingPrincipalAttachment { _ioTThingPrincipalAttachmentPrincipal = principalarg , _ioTThingPrincipalAttachmentThingName = ...
336
ioTThingPrincipalAttachment :: Val Text -- ^ 'ittpaPrincipal' -> Val Text -- ^ 'ittpaThingName' -> IoTThingPrincipalAttachment ioTThingPrincipalAttachment principalarg thingNamearg = IoTThingPrincipalAttachment { _ioTThingPrincipalAttachmentPrincipal = principalarg , _ioTThingPrincipalAttachmentThingName = ...
336
ioTThingPrincipalAttachment principalarg thingNamearg = IoTThingPrincipalAttachment { _ioTThingPrincipalAttachmentPrincipal = principalarg , _ioTThingPrincipalAttachmentThingName = thingNamearg }
203
false
true
0
8
42
55
27
28
null
null
pegurnee/2015-01-341
projects/project6_mini_haskell/assist_lib.hs
mit
combine (coreNum:remainingCores) all@(x:xs) = grabAllData coreNum all : combine remainingCores (removeExtraData coreNum xs)
141
combine (coreNum:remainingCores) all@(x:xs) = grabAllData coreNum all : combine remainingCores (removeExtraData coreNum xs)
141
combine (coreNum:remainingCores) all@(x:xs) = grabAllData coreNum all : combine remainingCores (removeExtraData coreNum xs)
141
false
false
0
8
30
50
25
25
null
null
tonymorris/java-character
src/Language/Java/Character/IsDefined.hs
bsd-3-clause
isDefinedSet :: (Num a, Enum a, Ord a) => Diet a isDefinedSet = let r = [ [0..566] , [592..855] , [861..879] , [884..885] , [890] , [894] , [900..906] , [908] , [910..929] , [931..974] , [976..1019] ...
9,996
isDefinedSet :: (Num a, Enum a, Ord a) => Diet a isDefinedSet = let r = [ [0..566] , [592..855] , [861..879] , [884..885] , [890] , [894] , [900..906] , [908] , [910..929] , [931..974] , [976..1019] ...
9,996
isDefinedSet = let r = [ [0..566] , [592..855] , [861..879] , [884..885] , [890] , [894] , [900..906] , [908] , [910..929] , [931..974] , [976..1019] , [1024..1158] , [1160..1230] ...
9,943
false
true
1
10
4,806
3,142
1,966
1,176
null
null
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
mpl-2.0
-- | End date of this inventory item. priEndDate :: Lens' Pricing (Maybe Day) priEndDate = lens _priEndDate (\ s a -> s{_priEndDate = a}) . mapping _Date
161
priEndDate :: Lens' Pricing (Maybe Day) priEndDate = lens _priEndDate (\ s a -> s{_priEndDate = a}) . mapping _Date
123
priEndDate = lens _priEndDate (\ s a -> s{_priEndDate = a}) . mapping _Date
83
true
true
1
10
35
58
28
30
null
null
thomasjm/IHaskell
ipython-kernel/src/IHaskell/IPython/Message/Parser.hs
mit
makeDisplayDatas :: Object -> [DisplayData] makeDisplayDatas dataDict = [DisplayData (read $ unpack mimeType) content | (mimeType, String content) <- HM.toList dataDict]
277
makeDisplayDatas :: Object -> [DisplayData] makeDisplayDatas dataDict = [DisplayData (read $ unpack mimeType) content | (mimeType, String content) <- HM.toList dataDict]
277
makeDisplayDatas dataDict = [DisplayData (read $ unpack mimeType) content | (mimeType, String content) <- HM.toList dataDict]
233
false
true
0
9
128
61
31
30
null
null
nickbart1980/pandoc
src/Text/Pandoc/Writers/MediaWiki.hs
gpl-2.0
inlineToMediaWiki opts (Quoted DoubleQuote lst) = do contents <- inlineListToMediaWiki opts lst return $ "\8220" ++ contents ++ "\8221"
139
inlineToMediaWiki opts (Quoted DoubleQuote lst) = do contents <- inlineListToMediaWiki opts lst return $ "\8220" ++ contents ++ "\8221"
139
inlineToMediaWiki opts (Quoted DoubleQuote lst) = do contents <- inlineListToMediaWiki opts lst return $ "\8220" ++ contents ++ "\8221"
139
false
false
0
9
22
48
21
27
null
null
tonyfloatersu/solution-haskell-craft-of-FP
Chapter8.hs
mit
convertToMove 2 = Scissors
26
convertToMove 2 = Scissors
26
convertToMove 2 = Scissors
26
false
false
0
5
3
9
4
5
null
null
hce/yanas
src/Aeroplane.hs
gpl-2.0
handleAPResponses e = (e, [])
29
handleAPResponses e = (e, [])
29
handleAPResponses e = (e, [])
29
false
false
1
6
4
20
9
11
null
null
massysett/multiarg
tests/Multiarg/Maddash/Tests.hs
bsd-3-clause
genNonOptWord :: Gen Multiarg.Types.Word genNonOptWord = oneof [ return singleDash , return stopper , do c1 <- arbitrary `suchThat` (/= '-') cs <- listOf arbitrary return $ Multiarg.Types.Word (c1 : cs) ]
230
genNonOptWord :: Gen Multiarg.Types.Word genNonOptWord = oneof [ return singleDash , return stopper , do c1 <- arbitrary `suchThat` (/= '-') cs <- listOf arbitrary return $ Multiarg.Types.Word (c1 : cs) ]
230
genNonOptWord = oneof [ return singleDash , return stopper , do c1 <- arbitrary `suchThat` (/= '-') cs <- listOf arbitrary return $ Multiarg.Types.Word (c1 : cs) ]
189
false
true
0
11
57
82
42
40
null
null
tonyday567/web-play
src/Web/Play/Page.hs
mit
playCssLibs :: [Text] playCssLibs = ["http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css"]
113
playCssLibs :: [Text] playCssLibs = ["http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css"]
113
playCssLibs = ["http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css"]
91
false
true
0
5
8
17
10
7
null
null