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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
softwaremechanic/Miscellaneous | Haskell/rpn.hs | gpl-2.0 | --solveRPN :: (Num a, Read a) => String -> a
solveRPN :: String -> Float
solveRPN = head . foldl foldingFunction [] . words
where foldingFunction (x:y:ys) "*" = (x * y):ys
foldingFunction (x:y:ys) "+" = (x + y):ys
foldingFunction (x:y:ys) "/" = (y / x):ys
foldingFunction (x:y:ys) "-" ... | 546 | solveRPN :: String -> Float
solveRPN = head . foldl foldingFunction [] . words
where foldingFunction (x:y:ys) "*" = (x * y):ys
foldingFunction (x:y:ys) "+" = (x + y):ys
foldingFunction (x:y:ys) "/" = (y / x):ys
foldingFunction (x:y:ys) "-" = (y - x):ys
foldingFunction (x:y:ys... | 500 | solveRPN = head . foldl foldingFunction [] . words
where foldingFunction (x:y:ys) "*" = (x * y):ys
foldingFunction (x:y:ys) "+" = (x + y):ys
foldingFunction (x:y:ys) "/" = (y / x):ys
foldingFunction (x:y:ys) "-" = (y - x):ys
foldingFunction (x:y:ys) "^" = (y ** x):ys
... | 472 | true | true | 0 | 10 | 153 | 250 | 130 | 120 | null | null |
romanb/amazonka | amazonka-storagegateway/gen/Network/AWS/StorageGateway/ActivateGateway.hs | mpl-2.0 | -- | 'ActivateGateway' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'agActivationKey' @::@ 'Text'
--
-- * 'agGatewayName' @::@ 'Text'
--
-- * 'agGatewayRegion' @::@ 'Text'
--
-- * 'agGatewayTimezone' @::@ 'Text'
--
-- * 'agGatewayType' @::@ 'Maybe' 'Text'
--
-- * 'agMediumChangerTy... | 906 | activateGateway :: Text -- ^ 'agActivationKey'
-> Text -- ^ 'agGatewayName'
-> Text -- ^ 'agGatewayTimezone'
-> Text -- ^ 'agGatewayRegion'
-> ActivateGateway
activateGateway p1 p2 p3 p4 = ActivateGateway
{ _agActivationKey = p1
, _agGatewayNam... | 513 | activateGateway p1 p2 p3 p4 = ActivateGateway
{ _agActivationKey = p1
, _agGatewayName = p2
, _agGatewayTimezone = p3
, _agGatewayRegion = p4
, _agGatewayType = Nothing
, _agTapeDriveType = Nothing
, _agMediumChangerType = Nothing
} | 290 | true | true | 0 | 10 | 239 | 111 | 71 | 40 | null | null |
alexbaluta/courseography | dependencies/HaXml-1.25.3/src/Text/XML/HaXml/ShowXmlLazy.hs | gpl-3.0 | ($$) :: [Char] -> [Char] -> [Char]
($$) a b = a ++ "\n" ++ b | 60 | ($$) :: [Char] -> [Char] -> [Char]
($$) a b = a ++ "\n" ++ b | 60 | ($$) a b = a ++ "\n" ++ b | 25 | false | true | 0 | 7 | 15 | 45 | 26 | 19 | null | null |
ingemaradahl/bilder | src/TypeChecker/Utils.hs | lgpl-3.0 | qualToPos (QType _) = (-1,-1) | 29 | qualToPos (QType _) = (-1,-1) | 29 | qualToPos (QType _) = (-1,-1) | 29 | false | false | 0 | 7 | 4 | 25 | 13 | 12 | null | null |
grnet/snf-ganeti | src/Ganeti/HTools/Cluster/Evacuate.hs | bsd-2-clause | updateEvacSolution :: (Node.List, Instance.List, EvacSolution)
-> Idx
-> Result (Node.List, Instance.List, [OpCodes.OpCode])
-> (Node.List, Instance.List, EvacSolution)
updateEvacSolution (nl, il, es) idx (Bad msg) =
(nl, il, es { esFailed = (idx, msg):esFailed... | 325 | updateEvacSolution :: (Node.List, Instance.List, EvacSolution)
-> Idx
-> Result (Node.List, Instance.List, [OpCodes.OpCode])
-> (Node.List, Instance.List, EvacSolution)
updateEvacSolution (nl, il, es) idx (Bad msg) =
(nl, il, es { esFailed = (idx, msg):esFailed... | 325 | updateEvacSolution (nl, il, es) idx (Bad msg) =
(nl, il, es { esFailed = (idx, msg):esFailed es}) | 99 | false | true | 0 | 11 | 91 | 122 | 70 | 52 | null | null |
ocharles/reactive-banana-gtk | ReactiveBananaGtk.hs | bsd-3-clause | volumeButton :: (Monoid widget, c GTK.VolumeButton)
=> Gtk c widget ()
volumeButton =
do widget <- liftIO volumeButtonNew
rb (liftIOLater (widgetShow widget))
tellCast widget | 199 | volumeButton :: (Monoid widget, c GTK.VolumeButton)
=> Gtk c widget ()
volumeButton =
do widget <- liftIO volumeButtonNew
rb (liftIOLater (widgetShow widget))
tellCast widget | 199 | volumeButton =
do widget <- liftIO volumeButtonNew
rb (liftIOLater (widgetShow widget))
tellCast widget | 115 | false | true | 0 | 12 | 48 | 77 | 34 | 43 | null | null |
rahulmutt/ghcvm | compiler/Eta/CodeGen/Prim.hs | bsd-3-clause | byteArrayWriteOp :: FieldType -> Code -> [Code] -> Code
byteArrayWriteOp ft argCode = \[this, ix, val] ->
addrWriteOp ft argCode [this <> byteArrayBuf, ix, val] | 162 | byteArrayWriteOp :: FieldType -> Code -> [Code] -> Code
byteArrayWriteOp ft argCode = \[this, ix, val] ->
addrWriteOp ft argCode [this <> byteArrayBuf, ix, val] | 162 | byteArrayWriteOp ft argCode = \[this, ix, val] ->
addrWriteOp ft argCode [this <> byteArrayBuf, ix, val] | 106 | false | true | 0 | 8 | 26 | 65 | 36 | 29 | null | null |
k0001/tisch | src/lib/Tisch/Internal/Aggregation.hs | apache-2.0 | -- | Logical OR of all input values.
lorgg :: O.Aggregator (Kol O.PGBool) (Kol O.PGBool)
lorgg = unsafeMakeAggr HDB.AggrBoolOr | 126 | lorgg :: O.Aggregator (Kol O.PGBool) (Kol O.PGBool)
lorgg = unsafeMakeAggr HDB.AggrBoolOr | 89 | lorgg = unsafeMakeAggr HDB.AggrBoolOr | 37 | true | true | 1 | 8 | 18 | 43 | 20 | 23 | null | null |
shlevy/ghc | compiler/types/Type.hs | bsd-3-clause | isTypeLevPoly :: Type -> Bool
isTypeLevPoly = go
where
go ty@(TyVarTy {}) = check_kind ty
go ty@(AppTy {}) = check_kind ty
go ty@(TyConApp tc _) | not (isTcLevPoly tc) = False
| otherwise = check_kind ty
go (For... | 900 | isTypeLevPoly :: Type -> Bool
isTypeLevPoly = go
where
go ty@(TyVarTy {}) = check_kind ty
go ty@(AppTy {}) = check_kind ty
go ty@(TyConApp tc _) | not (isTcLevPoly tc) = False
| otherwise = check_kind ty
go (For... | 900 | isTypeLevPoly = go
where
go ty@(TyVarTy {}) = check_kind ty
go ty@(AppTy {}) = check_kind ty
go ty@(TyConApp tc _) | not (isTcLevPoly tc) = False
| otherwise = check_kind ty
go (ForAllTy _ ty) ... | 870 | false | true | 10 | 10 | 387 | 244 | 113 | 131 | null | null |
binesiyu/ifl | examples/ch05/PrettyStub.hs | mit | text :: String -> Doc
text str = undefined | 42 | text :: String -> Doc
text str = undefined | 42 | text str = undefined | 20 | false | true | 0 | 7 | 8 | 24 | 10 | 14 | null | null |
yiannist/ganeti | src/Ganeti/Config.hs | bsd-2-clause | -- | Computes the role of a node.
getNodeRole :: ConfigData -> Node -> NodeRole
getNodeRole cfg node
| uuidOf node == clusterMasterNode (configCluster cfg) = NRMaster
| nodeMasterCandidate node = NRCandidate
| nodeDrained node = NRDrained
| nodeOffline node = NROffline
| otherwise = NRRegular | 303 | getNodeRole :: ConfigData -> Node -> NodeRole
getNodeRole cfg node
| uuidOf node == clusterMasterNode (configCluster cfg) = NRMaster
| nodeMasterCandidate node = NRCandidate
| nodeDrained node = NRDrained
| nodeOffline node = NROffline
| otherwise = NRRegular | 269 | getNodeRole cfg node
| uuidOf node == clusterMasterNode (configCluster cfg) = NRMaster
| nodeMasterCandidate node = NRCandidate
| nodeDrained node = NRDrained
| nodeOffline node = NROffline
| otherwise = NRRegular | 223 | true | true | 4 | 11 | 55 | 85 | 41 | 44 | null | null |
badp/ganeti | src/Ganeti/Constants.hs | gpl-2.0 | xenKernel :: String
xenKernel = AutoConf.xenKernel | 50 | xenKernel :: String
xenKernel = AutoConf.xenKernel | 50 | xenKernel = AutoConf.xenKernel | 30 | false | true | 0 | 5 | 5 | 13 | 7 | 6 | null | null |
andreasabel/helf | src/DatastrucImpl/SimpleDynArray.hs | mit | -- get' Empty _ = error "tried to search in an empty array"
-- | Splitting the array. O(log n).
split :: DynArray a -> Int -> (DynArray a, DynArray a)
split arr i
| i <= 0 = (DatastrucImpl.SimpleDynArray.empty, arr)
| i >= len arr = (arr, DatastrucImpl.SimpleDynArray.empty)
| otherwise = split' arr i | 308 | split :: DynArray a -> Int -> (DynArray a, DynArray a)
split arr i
| i <= 0 = (DatastrucImpl.SimpleDynArray.empty, arr)
| i >= len arr = (arr, DatastrucImpl.SimpleDynArray.empty)
| otherwise = split' arr i | 211 | split arr i
| i <= 0 = (DatastrucImpl.SimpleDynArray.empty, arr)
| i >= len arr = (arr, DatastrucImpl.SimpleDynArray.empty)
| otherwise = split' arr i | 156 | true | true | 1 | 9 | 61 | 99 | 51 | 48 | null | null |
mettekou/ghc | compiler/basicTypes/Literal.hs | bsd-3-clause | narrow16IntLit l = pprPanic "narrow16IntLit" (ppr l) | 65 | narrow16IntLit l = pprPanic "narrow16IntLit" (ppr l) | 65 | narrow16IntLit l = pprPanic "narrow16IntLit" (ppr l) | 65 | false | false | 0 | 7 | 19 | 20 | 9 | 11 | null | null |
GaloisInc/tower | tower/src/Ivory/Tower/AST/Comment.hs | bsd-3-clause | ppRng :: Range -> Doc
ppRng (Range (Position _ ln0 _) (Position _ ln1 _)) =
if ln0 == ln1
then text (show ln0)
else text (show ln0) <+> char '-' <+> text (show ln1) | 174 | ppRng :: Range -> Doc
ppRng (Range (Position _ ln0 _) (Position _ ln1 _)) =
if ln0 == ln1
then text (show ln0)
else text (show ln0) <+> char '-' <+> text (show ln1) | 174 | ppRng (Range (Position _ ln0 _) (Position _ ln1 _)) =
if ln0 == ln1
then text (show ln0)
else text (show ln0) <+> char '-' <+> text (show ln1) | 152 | false | true | 0 | 10 | 44 | 96 | 47 | 49 | null | null |
hspec/hspec | hspec-core/src/Test/Hspec/Core/Formatters/Internal.hs | mit | getRealTime :: FormatM Seconds
getRealTime = do
t1 <- liftIO getMonotonicTime
t0 <- gets stateStartTime
return (t1 - t0) | 126 | getRealTime :: FormatM Seconds
getRealTime = do
t1 <- liftIO getMonotonicTime
t0 <- gets stateStartTime
return (t1 - t0) | 126 | getRealTime = do
t1 <- liftIO getMonotonicTime
t0 <- gets stateStartTime
return (t1 - t0) | 95 | false | true | 0 | 9 | 24 | 47 | 21 | 26 | null | null |
roberth/uu-helium | test/correct/EqSyn.hs | gpl-3.0 | main = x == x | 13 | main = x == x | 13 | main = x == x | 13 | false | false | 1 | 5 | 4 | 13 | 5 | 8 | null | null |
kfish/hogg | tools/hogg.hs | bsd-3-clause | outputHandle :: Config -> IO Handle
outputHandle config =
maybe (evaluate stdout) (\f -> openBinaryFile f WriteMode) (outputCfg config) | 139 | outputHandle :: Config -> IO Handle
outputHandle config =
maybe (evaluate stdout) (\f -> openBinaryFile f WriteMode) (outputCfg config) | 139 | outputHandle config =
maybe (evaluate stdout) (\f -> openBinaryFile f WriteMode) (outputCfg config) | 103 | false | true | 0 | 8 | 22 | 58 | 27 | 31 | null | null |
urbanslug/ghc | compiler/parser/Ctype.hs | bsd-3-clause | is_symbol = is_ctype cSymbol | 28 | is_symbol = is_ctype cSymbol | 28 | is_symbol = is_ctype cSymbol | 28 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
brendanhay/gogol | gogol-chat/gen/Network/Google/Chat/Types/Product.hs | mpl-2.0 | -- | Output only. The display name (only if the space is a room). Please note
-- that this field might not be populated in direct messages between
-- humans.
sDisplayName :: Lens' Space (Maybe Text)
sDisplayName
= lens _sDisplayName (\ s a -> s{_sDisplayName = a}) | 266 | sDisplayName :: Lens' Space (Maybe Text)
sDisplayName
= lens _sDisplayName (\ s a -> s{_sDisplayName = a}) | 108 | sDisplayName
= lens _sDisplayName (\ s a -> s{_sDisplayName = a}) | 67 | true | true | 1 | 9 | 48 | 52 | 27 | 25 | null | null |
JoeyEremondi/elm-pattern-effects | src/Generate/JavaScript/Expression.hs | bsd-3-clause | generateTailFunction :: String -> [String] -> Opt.Expr -> State Int (Expression ())
generateTailFunction name args body =
do code <- generateCode body
return $ generateFunctionWithArity args $ JsBlock $ (:[]) $
LabelledStmt ()
(Id () (Var.safe name))
(WhileStmt () (BoolLit... | 349 | generateTailFunction :: String -> [String] -> Opt.Expr -> State Int (Expression ())
generateTailFunction name args body =
do code <- generateCode body
return $ generateFunctionWithArity args $ JsBlock $ (:[]) $
LabelledStmt ()
(Id () (Var.safe name))
(WhileStmt () (BoolLit... | 349 | generateTailFunction name args body =
do code <- generateCode body
return $ generateFunctionWithArity args $ JsBlock $ (:[]) $
LabelledStmt ()
(Id () (Var.safe name))
(WhileStmt () (BoolLit () True) (toStatement code)) | 265 | false | true | 0 | 13 | 90 | 141 | 69 | 72 | null | null |
nikita-volkov/bit-array | library/BitArray.hs | mit | qq = NumericQQ.bin | 18 | qq = NumericQQ.bin | 18 | qq = NumericQQ.bin | 18 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
wavewave/lhc-analysis-collection | heavyhiggs/combine2.hs | gpl-3.0 | effXsec :: (Int,Int,Double,Double,Double,Double,Double,Double,Double) -> EffXsec
effXsec (a,b,c,d,e,f,g,h,i) = EffXsec a b i | 124 | effXsec :: (Int,Int,Double,Double,Double,Double,Double,Double,Double) -> EffXsec
effXsec (a,b,c,d,e,f,g,h,i) = EffXsec a b i | 124 | effXsec (a,b,c,d,e,f,g,h,i) = EffXsec a b i | 43 | false | true | 0 | 6 | 11 | 83 | 49 | 34 | null | null |
AndrewRademacher/hasql-postgres | library/Hasql/Postgres/ErrorCode.hs | mit | -- | Code \"42P04\".
duplicate_database :: ErrorCode = "42P04" | 96 | duplicate_database :: ErrorCode = "42P04" | 75 | duplicate_database :: ErrorCode = "42P04" | 75 | true | false | 0 | 5 | 42 | 12 | 6 | 6 | null | null |
quchen/stg | src/Stg/Marshal/FromStg.hs | bsd-3-clause | -- | Like @matchCon2@, but for ternary 'Constr'uctors.
matchCon3 :: Constr -> Closure -> Either (Maybe FromStgError) ((Atom, Atom, Atom), Locals)
matchCon3 _ (Closure lambdaForm _)
| classify lambdaForm == LambdaThunk = Left (Just (IsWrongLambdaType LambdaThunk))
| classify lambdaForm == LambdaFun = Left (Jus... | 352 | matchCon3 :: Constr -> Closure -> Either (Maybe FromStgError) ((Atom, Atom, Atom), Locals)
matchCon3 _ (Closure lambdaForm _)
| classify lambdaForm == LambdaThunk = Left (Just (IsWrongLambdaType LambdaThunk))
| classify lambdaForm == LambdaFun = Left (Just (IsWrongLambdaType LambdaFun)) | 297 | matchCon3 _ (Closure lambdaForm _)
| classify lambdaForm == LambdaThunk = Left (Just (IsWrongLambdaType LambdaThunk))
| classify lambdaForm == LambdaFun = Left (Just (IsWrongLambdaType LambdaFun)) | 206 | true | true | 0 | 10 | 55 | 124 | 60 | 64 | null | null |
bixuanzju/fcore | lib/simplify/Simplify.hs | bsd-2-clause | simplify' :: FI.Expr t e -> Expr t e
simplify' = Impl.dedeBruE 0 [] 0 [] . Impl.transExpr 0 0 . unsafeCoerce | 108 | simplify' :: FI.Expr t e -> Expr t e
simplify' = Impl.dedeBruE 0 [] 0 [] . Impl.transExpr 0 0 . unsafeCoerce | 108 | simplify' = Impl.dedeBruE 0 [] 0 [] . Impl.transExpr 0 0 . unsafeCoerce | 71 | false | true | 0 | 8 | 21 | 57 | 27 | 30 | null | null |
olsner/ghc | compiler/simplCore/SetLevels.hs | bsd-3-clause | canFloat_maybe :: LevelEnv
-> Bool -- Strict context
-> Bool -- The float has a value lambda
-> Type
-> Maybe ( LevelledExpr -> LevelledExpr -- Wrep the flaot
, LevelledExpr -> LevelledExpr) -- Wrap the use
-- See Note [Flo... | 1,292 | canFloat_maybe :: LevelEnv
-> Bool -- Strict context
-> Bool -- The float has a value lambda
-> Type
-> Maybe ( LevelledExpr -> LevelledExpr -- Wrep the flaot
, LevelledExpr -> LevelledExpr)
canFloat_maybe env strict_ctxt fl... | 1,230 | canFloat_maybe env strict_ctxt float_is_lam expr_ty
| float_is_lam || not (isUnliftedType expr_ty)
= Just (id, id) -- No wrapping needed if the type is lifted, or
-- if we are wrapping it in one or more value lambdas
-- OK, so the float has an unlifted type and no value lambdas
| strict_ctxt
... | 943 | true | true | 0 | 13 | 401 | 328 | 169 | 159 | null | null |
evolutics/haskell-formatter | src/library/Language/Haskell/Formatter/Toolkit/ListTool.hs | gpl-3.0 | {-| @concatenateRuns p l@ repeatedly concatenates @p@ lists of @l@.
>>> concatenateRuns 2 ["a", "b", "c", "d", "e"]
["ab","cd","e"] -}
concatenateRuns :: Int -> [[a]] -> [[a]]
concatenateRuns _ [] = [] | 210 | concatenateRuns :: Int -> [[a]] -> [[a]]
concatenateRuns _ [] = [] | 66 | concatenateRuns _ [] = [] | 25 | true | true | 0 | 8 | 40 | 41 | 23 | 18 | null | null |
kazu-yamamoto/http2 | bench-priority/Main.hs | bsd-3-clause | deleteP :: [(Key,Weight)] -> P.PriorityQueue Int
deleteP xs = foldl' (\q k -> let (_,!q') = P.delete k q in q') pq ks
where
!pq = createP xs P.empty
(ks,_) = unzip xs | 176 | deleteP :: [(Key,Weight)] -> P.PriorityQueue Int
deleteP xs = foldl' (\q k -> let (_,!q') = P.delete k q in q') pq ks
where
!pq = createP xs P.empty
(ks,_) = unzip xs | 176 | deleteP xs = foldl' (\q k -> let (_,!q') = P.delete k q in q') pq ks
where
!pq = createP xs P.empty
(ks,_) = unzip xs | 127 | false | true | 0 | 13 | 42 | 114 | 54 | 60 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 228327 = 5174 | 33 | getValueFromProduct 228327 = 5174 | 33 | getValueFromProduct 228327 = 5174 | 33 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
muhbaasu/hmon | src/Main.hs | apache-2.0 | cpuMonitor :: Chan Value -> IO ()
cpuMonitor chan = recWritePerc chan zeros zeros | 81 | cpuMonitor :: Chan Value -> IO ()
cpuMonitor chan = recWritePerc chan zeros zeros | 81 | cpuMonitor chan = recWritePerc chan zeros zeros | 47 | false | true | 0 | 8 | 13 | 38 | 16 | 22 | null | null |
brendanhay/gogol | gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/ConsentStores/UserDataMAppings/Patch.hs | mpl-2.0 | -- | JSONP
pldscsudmapCallback :: Lens' ProjectsLocationsDataSetsConsentStoresUserDataMAppingsPatch (Maybe Text)
pldscsudmapCallback
= lens _pldscsudmapCallback
(\ s a -> s{_pldscsudmapCallback = a}) | 207 | pldscsudmapCallback :: Lens' ProjectsLocationsDataSetsConsentStoresUserDataMAppingsPatch (Maybe Text)
pldscsudmapCallback
= lens _pldscsudmapCallback
(\ s a -> s{_pldscsudmapCallback = a}) | 196 | pldscsudmapCallback
= lens _pldscsudmapCallback
(\ s a -> s{_pldscsudmapCallback = a}) | 94 | true | true | 1 | 9 | 27 | 51 | 25 | 26 | null | null |
ekmett/wl-pprint-extras | test/WLPPrintTests.hs | bsd-2-clause | catTests :: Assertion
catTests = do assertRender 80 "Cat test 1" "some code"
$ text "some" <> space <> text "code" | 130 | catTests :: Assertion
catTests = do assertRender 80 "Cat test 1" "some code"
$ text "some" <> space <> text "code" | 130 | catTests = do assertRender 80 "Cat test 1" "some code"
$ text "some" <> space <> text "code" | 108 | false | true | 0 | 11 | 36 | 46 | 19 | 27 | null | null |
dorlowd/haskell-servant-realworld-example-app | src/DB.hs | mit | titleToSlug :: Text -> Text
titleToSlug = T.intercalate "-" . T.words | 69 | titleToSlug :: Text -> Text
titleToSlug = T.intercalate "-" . T.words | 69 | titleToSlug = T.intercalate "-" . T.words | 41 | false | true | 0 | 7 | 10 | 26 | 13 | 13 | null | null |
mattdonnelly/CS4012-Minesweeper | src/Minesweeper/Tests.hs | mit | test False = return () | 22 | test False = return () | 22 | test False = return () | 22 | false | false | 1 | 6 | 4 | 18 | 6 | 12 | null | null |
andyarvanitis/Idris-dev | src/Idris/REPL.hs | bsd-3-clause | process fn (Compile codegen f)
| map toLower (takeExtension f) `elem` [".idr", ".lidr", ".idc"] =
iPrintError $ "Invalid filename for compiler output \"" ++ f ++"\""
| otherwise = do (m, _) <- elabVal recinfo ERHS
(PApp fc (PRef fc (sUN "run__IO"))
... | 583 | process fn (Compile codegen f)
| map toLower (takeExtension f) `elem` [".idr", ".lidr", ".idc"] =
iPrintError $ "Invalid filename for compiler output \"" ++ f ++"\""
| otherwise = do (m, _) <- elabVal recinfo ERHS
(PApp fc (PRef fc (sUN "run__IO"))
... | 583 | process fn (Compile codegen f)
| map toLower (takeExtension f) `elem` [".idr", ".lidr", ".idc"] =
iPrintError $ "Invalid filename for compiler output \"" ++ f ++"\""
| otherwise = do (m, _) <- elabVal recinfo ERHS
(PApp fc (PRef fc (sUN "run__IO"))
... | 583 | false | false | 3 | 18 | 235 | 218 | 103 | 115 | null | null |
josecastro/lambda | Lambda.hs | gpl-2.0 | equal (Apply exp1 exp2) (Apply exp3 exp4) binding =
let
(result, newBinding) = equal exp1 exp3 binding
in
if not result
then (False, binding)
else equal exp2 exp4 newBinding | 207 | equal (Apply exp1 exp2) (Apply exp3 exp4) binding =
let
(result, newBinding) = equal exp1 exp3 binding
in
if not result
then (False, binding)
else equal exp2 exp4 newBinding | 207 | equal (Apply exp1 exp2) (Apply exp3 exp4) binding =
let
(result, newBinding) = equal exp1 exp3 binding
in
if not result
then (False, binding)
else equal exp2 exp4 newBinding | 207 | false | false | 0 | 9 | 62 | 78 | 39 | 39 | null | null |
michalkonecny/aern | aern-real/src/Numeric/AERN/RealArithmetic/NumericOrderRounding/FieldOps.hs | bsd-3-clause | addUp :: (RoundedAdd t) => t -> t -> t
addUp a = addUpEff (addDefaultEffort a) a | 80 | addUp :: (RoundedAdd t) => t -> t -> t
addUp a = addUpEff (addDefaultEffort a) a | 80 | addUp a = addUpEff (addDefaultEffort a) a | 41 | false | true | 0 | 7 | 16 | 42 | 21 | 21 | null | null |
wuerges/vlsi_verification | src/BDD.hs | bsd-3-clause | -- | Joint 2 BDDs by a conjunction (and function)
bddAnd :: BDD -> BDD -> BDD
bddAnd Zero _ = Zero | 99 | bddAnd :: BDD -> BDD -> BDD
bddAnd Zero _ = Zero | 48 | bddAnd Zero _ = Zero | 20 | true | true | 0 | 6 | 22 | 25 | 13 | 12 | null | null |
databrary/databrary | src/Model/SQL/Select.hs | agpl-3.0 | outputParser (OutputMap False f o) =
f <$> outputParser o | 59 | outputParser (OutputMap False f o) =
f <$> outputParser o | 59 | outputParser (OutputMap False f o) =
f <$> outputParser o | 59 | false | false | 2 | 6 | 11 | 29 | 12 | 17 | null | null |
mudphone/HaskellBook | src/Twenty.hs | mit | -- 7
length :: (Foldable t) => t a -> Int
length = foldr (\a acc -> 1 + acc) 0 | 78 | length :: (Foldable t) => t a -> Int
length = foldr (\a acc -> 1 + acc) 0 | 73 | length = foldr (\a acc -> 1 + acc) 0 | 36 | true | true | 0 | 8 | 20 | 47 | 25 | 22 | null | null |
tolysz/prepare-ghcjs | spec-lts8/base/Data/Function.hs | bsd-3-clause | -- | @(*) \`on\` f = \\x y -> f x * f y@.
--
-- Typical usage: @'Data.List.sortBy' ('compare' \`on\` 'fst')@.
--
-- Algebraic properties:
--
-- * @(*) \`on\` 'id' = (*)@ (if @(*) ∉ {⊥, 'const' ⊥}@)
--
-- * @((*) \`on\` f) \`on\` g = (*) \`on\` (f . g)@
--
-- * @'flip' on f . 'flip' on g = 'flip' on... | 1,158 | on :: (b -> b -> c) -> (a -> b) -> a -> a -> c
(.*.) `on` f = \x y -> f x .*. f y | 81 | (.*.) `on` f = \x y -> f x .*. f y | 34 | true | true | 0 | 8 | 362 | 122 | 86 | 36 | null | null |
phaazon/quaazar | src/Quaazar/Render/GL/Texture.hs | bsd-3-clause | bindTextureAt :: (MonadIO m,IsTexture t) => t -> Unit -> m ()
bindTextureAt tex unit = do
liftIO $ glActiveTexture (gl_TEXTURE0 + fromIntegral unit)
bindTexture tex | 168 | bindTextureAt :: (MonadIO m,IsTexture t) => t -> Unit -> m ()
bindTextureAt tex unit = do
liftIO $ glActiveTexture (gl_TEXTURE0 + fromIntegral unit)
bindTexture tex | 168 | bindTextureAt tex unit = do
liftIO $ glActiveTexture (gl_TEXTURE0 + fromIntegral unit)
bindTexture tex | 106 | false | true | 0 | 11 | 29 | 70 | 33 | 37 | null | null |
RefactoringTools/HaRe | src/Language/Haskell/Refact/Utils/Utils.hs | bsd-3-clause | applyRefac :: RefactGhc a -> RefacSource -> RefactGhc (ApplyRefacResult, a)
applyRefac = applyRefac' True | 105 | applyRefac :: RefactGhc a -> RefacSource -> RefactGhc (ApplyRefacResult, a)
applyRefac = applyRefac' True | 105 | applyRefac = applyRefac' True | 29 | false | true | 0 | 9 | 13 | 40 | 18 | 22 | null | null |
brendanhay/gogol | gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs | mpl-2.0 | -- | Identifies what kind of resource this is. Value: the fixed string
-- \"\`content#liasettingsListResponse\`\".
lslrKind :: Lens' LiaSettingsListResponse (Maybe Text)
lslrKind = lens _lslrKind (\ s a -> s{_lslrKind = a}) | 223 | lslrKind :: Lens' LiaSettingsListResponse (Maybe Text)
lslrKind = lens _lslrKind (\ s a -> s{_lslrKind = a}) | 108 | lslrKind = lens _lslrKind (\ s a -> s{_lslrKind = a}) | 53 | true | true | 0 | 9 | 31 | 47 | 26 | 21 | null | null |
laugh-at-me/recurrence | src/ValueAndDerivative.hs | gpl-3.0 | fromValue :: (A.Num e) => Exp e -> Exp (ValueAndDerivative e)
fromValue e = lift (ValueAndDerivative e 0) | 105 | fromValue :: (A.Num e) => Exp e -> Exp (ValueAndDerivative e)
fromValue e = lift (ValueAndDerivative e 0) | 105 | fromValue e = lift (ValueAndDerivative e 0) | 43 | false | true | 0 | 10 | 17 | 56 | 26 | 30 | null | null |
mietek/formal-logic | src/Pi/Mp.hs | mit | fst' :: Tm tc (a :&& b) -> Tm tc a
fst' = Fst | 45 | fst' :: Tm tc (a :&& b) -> Tm tc a
fst' = Fst | 45 | fst' = Fst | 10 | false | true | 0 | 8 | 13 | 32 | 16 | 16 | null | null |
ganeti/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | -- | Wrong arguments (at syntax level)
errorsEcodeInval :: String
errorsEcodeInval = "wrong_input" | 98 | errorsEcodeInval :: String
errorsEcodeInval = "wrong_input" | 59 | errorsEcodeInval = "wrong_input" | 32 | true | true | 0 | 4 | 12 | 12 | 7 | 5 | null | null |
seishun/aoc2016 | day22.hs | mit | part2 :: String -> Int
part2 input =
let nodes = map (parse . words) . drop 2 . lines $ input
empty = head [pos n | n <- nodes, used n == 0]
Pos width height = pos $ last nodes
wall = head [pos n | n <- nodes, size n > 500]
in bfs (Grid wall width height) Set.empty $ Set.singleton (empty, Pos widt... | 324 | part2 :: String -> Int
part2 input =
let nodes = map (parse . words) . drop 2 . lines $ input
empty = head [pos n | n <- nodes, used n == 0]
Pos width height = pos $ last nodes
wall = head [pos n | n <- nodes, size n > 500]
in bfs (Grid wall width height) Set.empty $ Set.singleton (empty, Pos widt... | 324 | part2 input =
let nodes = map (parse . words) . drop 2 . lines $ input
empty = head [pos n | n <- nodes, used n == 0]
Pos width height = pos $ last nodes
wall = head [pos n | n <- nodes, size n > 500]
in bfs (Grid wall width height) Set.empty $ Set.singleton (empty, Pos width 0) | 301 | false | true | 0 | 14 | 90 | 181 | 85 | 96 | null | null |
nevrenato/Hets_Fork | HasCASL/SubtypeDecl.hs | gpl-2.0 | addSuperId :: Id -> Kind -> Id -> State Env ()
addSuperId i kind j = do
tm <- gets typeMap
cm <- gets classMap
unless (i == j) -- silently ignore
$ case Map.lookup i tm of
Nothing -> return () -- previous error
Just (TypeInfo ok ks sups defn) -> if Set.member j sups
t... | 1,030 | addSuperId :: Id -> Kind -> Id -> State Env ()
addSuperId i kind j = do
tm <- gets typeMap
cm <- gets classMap
unless (i == j) -- silently ignore
$ case Map.lookup i tm of
Nothing -> return () -- previous error
Just (TypeInfo ok ks sups defn) -> if Set.member j sups
t... | 1,030 | addSuperId i kind j = do
tm <- gets typeMap
cm <- gets classMap
unless (i == j) -- silently ignore
$ case Map.lookup i tm of
Nothing -> return () -- previous error
Just (TypeInfo ok ks sups defn) -> if Set.member j sups
then addDiags[mkDiag Hint "repeated supertype" j... | 983 | false | true | 0 | 24 | 436 | 345 | 163 | 182 | null | null |
ptol/oczor | src/Oczor/Parser/Utl.hs | mit | defOperators :: [[Operator Parser Expr]]
defOperators =
[
-- [Ex.InfixL ((\x (ExprType y) -> WithType x y) <$ L.rop "::")],
[Ex.InfixL (flip Call <$ L.rop "#")],
[Ex.InfixR (Call <$ L.rop "$")],
[Ex.InfixN anyOperatorParser]
] | 242 | defOperators :: [[Operator Parser Expr]]
defOperators =
[
-- [Ex.InfixL ((\x (ExprType y) -> WithType x y) <$ L.rop "::")],
[Ex.InfixL (flip Call <$ L.rop "#")],
[Ex.InfixR (Call <$ L.rop "$")],
[Ex.InfixN anyOperatorParser]
] | 242 | defOperators =
[
-- [Ex.InfixL ((\x (ExprType y) -> WithType x y) <$ L.rop "::")],
[Ex.InfixL (flip Call <$ L.rop "#")],
[Ex.InfixR (Call <$ L.rop "$")],
[Ex.InfixN anyOperatorParser]
] | 201 | false | true | 0 | 11 | 49 | 83 | 44 | 39 | null | null |
ony/hledger | hledger-lib/Hledger/Data/Period.hs | gpl-3.0 | periodAsDateSpan (YearPeriod y) = DateSpan (Just $ fromGregorian y 1 1) (Just $ fromGregorian (y+1) 1 1) | 104 | periodAsDateSpan (YearPeriod y) = DateSpan (Just $ fromGregorian y 1 1) (Just $ fromGregorian (y+1) 1 1) | 104 | periodAsDateSpan (YearPeriod y) = DateSpan (Just $ fromGregorian y 1 1) (Just $ fromGregorian (y+1) 1 1) | 104 | false | false | 0 | 10 | 16 | 55 | 27 | 28 | null | null |
5outh/jank | src/Jank/Language.hs | mit | getExpr :: Parser Expr
getExpr = do
op_ <- operation <* eof
pure (if isIndexed op_ then GetIndexed op_ else Get op_) | 120 | getExpr :: Parser Expr
getExpr = do
op_ <- operation <* eof
pure (if isIndexed op_ then GetIndexed op_ else Get op_) | 120 | getExpr = do
op_ <- operation <* eof
pure (if isIndexed op_ then GetIndexed op_ else Get op_) | 97 | false | true | 1 | 11 | 25 | 55 | 24 | 31 | null | null |
google/haskell-indexer | haskell-indexer-backend-ghc/src/Language/Haskell/Indexer/Backend/GhcApiSupport.hs | apache-2.0 | hackageSrcUrlForModule :: PkgModule -> Text
hackageSrcUrlForModule pm =
let pkg = getPackageWithVersion pm
modName = getModule pm
in T.concat
[ "https://hackage.haskell.org/package/",
escapeUriComponent pkg,
"/docs/src/",
escapeUriComponent modName,
".html"
... | 326 | hackageSrcUrlForModule :: PkgModule -> Text
hackageSrcUrlForModule pm =
let pkg = getPackageWithVersion pm
modName = getModule pm
in T.concat
[ "https://hackage.haskell.org/package/",
escapeUriComponent pkg,
"/docs/src/",
escapeUriComponent modName,
".html"
... | 326 | hackageSrcUrlForModule pm =
let pkg = getPackageWithVersion pm
modName = getModule pm
in T.concat
[ "https://hackage.haskell.org/package/",
escapeUriComponent pkg,
"/docs/src/",
escapeUriComponent modName,
".html"
] | 282 | false | true | 0 | 9 | 94 | 66 | 33 | 33 | null | null |
gspindles/mj-score-eval | src/Game/Mahjong/Hand.hs | mit | getBonus :: Hand -> [Tile]
getBonus (Hand _ bts _) = bts | 61 | getBonus :: Hand -> [Tile]
getBonus (Hand _ bts _) = bts | 61 | getBonus (Hand _ bts _) = bts | 34 | false | true | 0 | 7 | 16 | 31 | 16 | 15 | null | null |
bennofs/hcltest | src/Test/HClTest/Program.hs | bsd-3-clause | testInteractive :: Maybe FilePath -> Maybe [(String, String)] -> Int -> FilePath -> [String] -> Driver ExitCode -> HClTest Trace ()
testInteractive wd envs time prog args driver = do
let cmdline = prog ++ " " ++ unwords args
(Just stdinH, Just stdoutH, Just stderrH, p) <- liftIO $ createProcess (proc prog args)
... | 1,682 | testInteractive :: Maybe FilePath -> Maybe [(String, String)] -> Int -> FilePath -> [String] -> Driver ExitCode -> HClTest Trace ()
testInteractive wd envs time prog args driver = do
let cmdline = prog ++ " " ++ unwords args
(Just stdinH, Just stdoutH, Just stderrH, p) <- liftIO $ createProcess (proc prog args)
... | 1,682 | testInteractive wd envs time prog args driver = do
let cmdline = prog ++ " " ++ unwords args
(Just stdinH, Just stdoutH, Just stderrH, p) <- liftIO $ createProcess (proc prog args)
{ std_in = CreatePipe
, std_out = CreatePi... | 1,550 | false | true | 0 | 18 | 617 | 453 | 219 | 234 | null | null |
gnuvince/1HAD | src/Main.hs | mit | execDateCommand Read d = readExercise d | 39 | execDateCommand Read d = readExercise d | 39 | execDateCommand Read d = readExercise d | 39 | false | false | 1 | 5 | 5 | 18 | 6 | 12 | null | null |
sdiehl/ghc | compiler/nativeGen/SPARC/CodeGen/Gen32.hs | bsd-3-clause | getRegister (CmmMachOp mop [x, y])
= case mop of
MO_Eq _ -> condIntReg EQQ x y
MO_Ne _ -> condIntReg NE x y
MO_S_Gt _ -> condIntReg GTT x y
MO_S_Ge _ -> condIntReg GE x y
MO_S_Lt _ -> condIntReg LTT x y
MO_S_Le _ -> condIntReg LE... | 2,028 | getRegister (CmmMachOp mop [x, y])
= case mop of
MO_Eq _ -> condIntReg EQQ x y
MO_Ne _ -> condIntReg NE x y
MO_S_Gt _ -> condIntReg GTT x y
MO_S_Ge _ -> condIntReg GE x y
MO_S_Lt _ -> condIntReg LTT x y
MO_S_Le _ -> condIntReg LE... | 2,028 | getRegister (CmmMachOp mop [x, y])
= case mop of
MO_Eq _ -> condIntReg EQQ x y
MO_Ne _ -> condIntReg NE x y
MO_S_Gt _ -> condIntReg GTT x y
MO_S_Ge _ -> condIntReg GE x y
MO_S_Lt _ -> condIntReg LTT x y
MO_S_Le _ -> condIntReg LE... | 2,028 | false | false | 0 | 10 | 834 | 722 | 323 | 399 | null | null |
nomeata/ghc | compiler/cmm/CmmOpt.hs | bsd-3-clause | -- -----------------------------------------------------------------------------
-- MachOp constant folder
-- Now, try to constant-fold the MachOps. The arguments have already
-- been optimized and folded.
cmmMachOpFold
:: Platform
-> MachOp -- The operation from an CmmMachOp
-> [CmmExpr] -- The... | 453 | cmmMachOpFold
:: Platform
-> MachOp -- The operation from an CmmMachOp
-> [CmmExpr] -- The optimized arguments
-> CmmExpr
cmmMachOpFold platform op args = fromMaybe (CmmMachOp op args) (cmmMachOpFoldM platform op args) | 243 | cmmMachOpFold platform op args = fromMaybe (CmmMachOp op args) (cmmMachOpFoldM platform op args) | 96 | true | true | 0 | 9 | 82 | 67 | 35 | 32 | null | null |
jbearer/hspl | test/AstTest.hs | mit | bar = predicate "bar" True | 26 | bar = predicate "bar" True | 26 | bar = predicate "bar" True | 26 | false | false | 1 | 5 | 4 | 14 | 5 | 9 | null | null |
three/codeworld | funblocks-client/src/Blocks/Types.hs | apache-2.0 | numSqrt = DesignBlock "numSqrt" (Function "sqrt" [typeNumber, typeNumber])
[Value "NUM" [TextE "\x221A"], Dummy []]
(Inline True) colorNumber
(Tooltip "Gives the square root of a number") | 230 | numSqrt = DesignBlock "numSqrt" (Function "sqrt" [typeNumber, typeNumber])
[Value "NUM" [TextE "\x221A"], Dummy []]
(Inline True) colorNumber
(Tooltip "Gives the square root of a number") | 230 | numSqrt = DesignBlock "numSqrt" (Function "sqrt" [typeNumber, typeNumber])
[Value "NUM" [TextE "\x221A"], Dummy []]
(Inline True) colorNumber
(Tooltip "Gives the square root of a number") | 230 | false | false | 0 | 9 | 67 | 67 | 34 | 33 | null | null |
fmapfmapfmap/amazonka | amazonka-route53/gen/Network/AWS/Route53/ListResourceRecordSets.hs | mpl-2.0 | -- | If the results were truncated, the name of the next record in the list.
-- This element is present only if
-- ListResourceRecordSetsResponse$IsTruncated is true.
lrrsrsNextRecordName :: Lens' ListResourceRecordSetsResponse (Maybe Text)
lrrsrsNextRecordName = lens _lrrsrsNextRecordName (\ s a -> s{_lrrsrsNextRecord... | 330 | lrrsrsNextRecordName :: Lens' ListResourceRecordSetsResponse (Maybe Text)
lrrsrsNextRecordName = lens _lrrsrsNextRecordName (\ s a -> s{_lrrsrsNextRecordName = a}) | 163 | lrrsrsNextRecordName = lens _lrrsrsNextRecordName (\ s a -> s{_lrrsrsNextRecordName = a}) | 89 | true | true | 0 | 9 | 43 | 48 | 27 | 21 | null | null |
urbit/urbit | pkg/hs/urbit-eventlog-lmdb/lib/Urbit/EventLog/LMDB.hs | mit | -- Lower-Level Operations ------------------------------------------------------
getMb :: MonadIO m => Txn -> Dbi -> ByteString -> m (Maybe Noun)
getMb txn db key =
io $
byteStringAsMdbVal key $ \mKey ->
mdb_get txn db mKey >>= traverse (mdbValToNoun key) | 262 | getMb :: MonadIO m => Txn -> Dbi -> ByteString -> m (Maybe Noun)
getMb txn db key =
io $
byteStringAsMdbVal key $ \mKey ->
mdb_get txn db mKey >>= traverse (mdbValToNoun key) | 180 | getMb txn db key =
io $
byteStringAsMdbVal key $ \mKey ->
mdb_get txn db mKey >>= traverse (mdbValToNoun key) | 115 | true | true | 0 | 11 | 44 | 83 | 40 | 43 | null | null |
urbanslug/ghc | compiler/main/HscTypes.hs | bsd-3-clause | typeEnvCoAxioms env = [ax | ACoAxiom ax <- typeEnvElts env] | 59 | typeEnvCoAxioms env = [ax | ACoAxiom ax <- typeEnvElts env] | 59 | typeEnvCoAxioms env = [ax | ACoAxiom ax <- typeEnvElts env] | 59 | false | false | 1 | 9 | 9 | 30 | 12 | 18 | null | null |
UCSD-PL/nano-js | Language/Nano/SSA/SSA.hs | bsd-3-clause | -- x = e
ssaStmt (ExprStmt l1 (AssignExpr l2 OpAssign (LVar l3 x) e))
= do (x', e') <- ssaAsgn l2 (Id l3 x) e
return (True, VarDeclStmt l1 [VarDecl l2 x' (Just e')])
-- e | 183 | ssaStmt (ExprStmt l1 (AssignExpr l2 OpAssign (LVar l3 x) e))
= do (x', e') <- ssaAsgn l2 (Id l3 x) e
return (True, VarDeclStmt l1 [VarDecl l2 x' (Just e')])
-- e | 174 | ssaStmt (ExprStmt l1 (AssignExpr l2 OpAssign (LVar l3 x) e))
= do (x', e') <- ssaAsgn l2 (Id l3 x) e
return (True, VarDeclStmt l1 [VarDecl l2 x' (Just e')])
-- e | 174 | true | false | 0 | 13 | 48 | 101 | 50 | 51 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/book/2011-Learn_You_a_Haskell/Learn_You_a_Haskell.hs | unlicense | nums = [8,6,4,1,7,3,5] | 22 | nums = [8,6,4,1,7,3,5] | 22 | nums = [8,6,4,1,7,3,5] | 22 | false | false | 1 | 5 | 2 | 30 | 17 | 13 | null | null |
ezyang/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | genericTyConNames :: [Name]
genericTyConNames = [
v1TyConName, u1TyConName, par1TyConName, rec1TyConName,
k1TyConName, m1TyConName, sumTyConName, prodTyConName,
compTyConName, rTyConName, dTyConName,
cTyConName, sTyConName, rec0TyConName,
d1TyConName, c1TyConName, s1TyConName, noSelTyConName,
re... | 923 | genericTyConNames :: [Name]
genericTyConNames = [
v1TyConName, u1TyConName, par1TyConName, rec1TyConName,
k1TyConName, m1TyConName, sumTyConName, prodTyConName,
compTyConName, rTyConName, dTyConName,
cTyConName, sTyConName, rec0TyConName,
d1TyConName, c1TyConName, s1TyConName, noSelTyConName,
re... | 923 | genericTyConNames = [
v1TyConName, u1TyConName, par1TyConName, rec1TyConName,
k1TyConName, m1TyConName, sumTyConName, prodTyConName,
compTyConName, rTyConName, dTyConName,
cTyConName, sTyConName, rec0TyConName,
d1TyConName, c1TyConName, s1TyConName, noSelTyConName,
repTyConName, rep1TyConName, u... | 895 | false | true | 0 | 7 | 112 | 153 | 97 | 56 | null | null |
graninas/Haskell-Algorithms | Tests/HighOrderFuncs.hs | gpl-3.0 | numberList = [1, 2, 3, 4, 5] | 28 | numberList = [1, 2, 3, 4, 5] | 28 | numberList = [1, 2, 3, 4, 5] | 28 | false | false | 1 | 5 | 6 | 24 | 13 | 11 | null | null |
Chatanga/codingame-hs | data/Beta.hs | mit | beta (!x, !y) = putStrLn $ "beta" ++ show x ++ show y | 53 | beta (!x, !y) = putStrLn $ "beta" ++ show x ++ show y | 53 | beta (!x, !y) = putStrLn $ "beta" ++ show x ++ show y | 53 | false | false | 0 | 7 | 12 | 36 | 16 | 20 | null | null |
BJTerry/matfile | Data/MatFile.hs | bsd-3-clause | toDoubles (MiUInt32 x) = map fromIntegral x | 43 | toDoubles (MiUInt32 x) = map fromIntegral x | 43 | toDoubles (MiUInt32 x) = map fromIntegral x | 43 | false | false | 0 | 6 | 6 | 21 | 9 | 12 | null | null |
neobrain/neobot | mediawiki/MediaWiki/API/Query/LangLinks.hs | bsd-3-clause | emptyLangLinksRequest :: LangLinksRequest
emptyLangLinksRequest = LangLinksRequest
{ llLimit = Nothing
, llContinueFrom = Nothing
} | 144 | emptyLangLinksRequest :: LangLinksRequest
emptyLangLinksRequest = LangLinksRequest
{ llLimit = Nothing
, llContinueFrom = Nothing
} | 144 | emptyLangLinksRequest = LangLinksRequest
{ llLimit = Nothing
, llContinueFrom = Nothing
} | 102 | false | true | 0 | 7 | 27 | 29 | 16 | 13 | null | null |
jhstanton/Binder | src/Binder/Res/CSS.hs | bsd-3-clause | bodyStyle = binderBody where
binderBody = element bodyName ? do
marginLeft (pct 5)
marginRight (pct 5)
fontFamily ["Helvetica", "arial"] [sansSerif]
backgroundColor white
paddingTop (px 10)
paddingBottom (px 10)
paddingLeft (px 30)
paddingRight (px 30) | 292 | bodyStyle = binderBody where
binderBody = element bodyName ? do
marginLeft (pct 5)
marginRight (pct 5)
fontFamily ["Helvetica", "arial"] [sansSerif]
backgroundColor white
paddingTop (px 10)
paddingBottom (px 10)
paddingLeft (px 30)
paddingRight (px 30) | 292 | bodyStyle = binderBody where
binderBody = element bodyName ? do
marginLeft (pct 5)
marginRight (pct 5)
fontFamily ["Helvetica", "arial"] [sansSerif]
backgroundColor white
paddingTop (px 10)
paddingBottom (px 10)
paddingLeft (px 30)
paddingRight (px 30) | 292 | false | false | 0 | 12 | 73 | 115 | 51 | 64 | null | null |
tjakway/ghcjvm | compiler/llvmGen/LlvmCodeGen/CodeGen.hs | bsd-3-clause | genLoad_fast :: Atomic -> CmmExpr -> GlobalReg -> Int -> CmmType
-> LlvmM ExprData
genLoad_fast atomic e r n ty = do
dflags <- getDynFlags
(gv, grt, s1) <- getCmmRegVal (CmmGlobal r)
meta <- getTBAARegMeta r
let ty' = cmmToLlvmType ty
(ix,rem) = n `divMod` ((llvmWidthI... | 1,618 | genLoad_fast :: Atomic -> CmmExpr -> GlobalReg -> Int -> CmmType
-> LlvmM ExprData
genLoad_fast atomic e r n ty = do
dflags <- getDynFlags
(gv, grt, s1) <- getCmmRegVal (CmmGlobal r)
meta <- getTBAARegMeta r
let ty' = cmmToLlvmType ty
(ix,rem) = n `divMod` ((llvmWidthI... | 1,618 | genLoad_fast atomic e r n ty = do
dflags <- getDynFlags
(gv, grt, s1) <- getCmmRegVal (CmmGlobal r)
meta <- getTBAARegMeta r
let ty' = cmmToLlvmType ty
(ix,rem) = n `divMod` ((llvmWidthInBits dflags . pLower) grt `div` 8)
case isPointer grt && rem == 0 of
True -> ... | 1,522 | false | true | 0 | 22 | 704 | 443 | 223 | 220 | null | null |
bkoropoff/Idris-dev | src/Idris/IBC.hs | bsd-3-clause | pDSLs :: [(Name, DSL)] -> Idris ()
pDSLs cs = mapM_ (\ (n, c) -> updateIState (\i ->
i { idris_dsls = addDef n c (idris_dsls i) })) cs | 158 | pDSLs :: [(Name, DSL)] -> Idris ()
pDSLs cs = mapM_ (\ (n, c) -> updateIState (\i ->
i { idris_dsls = addDef n c (idris_dsls i) })) cs | 158 | pDSLs cs = mapM_ (\ (n, c) -> updateIState (\i ->
i { idris_dsls = addDef n c (idris_dsls i) })) cs | 123 | false | true | 0 | 15 | 52 | 88 | 46 | 42 | null | null |
retep007/security-log | src/Main.hs | gpl-3.0 | application :: App ()
application = do
logs <- handleInput
let incidents = runAll logs
handleAnalysed incidents
handleOutput incidents
return () | 154 | application :: App ()
application = do
logs <- handleInput
let incidents = runAll logs
handleAnalysed incidents
handleOutput incidents
return () | 154 | application = do
logs <- handleInput
let incidents = runAll logs
handleAnalysed incidents
handleOutput incidents
return () | 132 | false | true | 0 | 10 | 30 | 55 | 23 | 32 | null | null |
AndreasPK/stack | src/test/Stack/GhciSpec.hs | bsd-3-clause | ghciScript_projectWithMain :: Text
ghciScript_projectWithMain = [text|
:add $absFileT
:module +
|] | 99 | ghciScript_projectWithMain :: Text
ghciScript_projectWithMain = [text|
:add $absFileT
:module +
|] | 99 | ghciScript_projectWithMain = [text|
:add $absFileT
:module +
|] | 64 | false | true | 0 | 4 | 11 | 15 | 10 | 5 | null | null |
sdiehl/ghc | ghc/Main.hs | bsd-3-clause | isShowGhcUsageMode :: Mode -> Bool
isShowGhcUsageMode (Right (Left ShowGhcUsage)) = True | 88 | isShowGhcUsageMode :: Mode -> Bool
isShowGhcUsageMode (Right (Left ShowGhcUsage)) = True | 88 | isShowGhcUsageMode (Right (Left ShowGhcUsage)) = True | 53 | false | true | 0 | 9 | 10 | 30 | 15 | 15 | null | null |
ctford/Idris-Elba-dev | src/IRTS/CodegenC.hs | bsd-3-clause | doOp v (LIntFloat ITNative) [x] = v ++ "idris_castIntFloat(" ++ creg x ++ ")" | 77 | doOp v (LIntFloat ITNative) [x] = v ++ "idris_castIntFloat(" ++ creg x ++ ")" | 77 | doOp v (LIntFloat ITNative) [x] = v ++ "idris_castIntFloat(" ++ creg x ++ ")" | 77 | false | false | 0 | 7 | 13 | 37 | 18 | 19 | null | null |
nmarshall23/Programming-Challenges | project-euler/025/25.hs | unlicense | ib 1 = 1
| 9 | fib 1 = 1 | 9 | fib 1 = 1 | 9 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
xrchz/ot | numconv.hs | gpl-3.0 | tn :: Term
vn = var "n" num | 27 | tn :: Term
vn = var "n" num | 27 | vn = var "n" num | 16 | false | true | 0 | 6 | 7 | 22 | 9 | 13 | null | null |
MostAwesomeDude/gemstone | Gemstone/Box.hs | mit | bXY' f (Box (BoxLike x y)) = let
f' y' = Box $ BoxLike (x + y' - y) y'
in f' <$> f y | 92 | bXY' f (Box (BoxLike x y)) = let
f' y' = Box $ BoxLike (x + y' - y) y'
in f' <$> f y | 92 | bXY' f (Box (BoxLike x y)) = let
f' y' = Box $ BoxLike (x + y' - y) y'
in f' <$> f y | 92 | false | false | 0 | 13 | 32 | 66 | 31 | 35 | null | null |
ardumont/haskell-platform | hptool/src/Target.hs | bsd-3-clause | buildAction :: FilePath -> Release -> BuildConfig -> Action ()
buildAction buildDir hpRel bc = do
need [ dir sourceDir, vdir ghcVirtualTarget ]
needsAlex <- usesTool ["//*.x", "//*.lx"]
needsHappy <- usesTool ["//*.y", "//*.ly"]
-- These are not *all* the dependencies; just those of th... | 4,326 | buildAction :: FilePath -> Release -> BuildConfig -> Action ()
buildAction buildDir hpRel bc = do
need [ dir sourceDir, vdir ghcVirtualTarget ]
needsAlex <- usesTool ["//*.x", "//*.lx"]
needsHappy <- usesTool ["//*.y", "//*.ly"]
-- These are not *all* the dependencies; just those of th... | 4,326 | buildAction buildDir hpRel bc = do
need [ dir sourceDir, vdir ghcVirtualTarget ]
needsAlex <- usesTool ["//*.x", "//*.lx"]
needsHappy <- usesTool ["//*.y", "//*.ly"]
-- These are not *all* the dependencies; just those of the HP
-- packages, not those from GHC. depsLibs is just... | 4,263 | false | true | 25 | 18 | 1,393 | 978 | 495 | 483 | null | null |
GaloisInc/halvm-ghc | compiler/nativeGen/NCGMonad.hs | bsd-3-clause | getNewLabelNat :: NatM CLabel
getNewLabelNat
= do u <- getUniqueNat
return (mkAsmTempLabel u) | 104 | getNewLabelNat :: NatM CLabel
getNewLabelNat
= do u <- getUniqueNat
return (mkAsmTempLabel u) | 104 | getNewLabelNat
= do u <- getUniqueNat
return (mkAsmTempLabel u) | 74 | false | true | 0 | 9 | 23 | 35 | 15 | 20 | null | null |
uuhan/Idris-dev | src/Idris/Delaborate.hs | bsd-3-clause | pprintErr' i (InvalidTCArg n t)
= annTm t (pprintTerm i (delabSugared i t)) <+> text " cannot be a parameter of "
<> annName n <$>
text "(Implementation arguments must be type or data constructors)" | 217 | pprintErr' i (InvalidTCArg n t)
= annTm t (pprintTerm i (delabSugared i t)) <+> text " cannot be a parameter of "
<> annName n <$>
text "(Implementation arguments must be type or data constructors)" | 217 | pprintErr' i (InvalidTCArg n t)
= annTm t (pprintTerm i (delabSugared i t)) <+> text " cannot be a parameter of "
<> annName n <$>
text "(Implementation arguments must be type or data constructors)" | 217 | false | false | 2 | 9 | 53 | 66 | 28 | 38 | null | null |
sdiehl/ghc | compiler/GHC/StgToCmm/Monad.hs | bsd-3-clause | getInfoDown :: FCode CgInfoDownwards
getInfoDown = FCode $ \info_down state -> (info_down,state) | 96 | getInfoDown :: FCode CgInfoDownwards
getInfoDown = FCode $ \info_down state -> (info_down,state) | 96 | getInfoDown = FCode $ \info_down state -> (info_down,state) | 59 | false | true | 1 | 8 | 11 | 35 | 17 | 18 | null | null |
kmate/HaRe | old/testing/instantiate/Mod2_TokOut.hs | bsd-3-clause | f2 0 l = drop 0 l | 17 | f2 0 l = drop 0 l | 17 | f2 0 l = drop 0 l | 17 | false | false | 0 | 5 | 6 | 17 | 7 | 10 | null | null |
csrhodes/pandoc | src/Text/Pandoc/Readers/HTML.hs | gpl-2.0 | "dd" `closes` t | t `elem` ["dt", "dd"] = True | 46 | "dd" `closes` t | t `elem` ["dt", "dd"] = True | 46 | "dd" `closes` t | t `elem` ["dt", "dd"] = True | 46 | false | false | 0 | 9 | 9 | 32 | 17 | 15 | null | null |
energyflowanalysis/efa-2.1 | src/EFA/Equation/Stack.hs | bsd-3-clause | toMultiValueNum :: Num a => Stack i a -> MV.MultiValue i a
toMultiValueNum = toMultiValueGen (+) | 96 | toMultiValueNum :: Num a => Stack i a -> MV.MultiValue i a
toMultiValueNum = toMultiValueGen (+) | 96 | toMultiValueNum = toMultiValueGen (+) | 37 | false | true | 0 | 8 | 15 | 39 | 19 | 20 | null | null |
pminten/xhaskell | sum-of-multiples/example.hs | mit | sumOfMultiples :: [Int] -> Int -> Int
sumOfMultiples targets upperBound = sum (filter f [1..upperBound-1])
where f n = any ((==0) . mod n) targets | 148 | sumOfMultiples :: [Int] -> Int -> Int
sumOfMultiples targets upperBound = sum (filter f [1..upperBound-1])
where f n = any ((==0) . mod n) targets | 148 | sumOfMultiples targets upperBound = sum (filter f [1..upperBound-1])
where f n = any ((==0) . mod n) targets | 110 | false | true | 1 | 9 | 26 | 86 | 40 | 46 | null | null |
mruegenberg/HOpenVGRaw | src/Graphics/Rendering/ShivaVG/Raw/Params.hs | bsd-3-clause | hFVParam :: (Enum p) => VGHandle -> p -> (a -> [Float]) -> ([Float] -> a) -> Param a
hFVParam h p tofv fromfv = Param getter (\v -> setParameterfv h p (tofv v))
where
getter = do
s <- getVectorSize p
vs <- getParameterfv h p s
return (fromfv vs) | 269 | hFVParam :: (Enum p) => VGHandle -> p -> (a -> [Float]) -> ([Float] -> a) -> Param a
hFVParam h p tofv fromfv = Param getter (\v -> setParameterfv h p (tofv v))
where
getter = do
s <- getVectorSize p
vs <- getParameterfv h p s
return (fromfv vs) | 269 | hFVParam h p tofv fromfv = Param getter (\v -> setParameterfv h p (tofv v))
where
getter = do
s <- getVectorSize p
vs <- getParameterfv h p s
return (fromfv vs) | 184 | false | true | 0 | 12 | 74 | 138 | 68 | 70 | null | null |
nfjinjing/moe | src/Text/HTML/Moe2/DSL/HTML.hs | bsd-3-clause | embed = e "embed" | 22 | embed = e "embed" | 22 | embed = e "embed" | 22 | false | false | 0 | 5 | 8 | 9 | 4 | 5 | null | null |
phischu/structure-editor | Main.hs | bsd-3-clause | renderRemou (RemouTranslate (Number t1 _) (Number t2 _) remou _) =
translate (fromIntegral t1) (fromIntegral t2) (renderRemou remou) | 136 | renderRemou (RemouTranslate (Number t1 _) (Number t2 _) remou _) =
translate (fromIntegral t1) (fromIntegral t2) (renderRemou remou) | 136 | renderRemou (RemouTranslate (Number t1 _) (Number t2 _) remou _) =
translate (fromIntegral t1) (fromIntegral t2) (renderRemou remou) | 136 | false | false | 0 | 9 | 21 | 62 | 30 | 32 | null | null |
DavidAlphaFox/darcs | src/Darcs/UI/SelectChanges.hs | gpl-2.0 | -- | Generates the help for a set of basic and advanced 'KeyPress' groups.
helpFor :: String -> [[KeyPress]] -> [[KeyPress]] -> String
helpFor jn basicKeypresses advancedKeyPresses =
unlines $ [ "How to use "++jn++":" ]
++ intercalate [""] (map (map help) keypresses)
++ [ ""
, "... | 603 | helpFor :: String -> [[KeyPress]] -> [[KeyPress]] -> String
helpFor jn basicKeypresses advancedKeyPresses =
unlines $ [ "How to use "++jn++":" ]
++ intercalate [""] (map (map help) keypresses)
++ [ ""
, "?: show this help"
, ""
, "<Space>: accept th... | 528 | helpFor jn basicKeypresses advancedKeyPresses =
unlines $ [ "How to use "++jn++":" ]
++ intercalate [""] (map (map help) keypresses)
++ [ ""
, "?: show this help"
, ""
, "<Space>: accept the current default (which is capitalized)"
]
... | 468 | true | true | 1 | 11 | 183 | 139 | 74 | 65 | null | null |
wuxb45/eval | Eval/DSet.hs | bsd-3-clause | dsetDelAll :: DSetNode -> Key -> IO ()
dsetDelAll node sname = do
RWVar.modify_ (dsetMetaMap node) $ return . Map.delete sname
-- }}}
-- dsetSimpleMap {{{ | 157 | dsetDelAll :: DSetNode -> Key -> IO ()
dsetDelAll node sname = do
RWVar.modify_ (dsetMetaMap node) $ return . Map.delete sname
-- }}}
-- dsetSimpleMap {{{ | 157 | dsetDelAll node sname = do
RWVar.modify_ (dsetMetaMap node) $ return . Map.delete sname
-- }}}
-- dsetSimpleMap {{{ | 118 | false | true | 0 | 11 | 28 | 58 | 28 | 30 | null | null |
ml9951/ghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | -- we handle addition, but rather badly
iselExpr64 (CmmMachOp (MO_Add _) [e1, CmmLit (CmmInt i _)]) = do
ChildCode64 code1 r1lo <- iselExpr64 e1
(rlo,rhi) <- getNewRegPairNat II32
let
r = fromIntegral (fromIntegral i :: Word32)
q = fromIntegral (fromIntegral (i `shiftR` 32) :: Word32)
r... | 662 | iselExpr64 (CmmMachOp (MO_Add _) [e1, CmmLit (CmmInt i _)]) = do
ChildCode64 code1 r1lo <- iselExpr64 e1
(rlo,rhi) <- getNewRegPairNat II32
let
r = fromIntegral (fromIntegral i :: Word32)
q = fromIntegral (fromIntegral (i `shiftR` 32) :: Word32)
r1hi = getHiVRegFromLo r1lo
code ... | 622 | iselExpr64 (CmmMachOp (MO_Add _) [e1, CmmLit (CmmInt i _)]) = do
ChildCode64 code1 r1lo <- iselExpr64 e1
(rlo,rhi) <- getNewRegPairNat II32
let
r = fromIntegral (fromIntegral i :: Word32)
q = fromIntegral (fromIntegral (i `shiftR` 32) :: Word32)
r1hi = getHiVRegFromLo r1lo
code ... | 622 | true | false | 0 | 17 | 215 | 255 | 128 | 127 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Text.hs | bsd-3-clause | -- | Lifted from Control.Arrow and specialized.
second :: (b -> c) -> (a,b) -> (a,c)
second f (a, b) = (a, f b) | 111 | second :: (b -> c) -> (a,b) -> (a,c)
second f (a, b) = (a, f b) | 63 | second f (a, b) = (a, f b) | 26 | true | true | 0 | 9 | 23 | 65 | 35 | 30 | null | null |
kmels/hledger | hledger-lib/Hledger/Data/Posting.hs | gpl-3.0 | postingsDateSpan' wd ps = DateSpan (Just $ postingdate $ head ps') (Just $ addDays 1 $ postingdate $ last ps')
where
ps' = sortBy (comparing postingdate) ps
postingdate = if wd == PrimaryDate then postingDate else postingDate2
-- AccountName stuff that depends on PostingType | 292 | postingsDateSpan' wd ps = DateSpan (Just $ postingdate $ head ps') (Just $ addDays 1 $ postingdate $ last ps')
where
ps' = sortBy (comparing postingdate) ps
postingdate = if wd == PrimaryDate then postingDate else postingDate2
-- AccountName stuff that depends on PostingType | 292 | postingsDateSpan' wd ps = DateSpan (Just $ postingdate $ head ps') (Just $ addDays 1 $ postingdate $ last ps')
where
ps' = sortBy (comparing postingdate) ps
postingdate = if wd == PrimaryDate then postingDate else postingDate2
-- AccountName stuff that depends on PostingType | 292 | false | false | 3 | 10 | 60 | 100 | 44 | 56 | null | null |
brendanhay/gogol | gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Entitlements/Delete.hs | mpl-2.0 | -- | JSONP
edCallback :: Lens' EntitlementsDelete (Maybe Text)
edCallback
= lens _edCallback (\ s a -> s{_edCallback = a}) | 124 | edCallback :: Lens' EntitlementsDelete (Maybe Text)
edCallback
= lens _edCallback (\ s a -> s{_edCallback = a}) | 113 | edCallback
= lens _edCallback (\ s a -> s{_edCallback = a}) | 61 | true | true | 0 | 9 | 21 | 48 | 25 | 23 | null | null |
keera-studios/hsQt | Qtc/Gui/QUndoStack.hs | bsd-2-clause | qUndoStack_deleteLater :: QUndoStack a -> IO ()
qUndoStack_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QUndoStack_deleteLater cobj_x0 | 147 | qUndoStack_deleteLater :: QUndoStack a -> IO ()
qUndoStack_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QUndoStack_deleteLater cobj_x0 | 147 | qUndoStack_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QUndoStack_deleteLater cobj_x0 | 99 | false | true | 0 | 7 | 22 | 41 | 19 | 22 | null | null |
christiaanb/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | integerSDataConKey = mkPreludeDataConUnique 7 | 67 | integerSDataConKey = mkPreludeDataConUnique 7 | 67 | integerSDataConKey = mkPreludeDataConUnique 7 | 67 | false | false | 0 | 5 | 25 | 9 | 4 | 5 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.