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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Ju2ender/Learn-You-A-Haskell-Exercise | src/1-2-List.hs | mit | steven = [ 'S', 't', 'e', 'v', 'e', 'n' ] | 41 | steven = [ 'S', 't', 'e', 'v', 'e', 'n' ] | 41 | steven = [ 'S', 't', 'e', 'v', 'e', 'n' ] | 41 | false | false | 0 | 5 | 9 | 24 | 15 | 9 | null | null |
dan-t/Gamgine | Gamgine/Image/PNG.hs | bsd-3-clause | sampleWidth Bd2 = 2 | 20 | sampleWidth Bd2 = 2 | 20 | sampleWidth Bd2 = 2 | 20 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
sjakobi/brick | programs/DynamicBorderDemo.hs | bsd-3-clause | main :: IO ()
main = M.simpleMain (C.joinBorders ui) | 52 | main :: IO ()
main = M.simpleMain (C.joinBorders ui) | 52 | main = M.simpleMain (C.joinBorders ui) | 38 | false | true | 0 | 8 | 8 | 29 | 14 | 15 | null | null |
green-haskell/ghc | compiler/basicTypes/BasicTypes.hs | bsd-3-clause | minPrecedence = 0 | 17 | minPrecedence = 0 | 17 | minPrecedence = 0 | 17 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
ben-schulz/Idris-dev | src/Idris/Primitives.hs | bsd-3-clause | truncWord64 False x = fromIntegral x | 36 | truncWord64 False x = fromIntegral x | 36 | truncWord64 False x = fromIntegral x | 36 | false | false | 0 | 5 | 5 | 14 | 6 | 8 | null | null |
xenophobia/Egison-Quote | Language/Egison/Quote.hs | mit | converter (matchConstType -> Just "Float") = [| \(Float x) -> (realToFrac x) :: Float |] | 88 | converter (matchConstType -> Just "Float") = [| \(Float x) -> (realToFrac x) :: Float |] | 88 | converter (matchConstType -> Just "Float") = [| \(Float x) -> (realToFrac x) :: Float |] | 88 | false | false | 0 | 7 | 14 | 23 | 12 | 11 | null | null |
psg-titech/cfrp | src/Language/CFrp/TypeInf.hs | mit | occursCheck n1 (VarT n2)
| n1 == n2 = throwError OccursCheckError
| otherwise = return () | 93 | occursCheck n1 (VarT n2)
| n1 == n2 = throwError OccursCheckError
| otherwise = return () | 93 | occursCheck n1 (VarT n2)
| n1 == n2 = throwError OccursCheckError
| otherwise = return () | 93 | false | false | 0 | 8 | 19 | 49 | 20 | 29 | null | null |
acowley/ghc | compiler/nativeGen/SPARC/CodeGen/Amode.hs | bsd-3-clause | getAmode (CmmMachOp (MO_Sub _) [x, CmmLit (CmmInt i _)])
| fits13Bits (-i)
= do
(reg, code) <- getSomeReg x
let
off = ImmInt (-(fromInteger i))
return (Amode (AddrRegImm reg off) code) | 219 | getAmode (CmmMachOp (MO_Sub _) [x, CmmLit (CmmInt i _)])
| fits13Bits (-i)
= do
(reg, code) <- getSomeReg x
let
off = ImmInt (-(fromInteger i))
return (Amode (AddrRegImm reg off) code) | 219 | getAmode (CmmMachOp (MO_Sub _) [x, CmmLit (CmmInt i _)])
| fits13Bits (-i)
= do
(reg, code) <- getSomeReg x
let
off = ImmInt (-(fromInteger i))
return (Amode (AddrRegImm reg off) code) | 219 | false | false | 0 | 15 | 65 | 115 | 55 | 60 | null | null |
cbare/Etudes | haskell/haskell-99-problems.hs | apache-2.0 | insertAt x n xs = ys ++ [x] ++ zs
where (ys, zs) = splitAt n xs
-- 22. | 73 | insertAt x n xs = ys ++ [x] ++ zs
where (ys, zs) = splitAt n xs
-- 22. | 73 | insertAt x n xs = ys ++ [x] ++ zs
where (ys, zs) = splitAt n xs
-- 22. | 73 | false | false | 0 | 7 | 21 | 44 | 23 | 21 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/SESReceiptRuleBounceAction.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-bounceaction.html#cfn-ses-receiptrule-bounceaction-message
sesrrbaMessage :: Lens' SESReceiptRuleBounceAction (Val Text)
sesrrbaMessage = lens _sESReceiptRuleBounceActionMessage (\s a -> s { _sESReceiptRuleBounceActionMess... | 330 | sesrrbaMessage :: Lens' SESReceiptRuleBounceAction (Val Text)
sesrrbaMessage = lens _sESReceiptRuleBounceActionMessage (\s a -> s { _sESReceiptRuleBounceActionMessage = a }) | 173 | sesrrbaMessage = lens _sESReceiptRuleBounceActionMessage (\s a -> s { _sESReceiptRuleBounceActionMessage = a }) | 111 | true | true | 0 | 9 | 21 | 46 | 25 | 21 | null | null |
shlevy/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | isQuietHsExpr (HsAppType _ _) = True | 39 | isQuietHsExpr (HsAppType _ _) = True | 39 | isQuietHsExpr (HsAppType _ _) = True | 39 | false | false | 0 | 7 | 8 | 17 | 8 | 9 | null | null |
cosmoharrigan/atomspace | tests/haskell/src/OpenCog/Test.hs | agpl-3.0 | myappGen2b :: (forall a b. (Typeable a, Typeable b,
a <~ aa,b <~ bb) => (Atom a -> Atom b -> r)) ->
(Gen aa, Gen bb) -> r
myappGen2b f (Gen a,Gen b) = f a b | 184 | myappGen2b :: (forall a b. (Typeable a, Typeable b,
a <~ aa,b <~ bb) => (Atom a -> Atom b -> r)) ->
(Gen aa, Gen bb) -> r
myappGen2b f (Gen a,Gen b) = f a b | 184 | myappGen2b f (Gen a,Gen b) = f a b | 34 | false | true | 0 | 12 | 65 | 110 | 56 | 54 | null | null |
meteogrid/mime-mail-parser | Network/Mail/Mime/Parser/Internal/Rfc2822.hs | bsd-3-clause | -- |Parse an 'in_reply_to' header line but allow for the obsolete
-- folding and the obsolete phrase syntax.
obs_in_reply_to :: Parser [ByteString]
obs_in_reply_to
= obs_header "In-Reply-To" (do r <- many (do {_ <- phrase; return "" }
<|> msg_id)
... | 360 | obs_in_reply_to :: Parser [ByteString]
obs_in_reply_to
= obs_header "In-Reply-To" (do r <- many (do {_ <- phrase; return "" }
<|> msg_id)
return (filter (not . S.null) r)) | 250 | obs_in_reply_to
= obs_header "In-Reply-To" (do r <- many (do {_ <- phrase; return "" }
<|> msg_id)
return (filter (not . S.null) r)) | 211 | true | true | 1 | 15 | 124 | 87 | 42 | 45 | null | null |
phischu/fragnix | tests/packages/scotty/Text.PrettyPrint.Annotated.HughesPJ.hs | bsd-3-clause | -- Specification: text s <> nilaboveNest g k q
-- = text s <> (text "" $g$ nest k q)
nilAboveNest :: Bool -> Int -> RDoc a -> RDoc a
nilAboveNest _ k _ | k `seq` False = undefined | 202 | nilAboveNest :: Bool -> Int -> RDoc a -> RDoc a
nilAboveNest _ k _ | k `seq` False = undefined | 104 | nilAboveNest _ k _ | k `seq` False = undefined | 56 | true | true | 0 | 9 | 63 | 55 | 26 | 29 | null | null |
brendanhay/gogol | gogol-iamcredentials/gen/Network/Google/Resource/IAMCredentials/Projects/ServiceAccounts/SignJwt.hs | mpl-2.0 | -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
psasjUploadProtocol :: Lens' ProjectsServiceAccountsSignJwt (Maybe Text)
psasjUploadProtocol
= lens _psasjUploadProtocol
(\ s a -> s{_psasjUploadProtocol = a}) | 229 | psasjUploadProtocol :: Lens' ProjectsServiceAccountsSignJwt (Maybe Text)
psasjUploadProtocol
= lens _psasjUploadProtocol
(\ s a -> s{_psasjUploadProtocol = a}) | 167 | psasjUploadProtocol
= lens _psasjUploadProtocol
(\ s a -> s{_psasjUploadProtocol = a}) | 94 | true | true | 0 | 9 | 33 | 48 | 25 | 23 | null | null |
nh2/shake | Examples/Test/Docs.hs | bsd-3-clause | restmt i xs = ("stmt_" ++ show i ++ " = do") : map (" " ++) xs | 63 | restmt i xs = ("stmt_" ++ show i ++ " = do") : map (" " ++) xs | 63 | restmt i xs = ("stmt_" ++ show i ++ " = do") : map (" " ++) xs | 63 | false | false | 0 | 9 | 18 | 38 | 19 | 19 | null | null |
choener/RNAdraw | RNAdraw2.hs | gpl-3.0 | sStem :: CircleA -> Dir -> Candidates -> Candidates
sStem ca d cs = map f cs where
f (xs,box) = (h:nxs, nbox) where
nxs = map (+(0,1)) xs
h = (0,0)
nbox = softBox $ [translateBox (0,1) box, hardBox [(0,1), h]]
-- | | 229 | sStem :: CircleA -> Dir -> Candidates -> Candidates
sStem ca d cs = map f cs where
f (xs,box) = (h:nxs, nbox) where
nxs = map (+(0,1)) xs
h = (0,0)
nbox = softBox $ [translateBox (0,1) box, hardBox [(0,1), h]]
-- | | 229 | sStem ca d cs = map f cs where
f (xs,box) = (h:nxs, nbox) where
nxs = map (+(0,1)) xs
h = (0,0)
nbox = softBox $ [translateBox (0,1) box, hardBox [(0,1), h]]
-- | | 177 | false | true | 0 | 12 | 58 | 145 | 78 | 67 | null | null |
supki/libjenkins | test/Jenkins/DiscoverSpec.hs | bsd-2-clause | noServerId :: ByteString
noServerId =
"<hudson>\
\<version>1.587</version>\
\<url>https://example.com/jenkins/</url>\
\<slave-port>51667</slave-port>\
\</hudson>" | 172 | noServerId :: ByteString
noServerId =
"<hudson>\
\<version>1.587</version>\
\<url>https://example.com/jenkins/</url>\
\<slave-port>51667</slave-port>\
\</hudson>" | 172 | noServerId =
"<hudson>\
\<version>1.587</version>\
\<url>https://example.com/jenkins/</url>\
\<slave-port>51667</slave-port>\
\</hudson>" | 147 | false | true | 0 | 4 | 19 | 11 | 6 | 5 | null | null |
comonoidial/ALFIN | Alfin/CoreConvert.hs | mit | convertExp _ (Lit x) = SCLit (convertLit x) | 43 | convertExp _ (Lit x) = SCLit (convertLit x) | 43 | convertExp _ (Lit x) = SCLit (convertLit x) | 43 | false | false | 0 | 7 | 7 | 26 | 12 | 14 | null | null |
ideas-edu/ideas | src/Ideas/Common/Traversal/Navigator.hs | apache-2.0 | leftMostAt :: Navigator a => Int -> a -> Maybe a
leftMostAt n
| n == 0 = Just
| n < 0 = const Nothing
| otherwise = (down >=> leftMostAt (n-1)) >|< (right >=> leftMostAt n) | 192 | leftMostAt :: Navigator a => Int -> a -> Maybe a
leftMostAt n
| n == 0 = Just
| n < 0 = const Nothing
| otherwise = (down >=> leftMostAt (n-1)) >|< (right >=> leftMostAt n) | 191 | leftMostAt n
| n == 0 = Just
| n < 0 = const Nothing
| otherwise = (down >=> leftMostAt (n-1)) >|< (right >=> leftMostAt n) | 142 | false | true | 2 | 10 | 57 | 97 | 46 | 51 | null | null |
WSCU/JSEuterpea | Euterpea Examples/SimpleEuterpea.hs | gpl-3.0 | 5 = pitchToMusic 76
| 20 | e5 = pitchToMusic 76 | 20 | e5 = pitchToMusic 76 | 20 | false | false | 1 | 5 | 4 | 12 | 4 | 8 | null | null |
romanb/amazonka | amazonka-swf/gen/Network/AWS/SWF/Types.hs | mpl-2.0 | -- | If the event is of type 'ChildWorkflowExecutionStarted' then this member is set
-- and provides detailed information about the event. It is not set for other
-- event types.
heChildWorkflowExecutionStartedEventAttributes :: Lens' HistoryEvent (Maybe ChildWorkflowExecutionStartedEventAttributes)
heChildWorkflowExec... | 482 | heChildWorkflowExecutionStartedEventAttributes :: Lens' HistoryEvent (Maybe ChildWorkflowExecutionStartedEventAttributes)
heChildWorkflowExecutionStartedEventAttributes =
lens _heChildWorkflowExecutionStartedEventAttributes
(\s a -> s { _heChildWorkflowExecutionStartedEventAttributes = a }) | 303 | heChildWorkflowExecutionStartedEventAttributes =
lens _heChildWorkflowExecutionStartedEventAttributes
(\s a -> s { _heChildWorkflowExecutionStartedEventAttributes = a }) | 181 | true | true | 0 | 9 | 61 | 48 | 27 | 21 | null | null |
DavidAlphaFox/darcs | harness/Darcs/Test/Patch.hs | gpl-2.0 | pair_repo_properties :: forall p gen x y. (Show1 gen, Arbitrary (Sealed gen), Patchy p,
MightBeEmptyHunk p,
RepoModel (ModelOf p),
RepoState (ModelOf p) ~ ApplyState p)
... | 549 | pair_repo_properties :: forall p gen x y. (Show1 gen, Arbitrary (Sealed gen), Patchy p,
MightBeEmptyHunk p,
RepoModel (ModelOf p),
RepoState (ModelOf p) ~ ApplyState p)
... | 549 | pair_repo_properties _ genname gen =
properties gen "patch/repo" genname
[ ("commute is effect preserving" , const True , PropG.effectPreserving commute )
] | 168 | false | true | 0 | 12 | 225 | 156 | 79 | 77 | null | null |
fmthoma/ghc | compiler/types/FamInstEnv.hs | bsd-3-clause | normaliseType env role (ForAllTy tyvar ty1)
= let (coi,nty1) = normaliseType env role ty1
in (mkForAllCo tyvar coi, ForAllTy tyvar nty1) | 143 | normaliseType env role (ForAllTy tyvar ty1)
= let (coi,nty1) = normaliseType env role ty1
in (mkForAllCo tyvar coi, ForAllTy tyvar nty1) | 143 | normaliseType env role (ForAllTy tyvar ty1)
= let (coi,nty1) = normaliseType env role ty1
in (mkForAllCo tyvar coi, ForAllTy tyvar nty1) | 143 | false | false | 0 | 9 | 27 | 62 | 30 | 32 | null | null |
yuvallanger/threepenny-gui | samples/CRUD.hs | bsd-3-clause | create x (Database newkey db) = Database (newkey+1) $ Map.insert newkey x db | 80 | create x (Database newkey db) = Database (newkey+1) $ Map.insert newkey x db | 80 | create x (Database newkey db) = Database (newkey+1) $ Map.insert newkey x db | 80 | false | false | 0 | 8 | 16 | 44 | 20 | 24 | null | null |
keenbug/iexpr | Matching.hs | gpl-2.0 | getResult (Success succ) = Right succ | 37 | getResult (Success succ) = Right succ | 37 | getResult (Success succ) = Right succ | 37 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
patrickherrmann/hearts | cli/Main.hs | mit | showHand :: [Card] -> IO ()
showHand cs = do
let sorted = sortBy (comparing suit <> comparing rank) cs
putStrLn "Your hand:"
putStrLn . unwords $ map show sorted | 167 | showHand :: [Card] -> IO ()
showHand cs = do
let sorted = sortBy (comparing suit <> comparing rank) cs
putStrLn "Your hand:"
putStrLn . unwords $ map show sorted | 167 | showHand cs = do
let sorted = sortBy (comparing suit <> comparing rank) cs
putStrLn "Your hand:"
putStrLn . unwords $ map show sorted | 139 | false | true | 0 | 13 | 35 | 75 | 34 | 41 | null | null |
brendanhay/gogol | gogol-testing/gen/Network/Google/Testing/Types/Product.hs | mpl-2.0 | -- | Output only. The index of the shard among all the shards.
sShardIndex :: Lens' Shard (Maybe Int32)
sShardIndex
= lens _sShardIndex (\ s a -> s{_sShardIndex = a}) .
mapping _Coerce | 192 | sShardIndex :: Lens' Shard (Maybe Int32)
sShardIndex
= lens _sShardIndex (\ s a -> s{_sShardIndex = a}) .
mapping _Coerce | 129 | sShardIndex
= lens _sShardIndex (\ s a -> s{_sShardIndex = a}) .
mapping _Coerce | 88 | true | true | 0 | 10 | 40 | 55 | 28 | 27 | null | null |
nevrenato/Hets_Fork | DFOL/Symbol.hs | gpl-2.0 | -- interface to name maps
toSymMap :: Map.Map NAME NAME -> Map.Map Symbol Symbol
toSymMap map1 = Map.fromList $ map (\ (k,a) -> (Symbol k, Symbol a))
$ Map.toList map1 | 184 | toSymMap :: Map.Map NAME NAME -> Map.Map Symbol Symbol
toSymMap map1 = Map.fromList $ map (\ (k,a) -> (Symbol k, Symbol a))
$ Map.toList map1 | 158 | toSymMap map1 = Map.fromList $ map (\ (k,a) -> (Symbol k, Symbol a))
$ Map.toList map1 | 103 | true | true | 0 | 11 | 46 | 77 | 39 | 38 | null | null |
andre-artus/handbook-of-practical-logic-and-automated-reasoning-haskell | src/ATP/Order.hs | gpl-3.0 | termSize (Num _) = 1 | 20 | termSize (Num _) = 1 | 20 | termSize (Num _) = 1 | 20 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
OpenXT/manager | xenmgr/Vm/State.hs | gpl-2.0 | stateToPublicStr Restoring = eVM_STATE_RESTORING | 54 | stateToPublicStr Restoring = eVM_STATE_RESTORING | 54 | stateToPublicStr Restoring = eVM_STATE_RESTORING | 54 | false | false | 0 | 4 | 9 | 10 | 4 | 6 | null | null |
PierreR/streaming | benchmarks/old/Stream/Prelude/Fused.hs | bsd-3-clause | filterM :: (Monad m) => (a -> m Bool) -> Stream (Of a) m r -> Stream (Of a) m r
filterM pred = buildStream . F.filterM pred . foldStream | 137 | filterM :: (Monad m) => (a -> m Bool) -> Stream (Of a) m r -> Stream (Of a) m r
filterM pred = buildStream . F.filterM pred . foldStream | 137 | filterM pred = buildStream . F.filterM pred . foldStream | 56 | false | true | 0 | 10 | 30 | 80 | 39 | 41 | null | null |
laszlopandy/elm-compiler | src/CommandLineRouter.hs | bsd-3-clause | attemptToRun :: String -> [String] -> IO ()
attemptToRun command args =
do found <- Dir.findExecutable ("elm-" ++ command)
case found of
Nothing ->
hPutStrLn stderr $
"Could not find command `" ++ command ++ "`. Maybe there is a typo?\n\n\
\Default commands include:\n\... | 1,008 | attemptToRun :: String -> [String] -> IO ()
attemptToRun command args =
do found <- Dir.findExecutable ("elm-" ++ command)
case found of
Nothing ->
hPutStrLn stderr $
"Could not find command `" ++ command ++ "`. Maybe there is a typo?\n\n\
\Default commands include:\n\... | 1,008 | attemptToRun command args =
do found <- Dir.findExecutable ("elm-" ++ command)
case found of
Nothing ->
hPutStrLn stderr $
"Could not find command `" ++ command ++ "`. Maybe there is a typo?\n\n\
\Default commands include:\n\n"
++ availableCommands ++
... | 964 | false | true | 0 | 21 | 377 | 218 | 108 | 110 | null | null |
drbunsen/road-trip | Dijkstra.hs | mit | shortestPath :: Ord a => a -> a -> Map a [(a, Float)] -> [a]
shortestPath from to graph = reverse $ f to where
f x = x : maybe [] f (snd $ dijkstra from graph ! x) | 167 | shortestPath :: Ord a => a -> a -> Map a [(a, Float)] -> [a]
shortestPath from to graph = reverse $ f to where
f x = x : maybe [] f (snd $ dijkstra from graph ! x) | 167 | shortestPath from to graph = reverse $ f to where
f x = x : maybe [] f (snd $ dijkstra from graph ! x) | 106 | false | true | 0 | 12 | 43 | 100 | 50 | 50 | null | null |
markflorisson/hpack | testrepo/bytestring-0.9.1.9/Data/ByteString.hs | bsd-3-clause | -- | /O(1)/ Extract the last element of a ByteString, which must be finite and non-empty.
-- An exception will be thrown in the case of an empty ByteString.
last :: ByteString -> Word8
last ps@(PS x s l)
| null ps = errorEmptyList "last"
| otherwise = inlinePerformIO $ withForeignPtr x $ \p -> peekByteOff p (... | 326 | last :: ByteString -> Word8
last ps@(PS x s l)
| null ps = errorEmptyList "last"
| otherwise = inlinePerformIO $ withForeignPtr x $ \p -> peekByteOff p (s+l-1) | 169 | last ps@(PS x s l)
| null ps = errorEmptyList "last"
| otherwise = inlinePerformIO $ withForeignPtr x $ \p -> peekByteOff p (s+l-1) | 141 | true | true | 11 | 8 | 67 | 84 | 43 | 41 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/logging/structured-log-lines/src/LogData.hs | unlicense | exampleLogList :: LogList
exampleLogList = LogList exampleLogList' | 67 | exampleLogList :: LogList
exampleLogList = LogList exampleLogList' | 67 | exampleLogList = LogList exampleLogList' | 41 | false | true | 0 | 6 | 7 | 20 | 8 | 12 | null | null |
HaskellForCats/HaskellForCats | Trees/STree.hs | mit | height Nil = 0 | 14 | height Nil = 0 | 14 | height Nil = 0 | 14 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
kmels/hledger | hledger-lib/Hledger/Utils.hs | gpl-3.0 | second3 (_,x,_) = x | 19 | second3 (_,x,_) = x | 19 | second3 (_,x,_) = x | 19 | false | false | 0 | 5 | 3 | 19 | 10 | 9 | null | null |
sethfowler/hsbugzilla | src/Web/Bugzilla/Internal/Types.hs | bsd-3-clause | fromNumericBool _ = True | 24 | fromNumericBool _ = True | 24 | fromNumericBool _ = True | 24 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
duncanburke/toliman-core | src/Game/Toliman/Internal/Types.hs | mpl-2.0 | makeUnderscoreFields :: Name -> DecsQ
makeUnderscoreFields = makeLensesWith underscoreFields | 92 | makeUnderscoreFields :: Name -> DecsQ
makeUnderscoreFields = makeLensesWith underscoreFields | 92 | makeUnderscoreFields = makeLensesWith underscoreFields | 54 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
ciderpunx/57-exercises-for-programmers | src/P20StateTax.hs | gpl-3.0 | taxLookup :: TaxLookup
taxLookup =
Subregions (fromList [ ( "wisconsin"
, Subregions (fromList [ ("eau clair", Rate 0.005)
, ("dunn", Rate 0.004)
])
)
... | 814 | taxLookup :: TaxLookup
taxLookup =
Subregions (fromList [ ( "wisconsin"
, Subregions (fromList [ ("eau clair", Rate 0.005)
, ("dunn", Rate 0.004)
])
)
... | 814 | taxLookup =
Subregions (fromList [ ( "wisconsin"
, Subregions (fromList [ ("eau clair", Rate 0.005)
, ("dunn", Rate 0.004)
])
)
, ( "wn"
... | 791 | false | true | 0 | 15 | 535 | 152 | 86 | 66 | null | null |
dmbarbour/awelon | hsrc/AO/AOFile.hs | bsd-3-clause | -- add imports to task list
-- extract basic entries from a file text; emit a warning for
-- any entry that fails to parse
readAOFileText :: (Monad m) => FS.FilePath -> Text -> LoadAO m ([Import], [AODef Line])
readAOFileText fp code = case splitEntries $ dropTheBOM code of
[] -> return ([],[]) -- not possible, bu... | 711 | readAOFileText :: (Monad m) => FS.FilePath -> Text -> LoadAO m ([Import], [AODef Line])
readAOFileText fp code = case splitEntries $ dropTheBOM code of
[] -> return ([],[]) -- not possible, but also not a problem
((_,impEnt):defEnts) ->
let src = T.unpack $ either id id $ FS.toText fp in
let im... | 587 | readAOFileText fp code = case splitEntries $ dropTheBOM code of
[] -> return ([],[]) -- not possible, but also not a problem
((_,impEnt):defEnts) ->
let src = T.unpack $ either id id $ FS.toText fp in
let imps = T.words impEnt in
let (errs,defs) = partitionEithers $ fmap (parseEntry src... | 499 | true | true | 0 | 19 | 166 | 217 | 112 | 105 | null | null |
vollmerm/monad-tune | Control/Monad/Tune.hs | bsd-2-clause | hasParent :: TunerChoice -> Bool
hasParent c = isJust $ parent c | 64 | hasParent :: TunerChoice -> Bool
hasParent c = isJust $ parent c | 64 | hasParent c = isJust $ parent c | 31 | false | true | 0 | 6 | 11 | 25 | 12 | 13 | null | null |
phischu/fragnix | benchmarks/containers/Data.Sequence.hs | bsd-3-clause | addDigits0 m1 (Three a b c) (Three d e f) m2 =
appendTree2 m1 (node3 a b c) (node3 d e f) m2 | 96 | addDigits0 m1 (Three a b c) (Three d e f) m2 =
appendTree2 m1 (node3 a b c) (node3 d e f) m2 | 96 | addDigits0 m1 (Three a b c) (Three d e f) m2 =
appendTree2 m1 (node3 a b c) (node3 d e f) m2 | 96 | false | false | 1 | 7 | 26 | 73 | 31 | 42 | null | null |
rueshyna/gogol | gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Operations/Cancel.hs | mpl-2.0 | -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
ocUploadProtocol :: Lens' OperationsCancel (Maybe Text)
ocUploadProtocol
= lens _ocUploadProtocol
(\ s a -> s{_ocUploadProtocol = a}) | 203 | ocUploadProtocol :: Lens' OperationsCancel (Maybe Text)
ocUploadProtocol
= lens _ocUploadProtocol
(\ s a -> s{_ocUploadProtocol = a}) | 141 | ocUploadProtocol
= lens _ocUploadProtocol
(\ s a -> s{_ocUploadProtocol = a}) | 85 | true | true | 0 | 9 | 33 | 48 | 25 | 23 | null | null |
jgoerzen/listlike | testsrc/TestInfrastructure.hs | lgpl-2.1 | ws :: (LL.StringLike f, TestLL f i) => String -> LLTest f i -> HU.Test
ws = w | 77 | ws :: (LL.StringLike f, TestLL f i) => String -> LLTest f i -> HU.Test
ws = w | 77 | ws = w | 6 | false | true | 0 | 8 | 17 | 45 | 23 | 22 | null | null |
kim/amazonka | amazonka-lambda/gen/Network/AWS/Lambda/ListEventSourceMappings.hs | mpl-2.0 | -- | 'ListEventSourceMappings' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'lesmEventSourceArn' @::@ 'Maybe' 'Text'
--
-- * 'lesmFunctionName' @::@ 'Maybe' 'Text'
--
-- * 'lesmMarker' @::@ 'Maybe' 'Text'
--
-- * 'lesmMaxItems' @::@ 'Maybe' 'Natural'
--
listEventSourceMappings :: L... | 542 | listEventSourceMappings :: ListEventSourceMappings
listEventSourceMappings = ListEventSourceMappings
{ _lesmEventSourceArn = Nothing
, _lesmFunctionName = Nothing
, _lesmMarker = Nothing
, _lesmMaxItems = Nothing
} | 250 | listEventSourceMappings = ListEventSourceMappings
{ _lesmEventSourceArn = Nothing
, _lesmFunctionName = Nothing
, _lesmMarker = Nothing
, _lesmMaxItems = Nothing
} | 199 | true | true | 0 | 6 | 100 | 49 | 35 | 14 | null | null |
chrisbanks/cpiwb | profileMC3.hs | gpl-3.0 | f12 = Nec (0,infty) f8 | 22 | f12 = Nec (0,infty) f8 | 22 | f12 = Nec (0,infty) f8 | 22 | false | false | 0 | 6 | 4 | 17 | 9 | 8 | null | null |
glutamate/probably-base | Math/Probably/RandIO.hs | bsd-3-clause | sample :: Prob a -> RIO a
sample (Sampler f) = do sd <- S.get
let (x,sd') = f sd
S.put sd'
return x | 171 | sample :: Prob a -> RIO a
sample (Sampler f) = do sd <- S.get
let (x,sd') = f sd
S.put sd'
return x | 171 | sample (Sampler f) = do sd <- S.get
let (x,sd') = f sd
S.put sd'
return x | 145 | false | true | 0 | 10 | 95 | 72 | 32 | 40 | null | null |
smlsharp/smlsharp | benchmark/benchmarks_parallel/mandelbrot/mandelbrot_ghc_forkIO.hs | mit | rep (args@(size, cutOff, _, image)) n =
do t1 <- getCurrentTime
r <- doit args
t2 <- getCurrentTime
{-
hPutStrLn stderr $ "P1\n" ++ show size ++ " " ++ show size
getElems image >>= \x -> forM x $ hPutStr stderr . show
-}
putStrLn $ " - {result: " ++ show 0 ++ ", time: "
++ sho... | 373 | rep (args@(size, cutOff, _, image)) n =
do t1 <- getCurrentTime
r <- doit args
t2 <- getCurrentTime
{-
hPutStrLn stderr $ "P1\n" ++ show size ++ " " ++ show size
getElems image >>= \x -> forM x $ hPutStr stderr . show
-}
putStrLn $ " - {result: " ++ show 0 ++ ", time: "
++ sho... | 373 | rep (args@(size, cutOff, _, image)) n =
do t1 <- getCurrentTime
r <- doit args
t2 <- getCurrentTime
{-
hPutStrLn stderr $ "P1\n" ++ show size ++ " " ++ show size
getElems image >>= \x -> forM x $ hPutStr stderr . show
-}
putStrLn $ " - {result: " ++ show 0 ++ ", time: "
++ sho... | 373 | false | false | 1 | 12 | 118 | 108 | 54 | 54 | null | null |
fmthoma/ghc | compiler/iface/IfaceType.hs | bsd-3-clause | toIfaceCoercion (TransCo co1 co2) = IfaceTransCo (toIfaceCoercion co1)
(toIfaceCoercion co2) | 145 | toIfaceCoercion (TransCo co1 co2) = IfaceTransCo (toIfaceCoercion co1)
(toIfaceCoercion co2) | 145 | toIfaceCoercion (TransCo co1 co2) = IfaceTransCo (toIfaceCoercion co1)
(toIfaceCoercion co2) | 145 | false | false | 0 | 7 | 62 | 34 | 16 | 18 | null | null |
ZjMNZHgG5jMXw/privacy-option | Language/POL/Syntax.hs | bsd-3-clause | consFoldedAnd c fa
= fa { occs = Map.insertWith (+) c 1 (occs fa) } | 89 | consFoldedAnd c fa
= fa { occs = Map.insertWith (+) c 1 (occs fa) } | 89 | consFoldedAnd c fa
= fa { occs = Map.insertWith (+) c 1 (occs fa) } | 89 | false | false | 1 | 10 | 36 | 46 | 21 | 25 | null | null |
owainlewis/slack | src/Network/Slack/Api.hs | mit | usersSetPresence :: Token -> RequestParams -> IO SlackResponse
usersSetPresence token params = request token "users.setPresence" params | 135 | usersSetPresence :: Token -> RequestParams -> IO SlackResponse
usersSetPresence token params = request token "users.setPresence" params | 135 | usersSetPresence token params = request token "users.setPresence" params | 72 | false | true | 0 | 7 | 15 | 34 | 16 | 18 | null | null |
rueshyna/gogol | gogol-gmail/gen/Network/Google/Gmail/Types/Product.hs | mpl-2.0 | -- | The immutable ID of the message.
mId :: Lens' Message (Maybe Text)
mId = lens _mId (\ s a -> s{_mId = a}) | 110 | mId :: Lens' Message (Maybe Text)
mId = lens _mId (\ s a -> s{_mId = a}) | 72 | mId = lens _mId (\ s a -> s{_mId = a}) | 38 | true | true | 0 | 9 | 24 | 46 | 25 | 21 | null | null |
leshchevds/ganeti | src/Ganeti/MaintD/Server.hs | bsd-2-clause | -- | Load cluster data
--
-- At the moment, only the static data is fetched via luxi;
-- once we support load-based balancing in maintd as well,
-- we also need to query the MonDs for the load data.
loadClusterData :: ResultT String IO ClusterData
loadClusterData = do
now <- liftIO getClockTime
socket <- liftIO Pat... | 956 | loadClusterData :: ResultT String IO ClusterData
loadClusterData = do
now <- liftIO getClockTime
socket <- liftIO Path.defaultQuerySocket
either_inp <- liftIO . tryIOError $ Luxi.loadData False socket
input_data <- mkResultT $ case either_inp of
Left e -> do
let msg = show... | 757 | loadClusterData = do
now <- liftIO getClockTime
socket <- liftIO Path.defaultQuerySocket
either_inp <- liftIO . tryIOError $ Luxi.loadData False socket
input_data <- mkResultT $ case either_inp of
Left e -> do
let msg = show e
logNotice $ "Couldn't read... | 708 | true | true | 0 | 17 | 264 | 248 | 117 | 131 | null | null |
spechub/Hets | CSL/AnEvenTool.hs | gpl-2.0 | getStGeneric :: (AnEvenState -> Maybe a) -- the accessor function
-> String -- the error message
-> Sh AnEvenState a
getStGeneric f msg = do
st <- getShellSt
case f st of
Just a -> return a
Nothing -> error msg | 249 | getStGeneric :: (AnEvenState -> Maybe a) -- the accessor function
-> String -- the error message
-> Sh AnEvenState a
getStGeneric f msg = do
st <- getShellSt
case f st of
Just a -> return a
Nothing -> error msg | 248 | getStGeneric f msg = do
st <- getShellSt
case f st of
Just a -> return a
Nothing -> error msg | 105 | false | true | 0 | 10 | 79 | 79 | 37 | 42 | null | null |
jystic/river | src/River/X64/FromCore.hs | bsd-3-clause | ------------------------------------------------------------------------
assemblyOfProgram ::
Ord n =>
FreshName n =>
(n -> Label) ->
Program () Core.Prim n a ->
Either (X64Error n a) [Instruction]
assemblyOfProgram mkLabel p0 = do
let
runFreshN p =
runFreshFrom $ nextOfProgram p
p1 <-
fir... | 967 | assemblyOfProgram ::
Ord n =>
FreshName n =>
(n -> Label) ->
Program () Core.Prim n a ->
Either (X64Error n a) [Instruction]
assemblyOfProgram mkLabel p0 = do
let
runFreshN p =
runFreshFrom $ nextOfProgram p
p1 <-
first ReprimError . runFreshN p0 . runExceptT $ do
pp <- reprimProgram ... | 893 | assemblyOfProgram mkLabel p0 = do
let
runFreshN p =
runFreshFrom $ nextOfProgram p
p1 <-
first ReprimError . runFreshN p0 . runExceptT $ do
pp <- reprimProgram p0
pc <- reconditionProgram pp
pj <- jumpOfProgram $ flipProgram pc
pure .
runProgress $ deadOfProgram pj
... | 758 | true | true | 0 | 14 | 256 | 293 | 132 | 161 | null | null |
rueshyna/gogol | gogol-ml/gen/Network/Google/MachineLearning/Types/Product.hs | mpl-2.0 | -- | Required if type is \`DISCRETE\`. A list of feasible points. The list
-- should be in strictly increasing order. For instance, this parameter
-- might have possible settings of 1.5, 2.5, and 4.0. This list should not
-- contain more than 1,000 values.
gcmvpsDiscreteValues :: Lens' GoogleCloudMlV1beta1__ParameterSp... | 462 | gcmvpsDiscreteValues :: Lens' GoogleCloudMlV1beta1__ParameterSpec [Double]
gcmvpsDiscreteValues
= lens _gcmvpsDiscreteValues
(\ s a -> s{_gcmvpsDiscreteValues = a})
. _Default
. _Coerce | 205 | gcmvpsDiscreteValues
= lens _gcmvpsDiscreteValues
(\ s a -> s{_gcmvpsDiscreteValues = a})
. _Default
. _Coerce | 130 | true | true | 0 | 11 | 84 | 56 | 31 | 25 | null | null |
brendanhay/gogol | gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Locations/Buckets/Undelete.hs | mpl-2.0 | -- | Multipart request metadata.
balbuPayload :: Lens' BillingAccountsLocationsBucketsUndelete UndeleteBucketRequest
balbuPayload
= lens _balbuPayload (\ s a -> s{_balbuPayload = a}) | 184 | balbuPayload :: Lens' BillingAccountsLocationsBucketsUndelete UndeleteBucketRequest
balbuPayload
= lens _balbuPayload (\ s a -> s{_balbuPayload = a}) | 151 | balbuPayload
= lens _balbuPayload (\ s a -> s{_balbuPayload = a}) | 67 | true | true | 0 | 9 | 22 | 42 | 22 | 20 | null | null |
kazu-yamamoto/llrbtree | Data/Set/LLRBTree.hs | bsd-3-clause | ----------------------------------------------------------------
{-| Splitting a tree. Worst-case: O(log N)
>>> split 2 (fromList [5,3]) == (empty, fromList [3,5])
True
>>> split 3 (fromList [5,3]) == (empty, singleton 5)
True
>>> split 4 (fromList [5,3]) == (singleton 3, singleton 5)
True
>>> split 5 (fromList [5,3]... | 498 | split :: Ord a => a -> RBTree a -> (RBTree a, RBTree a)
split _ Leaf = (Leaf,Leaf) | 82 | split _ Leaf = (Leaf,Leaf) | 26 | true | true | 0 | 11 | 81 | 60 | 29 | 31 | null | null |
kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types.hs | mpl-2.0 | -- | The associated code of the event.
iseCode :: Lens' InstanceStatusEvent (Maybe EventCode)
iseCode = lens _iseCode (\s a -> s { _iseCode = a }) | 146 | iseCode :: Lens' InstanceStatusEvent (Maybe EventCode)
iseCode = lens _iseCode (\s a -> s { _iseCode = a }) | 107 | iseCode = lens _iseCode (\s a -> s { _iseCode = a }) | 52 | true | true | 2 | 9 | 26 | 55 | 25 | 30 | null | null |
zchn/ethereum-analyzer | ethereum-analyzer-deps/src/Blockchain/Data/RLP.hs | apache-2.0 | splitAtWithError i s = B.splitAt i s | 36 | splitAtWithError i s = B.splitAt i s | 36 | splitAtWithError i s = B.splitAt i s | 36 | false | false | 0 | 6 | 6 | 19 | 8 | 11 | null | null |
Proclivis/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxLITTLE_ENDIAN :: Int
wxLITTLE_ENDIAN = 1234 | 45 | wxLITTLE_ENDIAN :: Int
wxLITTLE_ENDIAN = 1234 | 45 | wxLITTLE_ENDIAN = 1234 | 22 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
anttisalonen/freekick2 | src/Swos.hs | gpl-3.0 | loadTeamsFromFile :: FilePath -> IO [SWOSTeam]
loadTeamsFromFile fp = liftM fileteams (decodeFile fp) | 101 | loadTeamsFromFile :: FilePath -> IO [SWOSTeam]
loadTeamsFromFile fp = liftM fileteams (decodeFile fp) | 101 | loadTeamsFromFile fp = liftM fileteams (decodeFile fp) | 54 | false | true | 0 | 7 | 12 | 35 | 17 | 18 | null | null |
jragonfyre/TRPG | src/Dictionary.hs | bsd-3-clause | simplePastTense :: Tense
simplePastTense = Tense Past False False | 65 | simplePastTense :: Tense
simplePastTense = Tense Past False False | 65 | simplePastTense = Tense Past False False | 40 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
lkitching/PScheme | test/EvalTests.hs | bsd-3-clause | setTests :: TestTree
setTests = testGroup "set!" [
testCase "set!" $ assertEval "(let ((a 1)) (begin (set! a 2) a))" (Number 2),
testCase "unbound" $ assertEvalError "(set! a 3)" (UnboundRef "a")] | 203 | setTests :: TestTree
setTests = testGroup "set!" [
testCase "set!" $ assertEval "(let ((a 1)) (begin (set! a 2) a))" (Number 2),
testCase "unbound" $ assertEvalError "(set! a 3)" (UnboundRef "a")] | 202 | setTests = testGroup "set!" [
testCase "set!" $ assertEval "(let ((a 1)) (begin (set! a 2) a))" (Number 2),
testCase "unbound" $ assertEvalError "(set! a 3)" (UnboundRef "a")] | 181 | false | true | 0 | 10 | 37 | 58 | 28 | 30 | null | null |
robinbb/hs-text-xhtml | Text/XHtml/Frameset/Attributes.hs | apache-2.0 | scrolling :: String -> HtmlAttr
scrolling = strAttr "scrolling" | 85 | scrolling :: String -> HtmlAttr
scrolling = strAttr "scrolling" | 85 | scrolling = strAttr "scrolling" | 43 | false | true | 0 | 5 | 30 | 18 | 9 | 9 | null | null |
bredelings/BAli-Phy | haskell/Probability/Distribution/Tree/BirthDeath.hs | gpl-2.0 | surviving_tips (_, Death ) = 0 | 36 | surviving_tips (_, Death ) = 0 | 36 | surviving_tips (_, Death ) = 0 | 36 | false | false | 0 | 6 | 11 | 15 | 8 | 7 | null | null |
Risto-Stevcev/haskell-church-encodings | RankNTypes/Church.hs | bsd-3-clause | -- Church Cons
-- λh.λt.pair false (pair h t)
cons :: a2 -> a3 -> ((a1 -> a1 -> a1) -> ((a2 -> a3 -> a4) -> a4) -> a) -> a
cons = \h -> \t -> pair false (pair h t) | 163 | cons :: a2 -> a3 -> ((a1 -> a1 -> a1) -> ((a2 -> a3 -> a4) -> a4) -> a) -> a
cons = \h -> \t -> pair false (pair h t) | 117 | cons = \h -> \t -> pair false (pair h t) | 40 | true | true | 0 | 15 | 42 | 88 | 48 | 40 | null | null |
pparkkin/eta | compiler/ETA/CodeGen/Prim.hs | bsd-3-clause | simpleOp NotOp = Just $ normalOp inot | 37 | simpleOp NotOp = Just $ normalOp inot | 37 | simpleOp NotOp = Just $ normalOp inot | 37 | false | false | 0 | 6 | 6 | 16 | 7 | 9 | null | null |
kmilner/tamarin-prover | lib/theory/src/Theory.hs | gpl-3.0 | -- | Close an intruder rule; i.e., compute maximum number of consecutive applications and variants
-- Should be parallelized like the variant computation for protocol rules (JD)
closeIntrRule :: MaudeHandle -> IntrRuleAC -> [IntrRuleAC]
closeIntrRule hnd (Rule (DestrRule name (-1) subterm constant) prems@((Fact KDFac... | 1,007 | closeIntrRule :: MaudeHandle -> IntrRuleAC -> [IntrRuleAC]
closeIntrRule hnd (Rule (DestrRule name (-1) subterm constant) prems@((Fact KDFact _ [t]):_) concs@[Fact KDFact _ [rhs]] acts nvs) =
if subterm then [ru] else variantsIntruder hnd id False ru
where
ru = (Rule (DestrRule name (if runMaude (unifiableL... | 827 | closeIntrRule hnd (Rule (DestrRule name (-1) subterm constant) prems@((Fact KDFact _ [t]):_) concs@[Fact KDFact _ [rhs]] acts nvs) =
if subterm then [ru] else variantsIntruder hnd id False ru
where
ru = (Rule (DestrRule name (if runMaude (unifiableLNTerms rhs t)
then (length (p... | 768 | true | true | 0 | 15 | 316 | 224 | 124 | 100 | null | null |
unknownloner/calccomp | Asm/Parser.hs | mit | braces :: Parser a -> Parser a
braces p = do
symbol "{"
x <- p
symbol "}"
return x | 98 | braces :: Parser a -> Parser a
braces p = do
symbol "{"
x <- p
symbol "}"
return x | 98 | braces p = do
symbol "{"
x <- p
symbol "}"
return x | 67 | false | true | 0 | 7 | 35 | 49 | 20 | 29 | null | null |
mydaum/cabal | Cabal/Distribution/Simple/Utils.hs | bsd-3-clause | createDirectoryIfMissingVerbose :: Verbosity
-> Bool -- ^ Create its parents too?
-> FilePath
-> IO ()
createDirectoryIfMissingVerbose verbosity create_parents path0
| create_parents = withFrozenCallStack $ createDirs ... | 1,770 | createDirectoryIfMissingVerbose :: Verbosity
-> Bool -- ^ Create its parents too?
-> FilePath
-> IO ()
createDirectoryIfMissingVerbose verbosity create_parents path0
| create_parents = withFrozenCallStack $ createDirs ... | 1,770 | createDirectoryIfMissingVerbose verbosity create_parents path0
| create_parents = withFrozenCallStack $ createDirs (parents path0)
| otherwise = withFrozenCallStack $ createDirs (take 1 (parents path0))
where
parents = reverse . scanl1 (</>) . splitDirectories . normalise
createDirs [] = ret... | 1,567 | false | true | 23 | 12 | 599 | 370 | 189 | 181 | null | null |
rickardlindberg/codemonitor | src/Main.hs | bsd-3-clause | setupMonitors :: IO () -> IO (IORef [Monitor])
setupMonitors forceRedraw = do
(watchDir, jobDescriptions, monitors) <- readConfig
monitorsRef <- newIORef monitors
monitorsLock <- newEmptyMVar
let statusUpdateHandler newStatus = do
putMVar monitorsLock ()
modifyIORef monitorsRef (updateM... | 622 | setupMonitors :: IO () -> IO (IORef [Monitor])
setupMonitors forceRedraw = do
(watchDir, jobDescriptions, monitors) <- readConfig
monitorsRef <- newIORef monitors
monitorsLock <- newEmptyMVar
let statusUpdateHandler newStatus = do
putMVar monitorsLock ()
modifyIORef monitorsRef (updateM... | 622 | setupMonitors forceRedraw = do
(watchDir, jobDescriptions, monitors) <- readConfig
monitorsRef <- newIORef monitors
monitorsLock <- newEmptyMVar
let statusUpdateHandler newStatus = do
putMVar monitorsLock ()
modifyIORef monitorsRef (updateMonitors newStatus)
readIORef monitorsRe... | 575 | false | true | 0 | 14 | 133 | 163 | 71 | 92 | null | null |
zmeadows/zwerg | lib/Zwerg/Data/Equipment.hs | mit | getAllEquippedItems :: Equipment -> [UUID]
getAllEquippedItems (MkEquipment eq) = L.nub $ M.elems eq | 100 | getAllEquippedItems :: Equipment -> [UUID]
getAllEquippedItems (MkEquipment eq) = L.nub $ M.elems eq | 100 | getAllEquippedItems (MkEquipment eq) = L.nub $ M.elems eq | 57 | false | true | 0 | 7 | 12 | 42 | 20 | 22 | null | null |
mstksg/neural | src/Data/Neural/Utility.hs | mit | foldl'' :: NFData b => (b -> a -> b) -> b -> [a] -> b
foldl'' f = go
where
go z [] = z
go z (x:xs) = let y = f z x in y `deepseq` go y xs
-- data Pair5 :: (j -> k -> l -> m -> *) -> (j -> k -> l -> m -> *) -> j -> k -> l -> m -> * where
-- P5 :: f a b c d -> g a b c d -> Pair5 f g a b c d
-- -- ne... | 803 | foldl'' :: NFData b => (b -> a -> b) -> b -> [a] -> b
foldl'' f = go
where
go z [] = z
go z (x:xs) = let y = f z x in y `deepseq` go y xs
-- data Pair5 :: (j -> k -> l -> m -> *) -> (j -> k -> l -> m -> *) -> j -> k -> l -> m -> * where
-- P5 :: f a b c d -> g a b c d -> Pair5 f g a b c d
-- -- ne... | 803 | foldl'' f = go
where
go z [] = z
go z (x:xs) = let y = f z x in y `deepseq` go y xs
-- data Pair5 :: (j -> k -> l -> m -> *) -> (j -> k -> l -> m -> *) -> j -> k -> l -> m -> * where
-- P5 :: f a b c d -> g a b c d -> Pair5 f g a b c d
-- -- newtype MagicNatAdd r = MagicNatAdd (forall (n :: Nat) (... | 749 | false | true | 1 | 10 | 225 | 123 | 60 | 63 | null | null |
romanb/amazonka | amazonka-swf/gen/Network/AWS/SWF/Types.hs | mpl-2.0 | -- | The policy to use for the child workflow executions if this workflow
-- execution is terminated, by calling the 'TerminateWorkflowExecution' action
-- explicitly or due to an expired timeout.
--
-- The supported child policies are:
--
-- TERMINATE: the child executions will be terminated. REQUEST_CANCEL: a
-- requ... | 779 | wecChildPolicy :: Lens' WorkflowExecutionConfiguration ChildPolicy
wecChildPolicy = lens _wecChildPolicy (\s a -> s { _wecChildPolicy = a }) | 140 | wecChildPolicy = lens _wecChildPolicy (\s a -> s { _wecChildPolicy = a }) | 73 | true | true | 0 | 9 | 119 | 49 | 31 | 18 | null | null |
dmcclean/HaTeX | Text/LaTeX/Packages/AMSMath.hs | bsd-3-clause | -- | Left angle bracket, 〈.
langle :: LaTeXC l => l
langle = comm0 "langle" | 75 | langle :: LaTeXC l => l
langle = comm0 "langle" | 47 | langle = comm0 "langle" | 23 | true | true | 0 | 7 | 15 | 29 | 12 | 17 | null | null |
Lifelovinglight/Scheme | Scheme.hs | gpl-3.0 | lambda :: SchemePrimitive
lambda argp = do
formalArguments <- car argp
functionBody <- cdr argp
env <- gets environment
primitiveCons formalArguments functionBody >>= primitiveCons env
-- | Evaluate a list of statements and return the result of the last one. | 267 | lambda :: SchemePrimitive
lambda argp = do
formalArguments <- car argp
functionBody <- cdr argp
env <- gets environment
primitiveCons formalArguments functionBody >>= primitiveCons env
-- | Evaluate a list of statements and return the result of the last one. | 267 | lambda argp = do
formalArguments <- car argp
functionBody <- cdr argp
env <- gets environment
primitiveCons formalArguments functionBody >>= primitiveCons env
-- | Evaluate a list of statements and return the result of the last one. | 241 | false | true | 0 | 9 | 48 | 66 | 27 | 39 | null | null |
Gabriel439/Haskell-Dhall-Library | dhall/src/Dhall/Tags.hs | bsd-3-clause | inputToFiles
:: Bool
-- ^ If `True`, this function will follow symbolic links
-> Maybe [String]
-- ^ List of suffixes. If `Nothing`, all files will be returned.
-- This parameter only works when the `Input` is an `InputFile` and point to a directory.
-> Input
-> IO [ FilePath ]
-- L... | 388 | inputToFiles
:: Bool
-- ^ If `True`, this function will follow symbolic links
-> Maybe [String]
-- ^ List of suffixes. If `Nothing`, all files will be returned.
-- This parameter only works when the `Input` is an `InputFile` and point to a directory.
-> Input
-> IO [ FilePath ]
inputToFil... | 364 | inputToFiles _ _ StandardInput = lines <$> getContents | 54 | true | true | 0 | 10 | 99 | 55 | 28 | 27 | null | null |
gmarpons/elections-in-spain | ElectionsInSpain.hs | gpl-3.0 | getText :: Int -> Get Text
getText n = T.stripEnd . T.pack . BS8.unpack <$> getByteString n | 91 | getText :: Int -> Get Text
getText n = T.stripEnd . T.pack . BS8.unpack <$> getByteString n | 91 | getText n = T.stripEnd . T.pack . BS8.unpack <$> getByteString n | 64 | false | true | 2 | 7 | 16 | 48 | 21 | 27 | null | null |
chadbrewbaker/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_checkTimeParameters2 = verifyNot checkTimeParameters "time sleep 10" | 73 | prop_checkTimeParameters2 = verifyNot checkTimeParameters "time sleep 10" | 73 | prop_checkTimeParameters2 = verifyNot checkTimeParameters "time sleep 10" | 73 | false | false | 0 | 5 | 6 | 11 | 5 | 6 | null | null |
facebookincubator/duckling | Duckling/Time/Computed.hs | bsd-3-clause | roshHashana' :: [TimeObject]
roshHashana' = mapMaybe toTimeObjectM
[ (1950, 9, 11)
, (1951, 9, 30)
, (1952, 9, 19)
, (1953, 9, 9)
, (1954, 9, 27)
, (1955, 9, 16)
, (1956, 9, 5)
, (1957, 9, 25)
, (1958, 9, 14)
, (1959, 10, 2)
, (1960, 9, 21)
, (1961, 9, 10)
, (1962, 9, 28)
, (1963, 9, 18)
,... | 1,870 | roshHashana' :: [TimeObject]
roshHashana' = mapMaybe toTimeObjectM
[ (1950, 9, 11)
, (1951, 9, 30)
, (1952, 9, 19)
, (1953, 9, 9)
, (1954, 9, 27)
, (1955, 9, 16)
, (1956, 9, 5)
, (1957, 9, 25)
, (1958, 9, 14)
, (1959, 10, 2)
, (1960, 9, 21)
, (1961, 9, 10)
, (1962, 9, 28)
, (1963, 9, 18)
,... | 1,870 | roshHashana' = mapMaybe toTimeObjectM
[ (1950, 9, 11)
, (1951, 9, 30)
, (1952, 9, 19)
, (1953, 9, 9)
, (1954, 9, 27)
, (1955, 9, 16)
, (1956, 9, 5)
, (1957, 9, 25)
, (1958, 9, 14)
, (1959, 10, 2)
, (1960, 9, 21)
, (1961, 9, 10)
, (1962, 9, 28)
, (1963, 9, 18)
, (1964, 9, 6)
, (1965, 9, 2... | 1,841 | false | true | 0 | 7 | 615 | 1,238 | 819 | 419 | null | null |
sapek/pandoc | src/Text/Pandoc/Readers/LaTeX.hs | gpl-2.0 | umlaut 'e' = "ë" | 16 | umlaut 'e' = "ë" | 16 | umlaut 'e' = "ë" | 16 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
mbakke/ganeti | src/Ganeti/Hs2Py/OpDoc.hs | bsd-2-clause | opNodeAdd :: String
opNodeAdd =
"Add a node to the cluster.\n\
\\n\
\ @type node_name: C{str}\n\
\ @ivar node_name: The name of the node to add. This can be a short name,\n\
\ but it will be expanded to the FQDN.\n\
\ @type primary_ip: IP address\n\
\ @ivar primary_ip: The primary IP of the node... | 1,435 | opNodeAdd :: String
opNodeAdd =
"Add a node to the cluster.\n\
\\n\
\ @type node_name: C{str}\n\
\ @ivar node_name: The name of the node to add. This can be a short name,\n\
\ but it will be expanded to the FQDN.\n\
\ @type primary_ip: IP address\n\
\ @ivar primary_ip: The primary IP of the node... | 1,435 | opNodeAdd =
"Add a node to the cluster.\n\
\\n\
\ @type node_name: C{str}\n\
\ @ivar node_name: The name of the node to add. This can be a short name,\n\
\ but it will be expanded to the FQDN.\n\
\ @type primary_ip: IP address\n\
\ @ivar primary_ip: The primary IP of the node. This will be ignor... | 1,415 | false | true | 0 | 4 | 385 | 11 | 6 | 5 | null | null |
agocorona/haste-perch | Haste/App/Perch.hs | gpl-3.0 | title cont = nelem "title" `child` cont | 40 | title cont = nelem "title" `child` cont | 40 | title cont = nelem "title" `child` cont | 40 | false | false | 0 | 6 | 7 | 18 | 9 | 9 | null | null |
anchor/vaultaire-collector-ceilometer | lib/Vaultaire/Collector/Ceilometer/Process/IP.hs | mit | parseIPStatus :: Maybe Value -> Maybe PFIPStatus
parseIPStatus Nothing = Just IPNone | 101 | parseIPStatus :: Maybe Value -> Maybe PFIPStatus
parseIPStatus Nothing = Just IPNone | 101 | parseIPStatus Nothing = Just IPNone | 52 | false | true | 0 | 6 | 28 | 27 | 12 | 15 | null | null |
rimmington/cabal | cabal-install/Distribution/Client/Install.hs | bsd-3-clause | -- | Make an install context given install arguments.
makeInstallContext :: Verbosity -> InstallArgs -> Maybe [UserTarget]
-> IO InstallContext
makeInstallContext verbosity
(packageDBs, repos, comp, _, conf,_,_,
globalFlags, _, _, _, _) mUserTargets = do
installedPkgIndex <- getInstalled... | 1,566 | makeInstallContext :: Verbosity -> InstallArgs -> Maybe [UserTarget]
-> IO InstallContext
makeInstallContext verbosity
(packageDBs, repos, comp, _, conf,_,_,
globalFlags, _, _, _, _) mUserTargets = do
installedPkgIndex <- getInstalledPackages verbosity comp packageDBs conf
sourcePkgD... | 1,512 | makeInstallContext verbosity
(packageDBs, repos, comp, _, conf,_,_,
globalFlags, _, _, _, _) mUserTargets = do
installedPkgIndex <- getInstalledPackages verbosity comp packageDBs conf
sourcePkgDb <- getSourcePackages verbosity repos
transport <- configureTransport verbosity
(... | 1,400 | true | true | 0 | 20 | 460 | 284 | 145 | 139 | null | null |
pbogdan/kube-cert | src/Lib/Commands.hs | bsd-3-clause | genClientCert :: FilePath
-> FilePath
-> FilePath
-> EitherT String IO ()
genClientCert key csr path =
withEnv [("subjectAltName", " ")] $
genSignedCert
key
csr
path
[ "-days" , "375"
, "-config" , "openssl-san.... | 377 | genClientCert :: FilePath
-> FilePath
-> FilePath
-> EitherT String IO ()
genClientCert key csr path =
withEnv [("subjectAltName", " ")] $
genSignedCert
key
csr
path
[ "-days" , "375"
, "-config" , "openssl-san.... | 377 | genClientCert key csr path =
withEnv [("subjectAltName", " ")] $
genSignedCert
key
csr
path
[ "-days" , "375"
, "-config" , "openssl-san.cnf"
, "-extensions" , "usr_cert"
] | 261 | false | true | 0 | 10 | 169 | 89 | 45 | 44 | null | null |
supermitch/learn-haskell | sandbox/palindrome.hs | mit | isPalindrome (x:xs)
| x == last xs = isPalindrome $ init xs
| otherwise = False | 87 | isPalindrome (x:xs)
| x == last xs = isPalindrome $ init xs
| otherwise = False | 87 | isPalindrome (x:xs)
| x == last xs = isPalindrome $ init xs
| otherwise = False | 87 | false | false | 0 | 9 | 23 | 45 | 20 | 25 | null | null |
leshchevds/ganeti | src/Ganeti/Confd/Server.hs | bsd-2-clause | buildResponse cdata req@(ConfdRequest { confdRqType = ReqConfigQuery
, confdRqQuery = pathQ }) = do
let cfg = fst cdata
path <-
case pathQ of
PlainQuery path -> return path
_ -> fail $ "Invalid query type " ++ show (confdRqQuery req)
let configValue = extractJ... | 565 | buildResponse cdata req@(ConfdRequest { confdRqType = ReqConfigQuery
, confdRqQuery = pathQ }) = do
let cfg = fst cdata
path <-
case pathQ of
PlainQuery path -> return path
_ -> fail $ "Invalid query type " ++ show (confdRqQuery req)
let configValue = extractJ... | 565 | buildResponse cdata req@(ConfdRequest { confdRqType = ReqConfigQuery
, confdRqQuery = pathQ }) = do
let cfg = fst cdata
path <-
case pathQ of
PlainQuery path -> return path
_ -> fail $ "Invalid query type " ++ show (confdRqQuery req)
let configValue = extractJ... | 565 | false | false | 0 | 14 | 171 | 156 | 75 | 81 | null | null |
thiry/DComp | src/DBstrict.hs | gpl-2.0 | match3 :: Edge -> Edge -> Context -> (Bool,Context)
match3 (p,q,r) (v,w,x) ctx =
let (r1,ctx1) = match1 p v ctx in
if r1 then
let (r2,ctx2) = match1 q w ctx1 in
if r2 then
match1 r x ctx2
else (False,ctx)
else (False,ctx) | 242 | match3 :: Edge -> Edge -> Context -> (Bool,Context)
match3 (p,q,r) (v,w,x) ctx =
let (r1,ctx1) = match1 p v ctx in
if r1 then
let (r2,ctx2) = match1 q w ctx1 in
if r2 then
match1 r x ctx2
else (False,ctx)
else (False,ctx) | 242 | match3 (p,q,r) (v,w,x) ctx =
let (r1,ctx1) = match1 p v ctx in
if r1 then
let (r2,ctx2) = match1 q w ctx1 in
if r2 then
match1 r x ctx2
else (False,ctx)
else (False,ctx) | 190 | false | true | 0 | 12 | 64 | 145 | 77 | 68 | null | null |
girving/duck | duck/Infer.hs | bsd-3-clause | apply static loc (TyStatic (Any t _)) t2 = apply static loc t t2 | 64 | apply static loc (TyStatic (Any t _)) t2 = apply static loc t t2 | 64 | apply static loc (TyStatic (Any t _)) t2 = apply static loc t t2 | 64 | false | false | 0 | 9 | 13 | 38 | 18 | 20 | null | null |
np/ling | Ling/Prelude.hs | bsd-3-clause | (&&>) :: Monad m => Bool -> m Bool -> m Bool
True &&> my = my | 61 | (&&>) :: Monad m => Bool -> m Bool -> m Bool
True &&> my = my | 61 | True &&> my = my | 16 | false | true | 0 | 8 | 16 | 40 | 19 | 21 | null | null |
mhwombat/exp-uivector-cluster-wains | src/ALife/Creatur/Wain/UIVector/Cluster/Universe.hs | bsd-3-clause | cPredictorTfRange :: Setting (Word64, Word64)
cPredictorTfRange = requiredSetting "predictorTfRange" | 100 | cPredictorTfRange :: Setting (Word64, Word64)
cPredictorTfRange = requiredSetting "predictorTfRange" | 100 | cPredictorTfRange = requiredSetting "predictorTfRange" | 54 | false | true | 1 | 6 | 8 | 26 | 12 | 14 | null | null |
wuxb45/eval | FileServer.hs | bsd-3-clause | pipeAll :: Int -> Handle -> Handle -> IO ()
pipeAll remains from to = do
let thistime = if remains > lim then lim else remains
bs <- BS.hGet from thistime
BS.hPut to bs
--putStrLn $ show ("pipe once:", show thistime, BS.length bs)
let remains' = remains - thistime
when (remains' /= 0) $ pipeAll remains' fro... | 347 | pipeAll :: Int -> Handle -> Handle -> IO ()
pipeAll remains from to = do
let thistime = if remains > lim then lim else remains
bs <- BS.hGet from thistime
BS.hPut to bs
--putStrLn $ show ("pipe once:", show thistime, BS.length bs)
let remains' = remains - thistime
when (remains' /= 0) $ pipeAll remains' fro... | 347 | pipeAll remains from to = do
let thistime = if remains > lim then lim else remains
bs <- BS.hGet from thistime
BS.hPut to bs
--putStrLn $ show ("pipe once:", show thistime, BS.length bs)
let remains' = remains - thistime
when (remains' /= 0) $ pipeAll remains' from to
where lim = 0x100000 | 303 | false | true | 0 | 11 | 76 | 126 | 60 | 66 | null | null |
nfjinjing/bench-euler | src/Math/Six.hs | bsd-3-clause | synthesize [] _ _ = [] | 22 | synthesize [] _ _ = [] | 22 | synthesize [] _ _ = [] | 22 | false | false | 0 | 6 | 5 | 17 | 8 | 9 | null | null |
google/codeworld | codeworld-compiler/src/CodeWorld/Compile/Stages.hs | apache-2.0 | badExpApps _ = [] | 17 | badExpApps _ = [] | 17 | badExpApps _ = [] | 17 | false | false | 0 | 5 | 3 | 12 | 5 | 7 | null | null |
dmjio/aeson | src/Data/Aeson/Encoding/Builder.hs | bsd-3-clause | zonedTime :: ZonedTime -> Builder
zonedTime (ZonedTime t z) = localTime t <> timeZone z | 87 | zonedTime :: ZonedTime -> Builder
zonedTime (ZonedTime t z) = localTime t <> timeZone z | 87 | zonedTime (ZonedTime t z) = localTime t <> timeZone z | 53 | false | true | 0 | 7 | 14 | 36 | 17 | 19 | null | null |
kranich/haste-compiler | src/Haste/Module.hs | bsd-3-clause | readMod :: FilePath -> String -> Bool -> Shell (Maybe Module)
readMod basepath modname boot = do
x <- isFile path
let path' = if x then path else syspath
isF <- isFile path'
if isF
then do
liftIO $ IO.withFile path' IO.ReadMode $ \h -> do
m <- decode <$> (B.hGet h . fromIntege... | 517 | readMod :: FilePath -> String -> Bool -> Shell (Maybe Module)
readMod basepath modname boot = do
x <- isFile path
let path' = if x then path else syspath
isF <- isFile path'
if isF
then do
liftIO $ IO.withFile path' IO.ReadMode $ \h -> do
m <- decode <$> (B.hGet h . fromIntege... | 517 | readMod basepath modname boot = do
x <- isFile path
let path' = if x then path else syspath
isF <- isFile path'
if isF
then do
liftIO $ IO.withFile path' IO.ReadMode $ \h -> do
m <- decode <$> (B.hGet h . fromInteger =<< IO.hFileSize h)
m `seq` return (Just m)
... | 455 | false | true | 0 | 20 | 159 | 196 | 93 | 103 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.