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 assertEqual "a" (Just O.directedNoOp) $ T.transformDirected dop1 rs T.Left assertEqual "b" (Just O.directedNoOp) $ T.transformDirected dop1 rs T.Right assertEqual "c" (Just O.directedNoOp) $ T.transformDirected dop2 rs T.Left assertEqual "d" (Just O.directedNoOp) $ T.transformDirected dop2 rs T.Right assertEqual "e" Nothing $ T.transformDirected dop3 rs T.Left assertEqual "f" Nothing $ T.transformDirected dop3 rs T.Right
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 assertEqual "a" (Just O.directedNoOp) $ T.transformDirected dop1 rs T.Left assertEqual "b" (Just O.directedNoOp) $ T.transformDirected dop1 rs T.Right assertEqual "c" (Just O.directedNoOp) $ T.transformDirected dop2 rs T.Left assertEqual "d" (Just O.directedNoOp) $ T.transformDirected dop2 rs T.Right assertEqual "e" Nothing $ T.transformDirected dop3 rs T.Left assertEqual "f" Nothing $ T.transformDirected dop3 rs T.Right
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.directedNoOp) $ T.transformDirected dop1 rs T.Left assertEqual "b" (Just O.directedNoOp) $ T.transformDirected dop1 rs T.Right assertEqual "c" (Just O.directedNoOp) $ T.transformDirected dop2 rs T.Left assertEqual "d" (Just O.directedNoOp) $ T.transformDirected dop2 rs T.Right assertEqual "e" Nothing $ T.transformDirected dop3 rs T.Left assertEqual "f" Nothing $ T.transformDirected dop3 rs T.Right
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 = simpleHeaders r in respHeaders `shouldSatisfy` \hs -> ("Content-Type", "application/openapi+json; charset=utf-8") `elem` hs let Just body = decode (simpleBody r) Just schema <- liftIO $ decode <$> BL.readFile "test/fixtures/openapi.json" let args :: M.Map Text Value args = M.fromList [ ( "schema", schema ) , ( "data", body ) ] hdrs = acceptHdrs "application/json" request methodPost "/rpc/validate_json_schema" hdrs (encode args) `shouldRespondWith` "true" { matchStatus = 200 , matchHeaders = [] }
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 = simpleHeaders r in respHeaders `shouldSatisfy` \hs -> ("Content-Type", "application/openapi+json; charset=utf-8") `elem` hs let Just body = decode (simpleBody r) Just schema <- liftIO $ decode <$> BL.readFile "test/fixtures/openapi.json" let args :: M.Map Text Value args = M.fromList [ ( "schema", schema ) , ( "data", body ) ] hdrs = acceptHdrs "application/json" request methodPost "/rpc/validate_json_schema" hdrs (encode args) `shouldRespondWith` "true" { matchStatus = 200 , matchHeaders = [] }
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 -> ("Content-Type", "application/openapi+json; charset=utf-8") `elem` hs let Just body = decode (simpleBody r) Just schema <- liftIO $ decode <$> BL.readFile "test/fixtures/openapi.json" let args :: M.Map Text Value args = M.fromList [ ( "schema", schema ) , ( "data", body ) ] hdrs = acceptHdrs "application/json" request methodPost "/rpc/validate_json_schema" hdrs (encode args) `shouldRespondWith` "true" { matchStatus = 200 , matchHeaders = [] }
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 ncs $ fmap EFR.normalize rs
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 '>' -> if isOpen then wellNested False xs else False _ -> wellNested isOpen 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 _ -> wellNested isOpen xs
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 currentDuty saveRoster newRoster saveTeam newTeam
412
calculatePreviousDuty :: TeamDetails -> IO () calculatePreviousDuty team = do roster <- getTeamRoster team let newRoster = decreaseRosterIndex roster let currentDuty = current newRoster let newTeam = decreaseTimesOnDuty team currentDuty saveRoster newRoster saveTeam newTeam
412
calculatePreviousDuty team = do roster <- getTeamRoster team let newRoster = decreaseRosterIndex roster let currentDuty = current newRoster let newTeam = decreaseTimesOnDuty team currentDuty saveRoster newRoster saveTeam newTeam
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 $ do translate (160, 160) $ rotate angle $ do square translate (100, 100) . rotate (-angle) . color (RGB 255 0 0) $ filledSquare color (RGBA 0 0 255 0.5) . font "20px Bitstream Vera" $ do text (10, 160) "You can use transparency too!" setTimeout 10 $ animate can (angle + 0.01)
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 $ do translate (160, 160) $ rotate angle $ do square translate (100, 100) . rotate (-angle) . color (RGB 255 0 0) $ filledSquare color (RGBA 0 0 255 0.5) . font "20px Bitstream Vera" $ do text (10, 160) "You can use transparency too!" setTimeout 10 $ animate can (angle + 0.01)
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 angle $ do square translate (100, 100) . rotate (-angle) . color (RGB 255 0 0) $ filledSquare color (RGBA 0 0 255 0.5) . font "20px Bitstream Vera" $ do text (10, 160) "You can use transparency too!" setTimeout 10 $ animate can (angle + 0.01)
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 -- back success.
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 -- back success.
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 dayOfWeek = dayOfWeekFromUTCTime currentDay let sameDayNextWeekDayOfWeek = dayOfWeekFromUTCTime sameDayNextWeek $(logInfo) $ "Today is " <> (pack . Time.showGregorian $ currentDay) $(logInfo) $ "Next week is " <> (pack . Time.showGregorian $ sameDayNextWeek) $(logInfo) $ "Day of week is " <> (pack . show $ dayOfWeek) when (dayOfWeek /= sameDayNextWeekDayOfWeek) $ exitWithError ("Day of week for today (" <> show dayOfWeek <> ") " <> "is not the same as day of week for next week (" <> show sameDayNextWeekDayOfWeek <> ")") withParticularDay c sameDayNextWeek
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 dayOfWeek = dayOfWeekFromUTCTime currentDay let sameDayNextWeekDayOfWeek = dayOfWeekFromUTCTime sameDayNextWeek $(logInfo) $ "Today is " <> (pack . Time.showGregorian $ currentDay) $(logInfo) $ "Next week is " <> (pack . Time.showGregorian $ sameDayNextWeek) $(logInfo) $ "Day of week is " <> (pack . show $ dayOfWeek) when (dayOfWeek /= sameDayNextWeekDayOfWeek) $ exitWithError ("Day of week for today (" <> show dayOfWeek <> ") " <> "is not the same as day of week for next week (" <> show sameDayNextWeekDayOfWeek <> ")") withParticularDay c sameDayNextWeek
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 $(logInfo) $ "Today is " <> (pack . Time.showGregorian $ currentDay) $(logInfo) $ "Next week is " <> (pack . Time.showGregorian $ sameDayNextWeek) $(logInfo) $ "Day of week is " <> (pack . show $ dayOfWeek) when (dayOfWeek /= sameDayNextWeekDayOfWeek) $ exitWithError ("Day of week for today (" <> show dayOfWeek <> ") " <> "is not the same as day of week for next week (" <> show sameDayNextWeekDayOfWeek <> ")") withParticularDay c 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) possiblePaths -- part1 result = maximum $ map (calculatePath c) possiblePaths -- part2 print result --mapM_ print $ parser txt
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) possiblePaths -- part1 result = maximum $ map (calculatePath c) possiblePaths -- part2 print result --mapM_ print $ parser txt
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 result = maximum $ map (calculatePath c) possiblePaths -- part2 print result --mapM_ print $ parser txt
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) pkgs) forM_ targets (liftIO . putStrLn) -- | Pull the current Docker image.
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) pkgs) forM_ targets (liftIO . putStrLn) -- | Pull the current Docker image.
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 . putStrLn) -- | Pull the current Docker image.
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 h' <- readMaybe h f' <- readMaybe f b' <- piecesToBoard b c' <- pure c return Position { board = b' , toMove = t' , castling = c' , enPassant = ep' , halfMoves = h' , fullMoves = f' }
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 h' <- readMaybe h f' <- readMaybe f b' <- piecesToBoard b c' <- pure c return Position { board = b' , toMove = t' , castling = c' , enPassant = ep' , halfMoves = h' , fullMoves = f' }
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 f b' <- piecesToBoard b c' <- pure c return Position { board = b' , toMove = t' , castling = c' , enPassant = ep' , halfMoves = h' , fullMoves = f' }
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" , "| As A (var' * * i) as = lookup A As i as" , "| As * (true' *) as = true" , "| As * (false' *) as = false" , "| As C (if' * * b ct cf) as = if (El C) (eval As Bool' b as) (eval As C ct as) (eval As C cf as)" , "| As * (lam' * A B b) as = (a : El A) -> eval (ext As A) B b (cons As as A a)" , "| As * (app' * A B f a) as = (eval As (Arr' A B) f as) (eval As A a as)" , "end" ]
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" , "| As A (var' * * i) as = lookup A As i as" , "| As * (true' *) as = true" , "| As * (false' *) as = false" , "| As C (if' * * b ct cf) as = if (El C) (eval As Bool' b as) (eval As C ct as) (eval As C cf as)" , "| As * (lam' * A B b) as = (a : El A) -> eval (ext As A) B b (cons As as A a)" , "| As * (app' * A B f a) as = (eval As (Arr' A B) f as) (eval As A a as)" , "end" ]
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" , "| As A (var' * * i) as = lookup A As i as" , "| As * (true' *) as = true" , "| As * (false' *) as = false" , "| As C (if' * * b ct cf) as = if (El C) (eval As Bool' b as) (eval As C ct as) (eval As C cf as)" , "| As * (lam' * A B b) as = (a : El A) -> eval (ext As A) B b (cons As as A a)" , "| As * (app' * A B f a) as = (eval As (Arr' A B) f as) (eval As A a as)" , "end" ]
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.focus cs modify $ setCommand cmd modify $ \s -> s { offset = length cmd } io $ writeIORef ref (cmd:completed,Just $ next cs) Nothing -> return () else do -- the user typed something new, recompute completions io . writeIORef ref . ((,) [input]) . filterMatching input =<< gets commandHistory historyNextMatching hm next where filterMatching :: String -> W.Stack String -> Maybe (W.Stack String) filterMatching prefix = W.filter (prefix `isPrefixOf`) . next -- | Retrieve the next history element that starts with -- the current input. Pass it the result of initMatches -- when creating the prompt. Example: -- -- > .. -- > ((modMask,xK_p), shellPrompt . myPrompt =<< initMatches) -- > .. -- > myPrompt ref = def -- > { promptKeymap = M.union [((0,xK_Up), historyUpMatching ref) -- > ,((0,xK_Down), historyDownMatching ref)] -- > (promptKeymap def) -- > , .. } --
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.focus cs modify $ setCommand cmd modify $ \s -> s { offset = length cmd } io $ writeIORef ref (cmd:completed,Just $ next cs) Nothing -> return () else do -- the user typed something new, recompute completions io . writeIORef ref . ((,) [input]) . filterMatching input =<< gets commandHistory historyNextMatching hm next where filterMatching :: String -> W.Stack String -> Maybe (W.Stack String) filterMatching prefix = W.filter (prefix `isPrefixOf`) . next -- | Retrieve the next history element that starts with -- the current input. Pass it the result of initMatches -- when creating the prompt. Example: -- -- > .. -- > ((modMask,xK_p), shellPrompt . myPrompt =<< initMatches) -- > .. -- > myPrompt ref = def -- > { promptKeymap = M.union [((0,xK_Up), historyUpMatching ref) -- > ,((0,xK_Down), historyDownMatching ref)] -- > (promptKeymap def) -- > , .. } --
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 { offset = length cmd } io $ writeIORef ref (cmd:completed,Just $ next cs) Nothing -> return () else do -- the user typed something new, recompute completions io . writeIORef ref . ((,) [input]) . filterMatching input =<< gets commandHistory historyNextMatching hm next where filterMatching :: String -> W.Stack String -> Maybe (W.Stack String) filterMatching prefix = W.filter (prefix `isPrefixOf`) . next -- | Retrieve the next history element that starts with -- the current input. Pass it the result of initMatches -- when creating the prompt. Example: -- -- > .. -- > ((modMask,xK_p), shellPrompt . myPrompt =<< initMatches) -- > .. -- > myPrompt ref = def -- > { promptKeymap = M.union [((0,xK_Up), historyUpMatching ref) -- > ,((0,xK_Down), historyDownMatching ref)] -- > (promptKeymap def) -- > , .. } --
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 () -- | Perform the action on each enabled 'Benchmark' in the package -- description.
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 () -- | Perform the action on each enabled 'Benchmark' in the package -- description.
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.unpack (F.flat v1) -- print $ B.unpack (F.flat v2) -- print $ B.unpack (F.flat t33) -- print $ [33] == B.unpack (F.flat v1) -- print $ [89] == B.unpack (F.flat v2) -- print $ [220,221,25] == B.unpack (F.flat t33) print $ 1175000 == B.length (F.flat treeNNNLarge) print $ 550000 == B.length (F.flat treeNLarge) print $ 2125001== B.length (F.flat nativeList) print $ (B.length (F.flat unicodeTextT),B.length (F.flat unicodeTextUTF8T),B.length (F.flat unicodeStrT)) pp car1 -- ),B.length (serialize PkgStore car1)) -- print $ 1 == B.length (F.flat v2) -- print $ 3 == B.length (F.flat t33) -- print $ 10 == B.length (F.flat wordsV) -- print $ 67 == B.length (F.flat car1) -- --print F.eee print $ ("flat",encodeOnly PkgFlat car1,"store",encodeOnly PkgStore car1,"cbor",encodeOnly PkgCBOR car1) pp (Node (Leaf One) (Leaf Two)) pp ((One,Two,Three),(One,Two,Three),(One,Two,Three)) pp t33 pp (asN33 4) pp v1 pp v2 pp [Five,Five,Five] pp "aaa" pp vw pp wordsV --nprint (F.encode (undefined::Various)) where pp v = print (v,F.encode v) -- F.<> F.eFiller)
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.unpack (F.flat v1) -- print $ B.unpack (F.flat v2) -- print $ B.unpack (F.flat t33) -- print $ [33] == B.unpack (F.flat v1) -- print $ [89] == B.unpack (F.flat v2) -- print $ [220,221,25] == B.unpack (F.flat t33) print $ 1175000 == B.length (F.flat treeNNNLarge) print $ 550000 == B.length (F.flat treeNLarge) print $ 2125001== B.length (F.flat nativeList) print $ (B.length (F.flat unicodeTextT),B.length (F.flat unicodeTextUTF8T),B.length (F.flat unicodeStrT)) pp car1 -- ),B.length (serialize PkgStore car1)) -- print $ 1 == B.length (F.flat v2) -- print $ 3 == B.length (F.flat t33) -- print $ 10 == B.length (F.flat wordsV) -- print $ 67 == B.length (F.flat car1) -- --print F.eee print $ ("flat",encodeOnly PkgFlat car1,"store",encodeOnly PkgStore car1,"cbor",encodeOnly PkgCBOR car1) pp (Node (Leaf One) (Leaf Two)) pp ((One,Two,Three),(One,Two,Three),(One,Two,Three)) pp t33 pp (asN33 4) pp v1 pp v2 pp [Five,Five,Five] pp "aaa" pp vw pp wordsV --nprint (F.encode (undefined::Various)) where pp v = print (v,F.encode v) -- F.<> F.eFiller)
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.unpack (F.flat v1) -- print $ B.unpack (F.flat v2) -- print $ B.unpack (F.flat t33) -- print $ [33] == B.unpack (F.flat v1) -- print $ [89] == B.unpack (F.flat v2) -- print $ [220,221,25] == B.unpack (F.flat t33) print $ 1175000 == B.length (F.flat treeNNNLarge) print $ 550000 == B.length (F.flat treeNLarge) print $ 2125001== B.length (F.flat nativeList) print $ (B.length (F.flat unicodeTextT),B.length (F.flat unicodeTextUTF8T),B.length (F.flat unicodeStrT)) pp car1 -- ),B.length (serialize PkgStore car1)) -- print $ 1 == B.length (F.flat v2) -- print $ 3 == B.length (F.flat t33) -- print $ 10 == B.length (F.flat wordsV) -- print $ 67 == B.length (F.flat car1) -- --print F.eee print $ ("flat",encodeOnly PkgFlat car1,"store",encodeOnly PkgStore car1,"cbor",encodeOnly PkgCBOR car1) pp (Node (Leaf One) (Leaf Two)) pp ((One,Two,Three),(One,Two,Three),(One,Two,Three)) pp t33 pp (asN33 4) pp v1 pp v2 pp [Five,Five,Five] pp "aaa" pp vw pp wordsV --nprint (F.encode (undefined::Various)) where pp v = print (v,F.encode v) -- F.<> F.eFiller)
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 lived" -- TODO: revisit this when more tenses are supported. , Node (Verb word (VerbAttributes OtherPerson EitherPlurality Past)) rules next ] in case getRootFrom "ed" word of Just root | Data.Set.member root list -> pastTenseNodes Just root | Data.Set.member (root ++ "e") list -> pastTenseNodes _ -> []
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 lived" -- TODO: revisit this when more tenses are supported. , Node (Verb word (VerbAttributes OtherPerson EitherPlurality Past)) rules next ] in case getRootFrom "ed" word of Just root | Data.Set.member root list -> pastTenseNodes Just root | Data.Set.member (root ++ "e") list -> pastTenseNodes _ -> []
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. , Node (Verb word (VerbAttributes OtherPerson EitherPlurality Past)) rules next ] in case getRootFrom "ed" word of Just root | Data.Set.member root list -> pastTenseNodes Just root | Data.Set.member (root ++ "e") list -> pastTenseNodes _ -> []
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 _ <- skipComments <* char ';' pure ret where decideBasedOn x | T.toCaseFold x == "url" = do c <- A.peekChar case c of Just '(' -> AtNamespace mempty <$> (char '(' *> (Right <$> url)) _ -> AtNamespace x <$> (skipComments *> stringOrUrl) | otherwise = AtNamespace x <$> (skipComments *> stringOrUrl)
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" = do c <- A.peekChar case c of Just '(' -> AtNamespace mempty <$> (char '(' *> (Right <$> url)) _ -> AtNamespace x <$> (skipComments *> stringOrUrl) | otherwise = AtNamespace x <$> (skipComments *> stringOrUrl)
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.peekChar case c of Just '(' -> AtNamespace mempty <$> (char '(' *> (Right <$> url)) _ -> AtNamespace x <$> (skipComments *> stringOrUrl) | otherwise = AtNamespace x <$> (skipComments *> stringOrUrl)
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 = thingNamearg }
336
ioTThingPrincipalAttachment :: Val Text -- ^ 'ittpaPrincipal' -> Val Text -- ^ 'ittpaThingName' -> IoTThingPrincipalAttachment ioTThingPrincipalAttachment principalarg thingNamearg = IoTThingPrincipalAttachment { _ioTThingPrincipalAttachmentPrincipal = principalarg , _ioTThingPrincipalAttachmentThingName = thingNamearg }
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] , [1024..1158] , [1160..1230] , [1232..1269] , [1272..1273] , [1280..1295] , [1329..1366] , [1369..1375] , [1377..1415] , [1417..1418] , [1425..1441] , [1443..1465] , [1467..1476] , [1488..1514] , [1520..1524] , [1536..1539] , [1548..1557] , [1563] , [1567] , [1569..1594] , [1600..1624] , [1632..1805] , [1807..1866] , [1869..1871] , [1920..1969] , [2305..2361] , [2364..2381] , [2384..2388] , [2392..2416] , [2433..2435] , [2437..2444] , [2447..2448] , [2451..2472] , [2474..2480] , [2482] , [2486..2489] , [2492..2500] , [2503..2504] , [2507..2509] , [2519] , [2524..2525] , [2527..2531] , [2534..2554] , [2561..2563] , [2565..2570] , [2575..2576] , [2579..2600] , [2602..2608] , [2610..2611] , [2613..2614] , [2616..2617] , [2620] , [2622..2626] , [2631..2632] , [2635..2637] , [2649..2652] , [2654] , [2662..2676] , [2689..2691] , [2693..2701] , [2703..2705] , [2707..2728] , [2730..2736] , [2738..2739] , [2741..2745] , [2748..2757] , [2759..2761] , [2763..2765] , [2768] , [2784..2787] , [2790..2799] , [2801] , [2817..2819] , [2821..2828] , [2831..2832] , [2835..2856] , [2858..2864] , [2866..2867] , [2869..2873] , [2876..2883] , [2887..2888] , [2891..2893] , [2902..2903] , [2908..2909] , [2911..2913] , [2918..2929] , [2946..2947] , [2949..2954] , [2958..2960] , [2962..2965] , [2969..2970] , [2972] , [2974..2975] , [2979..2980] , [2984..2986] , [2990..2997] , [2999..3001] , [3006..3010] , [3014..3016] , [3018..3021] , [3031] , [3047..3066] , [3073..3075] , [3077..3084] , [3086..3088] , [3090..3112] , [3114..3123] , [3125..3129] , [3134..3140] , [3142..3144] , [3146..3149] , [3157..3158] , [3168..3169] , [3174..3183] , [3202..3203] , [3205..3212] , [3214..3216] , [3218..3240] , [3242..3251] , [3253..3257] , [3260..3268] , [3270..3272] , [3274..3277] , [3285..3286] , [3294] , [3296..3297] , [3302..3311] , [3330..3331] , [3333..3340] , [3342..3344] , [3346..3368] , [3370..3385] , [3390..3395] , [3398..3400] , [3402..3405] , [3415] , [3424..3425] , [3430..3439] , [3458..3459] , [3461..3478] , [3482..3505] , [3507..3515] , [3517] , [3520..3526] , [3530] , [3535..3540] , [3542] , [3544..3551] , [3570..3572] , [3585..3642] , [3647..3675] , [3713..3714] , [3716] , [3719..3720] , [3722] , [3725] , [3732..3735] , [3737..3743] , [3745..3747] , [3749] , [3751] , [3754..3755] , [3757..3769] , [3771..3773] , [3776..3780] , [3782] , [3784..3789] , [3792..3801] , [3804..3805] , [3840..3911] , [3913..3946] , [3953..3979] , [3984..3991] , [3993..4028] , [4030..4044] , [4047] , [4096..4129] , [4131..4135] , [4137..4138] , [4140..4146] , [4150..4153] , [4160..4185] , [4256..4293] , [4304..4344] , [4347] , [4352..4441] , [4447..4514] , [4520..4601] , [4608..4614] , [4616..4678] , [4680] , [4682..4685] , [4688..4694] , [4696] , [4698..4701] , [4704..4742] , [4744] , [4746..4749] , [4752..4782] , [4784] , [4786..4789] , [4792..4798] , [4800] , [4802..4805] , [4808..4814] , [4816..4822] , [4824..4846] , [4848..4878] , [4880] , [4882..4885] , [4888..4894] , [4896..4934] , [4936..4954] , [4961..4988] , [5024..5108] , [5121..5750] , [5760..5788] , [5792..5872] , [5888..5900] , [5902..5908] , [5920..5942] , [5952..5971] , [5984..5996] , [5998..6000] , [6002..6003] , [6016..6109] , [6112..6121] , [6128..6137] , [6144..6158] , [6160..6169] , [6176..6263] , [6272..6313] , [6400..6428] , [6432..6443] , [6448..6459] , [6464] , [6468..6509] , [6512..6516] , [6624..6655] , [7424..7531] , [7680..7835] , [7840..7929] , [7936..7957] , [7960..7965] , [7968..8005] , [8008..8013] , [8016..8023] , [8025] , [8027] , [8029] , [8031..8061] , [8064..8116] , [8118..8132] , [8134..8147] , [8150..8155] , [8157..8175] , [8178..8180] , [8182..8190] , [8192..8276] , [8279] , [8287..8291] , [8298..8305] , [8308..8334] , [8352..8369] , [8400..8426] , [8448..8507] , [8509..8523] , [8531..8579] , [8592..9168] , [9216..9254] , [9280..9290] , [9312..9751] , [9753..9853] , [9856..9873] , [9888..9889] , [9985..9988] , [9990..9993] , [9996..10023] , [10025..10059] , [10061] , [10063..10066] , [10070] , [10072..10078] , [10081..10132] , [10136..10159] , [10161..10174] , [10192..10219] , [10224..11021] , [11904..11929] , [11931..12019] , [12032..12245] , [12272..12283] , [12288..12351] , [12353..12438] , [12441..12543] , [12549..12588] , [12593..12686] , [12688..12727] , [12784..12830] , [12832..12867] , [12880..12925] , [12927..13054] , [13056..19893] , [19904..40869] , [40960..42124] , [42128..42182] , [44032..55203] , [55296..64045] , [64048..64106] , [64256..64262] , [64275..64279] , [64285..64310] , [64312..64316] , [64318] , [64320..64321] , [64323..64324] , [64326..64433] , [64467..64831] , [64848..64911] , [64914..64967] , [65008..65021] , [65024..65039] , [65056..65059] , [65072..65106] , [65108..65126] , [65128..65131] , [65136..65140] , [65142..65276] , [65279] , [65281..65470] , [65474..65479] , [65482..65487] , [65490..65495] , [65498..65500] , [65504..65510] , [65512..65518] , [65529..65533] , [65536..65547] , [65549..65574] , [65576..65594] , [65596..65597] , [65599..65613] , [65616..65629] , [65664..65786] , [65792..65794] , [65799..65843] , [65847..65855] , [66304..66334] , [66336..66339] , [66352..66378] , [66432..66461] , [66463] , [66560..66717] , [66720..66729] , [67584..67589] , [67592] , [67594..67637] , [67639..67640] , [67644] , [67647] , [118784..119029] , [119040..119078] , [119082..119261] , [119552..119638] , [119808..119892] , [119894..119964] , [119966..119967] , [119970] , [119973..119974] , [119977..119980] , [119982..119993] , [119995] , [119997..120003] , [120005..120069] , [120071..120074] , [120077..120084] , [120086..120092] , [120094..120121] , [120123..120126] , [120128..120132] , [120134] , [120138..120144] , [120146..120483] , [120488..120777] , [120782..120831] , [131072..173782] , [194560..195101] ] in S.fromList . concat $ r
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] , [1024..1158] , [1160..1230] , [1232..1269] , [1272..1273] , [1280..1295] , [1329..1366] , [1369..1375] , [1377..1415] , [1417..1418] , [1425..1441] , [1443..1465] , [1467..1476] , [1488..1514] , [1520..1524] , [1536..1539] , [1548..1557] , [1563] , [1567] , [1569..1594] , [1600..1624] , [1632..1805] , [1807..1866] , [1869..1871] , [1920..1969] , [2305..2361] , [2364..2381] , [2384..2388] , [2392..2416] , [2433..2435] , [2437..2444] , [2447..2448] , [2451..2472] , [2474..2480] , [2482] , [2486..2489] , [2492..2500] , [2503..2504] , [2507..2509] , [2519] , [2524..2525] , [2527..2531] , [2534..2554] , [2561..2563] , [2565..2570] , [2575..2576] , [2579..2600] , [2602..2608] , [2610..2611] , [2613..2614] , [2616..2617] , [2620] , [2622..2626] , [2631..2632] , [2635..2637] , [2649..2652] , [2654] , [2662..2676] , [2689..2691] , [2693..2701] , [2703..2705] , [2707..2728] , [2730..2736] , [2738..2739] , [2741..2745] , [2748..2757] , [2759..2761] , [2763..2765] , [2768] , [2784..2787] , [2790..2799] , [2801] , [2817..2819] , [2821..2828] , [2831..2832] , [2835..2856] , [2858..2864] , [2866..2867] , [2869..2873] , [2876..2883] , [2887..2888] , [2891..2893] , [2902..2903] , [2908..2909] , [2911..2913] , [2918..2929] , [2946..2947] , [2949..2954] , [2958..2960] , [2962..2965] , [2969..2970] , [2972] , [2974..2975] , [2979..2980] , [2984..2986] , [2990..2997] , [2999..3001] , [3006..3010] , [3014..3016] , [3018..3021] , [3031] , [3047..3066] , [3073..3075] , [3077..3084] , [3086..3088] , [3090..3112] , [3114..3123] , [3125..3129] , [3134..3140] , [3142..3144] , [3146..3149] , [3157..3158] , [3168..3169] , [3174..3183] , [3202..3203] , [3205..3212] , [3214..3216] , [3218..3240] , [3242..3251] , [3253..3257] , [3260..3268] , [3270..3272] , [3274..3277] , [3285..3286] , [3294] , [3296..3297] , [3302..3311] , [3330..3331] , [3333..3340] , [3342..3344] , [3346..3368] , [3370..3385] , [3390..3395] , [3398..3400] , [3402..3405] , [3415] , [3424..3425] , [3430..3439] , [3458..3459] , [3461..3478] , [3482..3505] , [3507..3515] , [3517] , [3520..3526] , [3530] , [3535..3540] , [3542] , [3544..3551] , [3570..3572] , [3585..3642] , [3647..3675] , [3713..3714] , [3716] , [3719..3720] , [3722] , [3725] , [3732..3735] , [3737..3743] , [3745..3747] , [3749] , [3751] , [3754..3755] , [3757..3769] , [3771..3773] , [3776..3780] , [3782] , [3784..3789] , [3792..3801] , [3804..3805] , [3840..3911] , [3913..3946] , [3953..3979] , [3984..3991] , [3993..4028] , [4030..4044] , [4047] , [4096..4129] , [4131..4135] , [4137..4138] , [4140..4146] , [4150..4153] , [4160..4185] , [4256..4293] , [4304..4344] , [4347] , [4352..4441] , [4447..4514] , [4520..4601] , [4608..4614] , [4616..4678] , [4680] , [4682..4685] , [4688..4694] , [4696] , [4698..4701] , [4704..4742] , [4744] , [4746..4749] , [4752..4782] , [4784] , [4786..4789] , [4792..4798] , [4800] , [4802..4805] , [4808..4814] , [4816..4822] , [4824..4846] , [4848..4878] , [4880] , [4882..4885] , [4888..4894] , [4896..4934] , [4936..4954] , [4961..4988] , [5024..5108] , [5121..5750] , [5760..5788] , [5792..5872] , [5888..5900] , [5902..5908] , [5920..5942] , [5952..5971] , [5984..5996] , [5998..6000] , [6002..6003] , [6016..6109] , [6112..6121] , [6128..6137] , [6144..6158] , [6160..6169] , [6176..6263] , [6272..6313] , [6400..6428] , [6432..6443] , [6448..6459] , [6464] , [6468..6509] , [6512..6516] , [6624..6655] , [7424..7531] , [7680..7835] , [7840..7929] , [7936..7957] , [7960..7965] , [7968..8005] , [8008..8013] , [8016..8023] , [8025] , [8027] , [8029] , [8031..8061] , [8064..8116] , [8118..8132] , [8134..8147] , [8150..8155] , [8157..8175] , [8178..8180] , [8182..8190] , [8192..8276] , [8279] , [8287..8291] , [8298..8305] , [8308..8334] , [8352..8369] , [8400..8426] , [8448..8507] , [8509..8523] , [8531..8579] , [8592..9168] , [9216..9254] , [9280..9290] , [9312..9751] , [9753..9853] , [9856..9873] , [9888..9889] , [9985..9988] , [9990..9993] , [9996..10023] , [10025..10059] , [10061] , [10063..10066] , [10070] , [10072..10078] , [10081..10132] , [10136..10159] , [10161..10174] , [10192..10219] , [10224..11021] , [11904..11929] , [11931..12019] , [12032..12245] , [12272..12283] , [12288..12351] , [12353..12438] , [12441..12543] , [12549..12588] , [12593..12686] , [12688..12727] , [12784..12830] , [12832..12867] , [12880..12925] , [12927..13054] , [13056..19893] , [19904..40869] , [40960..42124] , [42128..42182] , [44032..55203] , [55296..64045] , [64048..64106] , [64256..64262] , [64275..64279] , [64285..64310] , [64312..64316] , [64318] , [64320..64321] , [64323..64324] , [64326..64433] , [64467..64831] , [64848..64911] , [64914..64967] , [65008..65021] , [65024..65039] , [65056..65059] , [65072..65106] , [65108..65126] , [65128..65131] , [65136..65140] , [65142..65276] , [65279] , [65281..65470] , [65474..65479] , [65482..65487] , [65490..65495] , [65498..65500] , [65504..65510] , [65512..65518] , [65529..65533] , [65536..65547] , [65549..65574] , [65576..65594] , [65596..65597] , [65599..65613] , [65616..65629] , [65664..65786] , [65792..65794] , [65799..65843] , [65847..65855] , [66304..66334] , [66336..66339] , [66352..66378] , [66432..66461] , [66463] , [66560..66717] , [66720..66729] , [67584..67589] , [67592] , [67594..67637] , [67639..67640] , [67644] , [67647] , [118784..119029] , [119040..119078] , [119082..119261] , [119552..119638] , [119808..119892] , [119894..119964] , [119966..119967] , [119970] , [119973..119974] , [119977..119980] , [119982..119993] , [119995] , [119997..120003] , [120005..120069] , [120071..120074] , [120077..120084] , [120086..120092] , [120094..120121] , [120123..120126] , [120128..120132] , [120134] , [120138..120144] , [120146..120483] , [120488..120777] , [120782..120831] , [131072..173782] , [194560..195101] ] in S.fromList . concat $ r
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] , [1232..1269] , [1272..1273] , [1280..1295] , [1329..1366] , [1369..1375] , [1377..1415] , [1417..1418] , [1425..1441] , [1443..1465] , [1467..1476] , [1488..1514] , [1520..1524] , [1536..1539] , [1548..1557] , [1563] , [1567] , [1569..1594] , [1600..1624] , [1632..1805] , [1807..1866] , [1869..1871] , [1920..1969] , [2305..2361] , [2364..2381] , [2384..2388] , [2392..2416] , [2433..2435] , [2437..2444] , [2447..2448] , [2451..2472] , [2474..2480] , [2482] , [2486..2489] , [2492..2500] , [2503..2504] , [2507..2509] , [2519] , [2524..2525] , [2527..2531] , [2534..2554] , [2561..2563] , [2565..2570] , [2575..2576] , [2579..2600] , [2602..2608] , [2610..2611] , [2613..2614] , [2616..2617] , [2620] , [2622..2626] , [2631..2632] , [2635..2637] , [2649..2652] , [2654] , [2662..2676] , [2689..2691] , [2693..2701] , [2703..2705] , [2707..2728] , [2730..2736] , [2738..2739] , [2741..2745] , [2748..2757] , [2759..2761] , [2763..2765] , [2768] , [2784..2787] , [2790..2799] , [2801] , [2817..2819] , [2821..2828] , [2831..2832] , [2835..2856] , [2858..2864] , [2866..2867] , [2869..2873] , [2876..2883] , [2887..2888] , [2891..2893] , [2902..2903] , [2908..2909] , [2911..2913] , [2918..2929] , [2946..2947] , [2949..2954] , [2958..2960] , [2962..2965] , [2969..2970] , [2972] , [2974..2975] , [2979..2980] , [2984..2986] , [2990..2997] , [2999..3001] , [3006..3010] , [3014..3016] , [3018..3021] , [3031] , [3047..3066] , [3073..3075] , [3077..3084] , [3086..3088] , [3090..3112] , [3114..3123] , [3125..3129] , [3134..3140] , [3142..3144] , [3146..3149] , [3157..3158] , [3168..3169] , [3174..3183] , [3202..3203] , [3205..3212] , [3214..3216] , [3218..3240] , [3242..3251] , [3253..3257] , [3260..3268] , [3270..3272] , [3274..3277] , [3285..3286] , [3294] , [3296..3297] , [3302..3311] , [3330..3331] , [3333..3340] , [3342..3344] , [3346..3368] , [3370..3385] , [3390..3395] , [3398..3400] , [3402..3405] , [3415] , [3424..3425] , [3430..3439] , [3458..3459] , [3461..3478] , [3482..3505] , [3507..3515] , [3517] , [3520..3526] , [3530] , [3535..3540] , [3542] , [3544..3551] , [3570..3572] , [3585..3642] , [3647..3675] , [3713..3714] , [3716] , [3719..3720] , [3722] , [3725] , [3732..3735] , [3737..3743] , [3745..3747] , [3749] , [3751] , [3754..3755] , [3757..3769] , [3771..3773] , [3776..3780] , [3782] , [3784..3789] , [3792..3801] , [3804..3805] , [3840..3911] , [3913..3946] , [3953..3979] , [3984..3991] , [3993..4028] , [4030..4044] , [4047] , [4096..4129] , [4131..4135] , [4137..4138] , [4140..4146] , [4150..4153] , [4160..4185] , [4256..4293] , [4304..4344] , [4347] , [4352..4441] , [4447..4514] , [4520..4601] , [4608..4614] , [4616..4678] , [4680] , [4682..4685] , [4688..4694] , [4696] , [4698..4701] , [4704..4742] , [4744] , [4746..4749] , [4752..4782] , [4784] , [4786..4789] , [4792..4798] , [4800] , [4802..4805] , [4808..4814] , [4816..4822] , [4824..4846] , [4848..4878] , [4880] , [4882..4885] , [4888..4894] , [4896..4934] , [4936..4954] , [4961..4988] , [5024..5108] , [5121..5750] , [5760..5788] , [5792..5872] , [5888..5900] , [5902..5908] , [5920..5942] , [5952..5971] , [5984..5996] , [5998..6000] , [6002..6003] , [6016..6109] , [6112..6121] , [6128..6137] , [6144..6158] , [6160..6169] , [6176..6263] , [6272..6313] , [6400..6428] , [6432..6443] , [6448..6459] , [6464] , [6468..6509] , [6512..6516] , [6624..6655] , [7424..7531] , [7680..7835] , [7840..7929] , [7936..7957] , [7960..7965] , [7968..8005] , [8008..8013] , [8016..8023] , [8025] , [8027] , [8029] , [8031..8061] , [8064..8116] , [8118..8132] , [8134..8147] , [8150..8155] , [8157..8175] , [8178..8180] , [8182..8190] , [8192..8276] , [8279] , [8287..8291] , [8298..8305] , [8308..8334] , [8352..8369] , [8400..8426] , [8448..8507] , [8509..8523] , [8531..8579] , [8592..9168] , [9216..9254] , [9280..9290] , [9312..9751] , [9753..9853] , [9856..9873] , [9888..9889] , [9985..9988] , [9990..9993] , [9996..10023] , [10025..10059] , [10061] , [10063..10066] , [10070] , [10072..10078] , [10081..10132] , [10136..10159] , [10161..10174] , [10192..10219] , [10224..11021] , [11904..11929] , [11931..12019] , [12032..12245] , [12272..12283] , [12288..12351] , [12353..12438] , [12441..12543] , [12549..12588] , [12593..12686] , [12688..12727] , [12784..12830] , [12832..12867] , [12880..12925] , [12927..13054] , [13056..19893] , [19904..40869] , [40960..42124] , [42128..42182] , [44032..55203] , [55296..64045] , [64048..64106] , [64256..64262] , [64275..64279] , [64285..64310] , [64312..64316] , [64318] , [64320..64321] , [64323..64324] , [64326..64433] , [64467..64831] , [64848..64911] , [64914..64967] , [65008..65021] , [65024..65039] , [65056..65059] , [65072..65106] , [65108..65126] , [65128..65131] , [65136..65140] , [65142..65276] , [65279] , [65281..65470] , [65474..65479] , [65482..65487] , [65490..65495] , [65498..65500] , [65504..65510] , [65512..65518] , [65529..65533] , [65536..65547] , [65549..65574] , [65576..65594] , [65596..65597] , [65599..65613] , [65616..65629] , [65664..65786] , [65792..65794] , [65799..65843] , [65847..65855] , [66304..66334] , [66336..66339] , [66352..66378] , [66432..66461] , [66463] , [66560..66717] , [66720..66729] , [67584..67589] , [67592] , [67594..67637] , [67639..67640] , [67644] , [67647] , [118784..119029] , [119040..119078] , [119082..119261] , [119552..119638] , [119808..119892] , [119894..119964] , [119966..119967] , [119970] , [119973..119974] , [119977..119980] , [119982..119993] , [119995] , [119997..120003] , [120005..120069] , [120071..120074] , [120077..120084] , [120086..120092] , [120094..120121] , [120123..120126] , [120128..120132] , [120134] , [120138..120144] , [120146..120483] , [120488..120777] , [120782..120831] , [131072..173782] , [194560..195101] ] in S.fromList . concat $ r
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