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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
isomorphism/csound-expression | examples/Tibetan.hs | bsd-3-clause | rises = repeat | 16 | rises = repeat | 16 | rises = repeat | 16 | false | false | 0 | 4 | 4 | 6 | 3 | 3 | null | null |
nshepperd/funn | AI/Funn/Diff/RNN.hs | mit | mapDiff :: forall m i o. (Monad m) => Diff m i o -> Diff m (Vector i) (Vector o)
mapDiff layer = Diff run
where run inputs = do oks <- traverse (runDiff layer) inputs
let
(os, ks) = V.unzip oks
back dos = traverse go_backward (V.zip dos ks)
... | 399 | mapDiff :: forall m i o. (Monad m) => Diff m i o -> Diff m (Vector i) (Vector o)
mapDiff layer = Diff run
where run inputs = do oks <- traverse (runDiff layer) inputs
let
(os, ks) = V.unzip oks
back dos = traverse go_backward (V.zip dos ks)
... | 399 | mapDiff layer = Diff run
where run inputs = do oks <- traverse (runDiff layer) inputs
let
(os, ks) = V.unzip oks
back dos = traverse go_backward (V.zip dos ks)
return (os, back)
go_backward (dout, k) = k dout | 318 | false | true | 1 | 14 | 168 | 164 | 81 | 83 | null | null |
keithodulaigh/Hets | SoftFOL/ProveDarwin.hs | gpl-2.0 | darwinGUI
:: ProverBinary -- ^ the actual binary
-> String -- ^ theory name
-> Theory Sign Sentence ProofTree
-- ^ theory consisting of a signature and sentences
-> [FreeDefMorphism SPTerm SoftFOLMorphism] -- ^ freeness constraints
-> IO [ProofStatus ProofTree] -- ^ proof status for each goal
darwinGUI b th... | 448 | darwinGUI
:: ProverBinary -- ^ the actual binary
-> String -- ^ theory name
-> Theory Sign Sentence ProofTree
-- ^ theory consisting of a signature and sentences
-> [FreeDefMorphism SPTerm SoftFOLMorphism] -- ^ freeness constraints
-> IO [ProofStatus ProofTree]
darwinGUI b thName th freedefs =
genericAT... | 416 | darwinGUI b thName th freedefs =
genericATPgui (atpFun b thName) True (proverBinary b) thName th
freedefs emptyProofTree | 142 | true | true | 0 | 12 | 97 | 98 | 49 | 49 | null | null |
peti/funcmp | FMP/Term.hs | gpl-3.0 | max' [a] = a | 34 | max' [a] = a | 34 | max' [a] = a | 34 | false | false | 0 | 5 | 25 | 13 | 6 | 7 | null | null |
rueshyna/gogol | gogol-dataproc/gen/Network/Google/Dataproc/Types/Product.hs | mpl-2.0 | -- | [Optional] The HTTP URL of the ApplicationMaster, HistoryServer, or
-- TimelineServer that provides application-specific information. The URL
-- uses the internal hostname, and requires a proxy server for resolution
-- and, possibly, access.
yaTrackingURL :: Lens' YarnApplication (Maybe Text)
yaTrackingURL
= len... | 375 | yaTrackingURL :: Lens' YarnApplication (Maybe Text)
yaTrackingURL
= lens _yaTrackingURL
(\ s a -> s{_yaTrackingURL = a}) | 128 | yaTrackingURL
= lens _yaTrackingURL
(\ s a -> s{_yaTrackingURL = a}) | 76 | true | true | 0 | 9 | 59 | 51 | 28 | 23 | null | null |
juanpaucar/hadron | src/Hadron/Run/FanOut.hs | bsd-3-clause | sinkFanOut :: FanOutSink
sinkFanOut dispatch conv fo = C.foldM go 0
where
go !i a = do
bs <- conv a
liftIO (fanWrite fo (dispatch a) bs)
return $! i + 1
-------------------------------------------------------------------------------
-- | A fanout that keeps only a single file o... | 437 | sinkFanOut :: FanOutSink
sinkFanOut dispatch conv fo = C.foldM go 0
where
go !i a = do
bs <- conv a
liftIO (fanWrite fo (dispatch a) bs)
return $! i + 1
-------------------------------------------------------------------------------
-- | A fanout that keeps only a single file o... | 437 | sinkFanOut dispatch conv fo = C.foldM go 0
where
go !i a = do
bs <- conv a
liftIO (fanWrite fo (dispatch a) bs)
return $! i + 1
-------------------------------------------------------------------------------
-- | A fanout that keeps only a single file open at a time. Each time
... | 412 | false | true | 0 | 13 | 106 | 85 | 41 | 44 | null | null |
geocurnoff/nikki | src/Physics/Chipmunk/ContactRef.hs | lgpl-3.0 | -mkBegin Semipermeable = Just $ do
(_, movingShape) <- shapes
velocity@(Vector x y) <- io $ get $ velocity $ body movingShape
return $ (y >= 0)-}
mkBegin _ = Nothing
| 178 | mkBegin _ = Nothing | 19 | mkBegin _ = Nothing | 19 | true | false | 3 | 11 | 43 | 88 | 43 | 45 | null | null |
amccausl/Swish | Swish/HaskellUtils/ParseTest.hs | lgpl-2.1 | testParseOpt1 = testParser "parseOpt1" parseOptParser "###" [([],"###")] | 72 | testParseOpt1 = testParser "parseOpt1" parseOptParser "###" [([],"###")] | 72 | testParseOpt1 = testParser "parseOpt1" parseOptParser "###" [([],"###")] | 72 | false | false | 0 | 8 | 6 | 26 | 14 | 12 | null | null |
jqpeterson/roc-translator | src/Protocol/ROC/PointTypes.hs | bsd-3-clause | pt13 :: PointTypes ()
pt13 = PTID13 $ Left () | 45 | pt13 :: PointTypes ()
pt13 = PTID13 $ Left () | 45 | pt13 = PTID13 $ Left () | 23 | false | true | 2 | 7 | 9 | 32 | 13 | 19 | null | null |
dysinger/amazonka | amazonka-ec2/gen/Network/AWS/EC2/ImportInstance.hs | mpl-2.0 | iiLaunchSpecification :: Lens' ImportInstance (Maybe ImportInstanceLaunchSpecification)
iiLaunchSpecification =
lens _iiLaunchSpecification (\s a -> s { _iiLaunchSpecification = a }) | 186 | iiLaunchSpecification :: Lens' ImportInstance (Maybe ImportInstanceLaunchSpecification)
iiLaunchSpecification =
lens _iiLaunchSpecification (\s a -> s { _iiLaunchSpecification = a }) | 186 | iiLaunchSpecification =
lens _iiLaunchSpecification (\s a -> s { _iiLaunchSpecification = a }) | 98 | false | true | 0 | 9 | 22 | 45 | 24 | 21 | null | null |
ajtulloch/hopfield-networks | MachineLearning/Hopfield.hs | mit | update :: MonadRandom m => HopfieldNet -> m HopfieldNet
update n = liftM (update' n) $ getRandomR (0, (dim . state) n - 1) | 123 | update :: MonadRandom m => HopfieldNet -> m HopfieldNet
update n = liftM (update' n) $ getRandomR (0, (dim . state) n - 1) | 123 | update n = liftM (update' n) $ getRandomR (0, (dim . state) n - 1) | 67 | false | true | 2 | 10 | 24 | 69 | 32 | 37 | null | null |
Super-Fluid/heqet | Heqet/Output/Templates.hs | gpl-3.0 | errorRedNotehead :: String
errorRedNotehead = [r| \tweak #'font-size #8 \tweak #'color #red |] | 95 | errorRedNotehead :: String
errorRedNotehead = [r| \tweak #'font-size #8 \tweak #'color #red |] | 95 | errorRedNotehead = [r| \tweak #'font-size #8 \tweak #'color #red |] | 68 | false | true | 0 | 4 | 13 | 15 | 10 | 5 | null | null |
rahulmutt/ghcvm | compiler/Eta/Rename/RnTypes.hs | bsd-3-clause | rnHsTyKi isType doc listTy@(HsListTy ty)
= do { data_kinds <- xoptM LangExt.DataKinds
; unless (data_kinds || isType) (addErr (dataKindsErr isType listTy))
; (ty', fvs) <- rnLHsTyKi isType doc ty
; return (HsListTy ty', fvs) } | 249 | rnHsTyKi isType doc listTy@(HsListTy ty)
= do { data_kinds <- xoptM LangExt.DataKinds
; unless (data_kinds || isType) (addErr (dataKindsErr isType listTy))
; (ty', fvs) <- rnLHsTyKi isType doc ty
; return (HsListTy ty', fvs) } | 249 | rnHsTyKi isType doc listTy@(HsListTy ty)
= do { data_kinds <- xoptM LangExt.DataKinds
; unless (data_kinds || isType) (addErr (dataKindsErr isType listTy))
; (ty', fvs) <- rnLHsTyKi isType doc ty
; return (HsListTy ty', fvs) } | 249 | false | false | 1 | 12 | 57 | 111 | 52 | 59 | null | null |
facebookincubator/duckling | Duckling/TimeGrain/Types.hs | bsd-3-clause | add utcTime Week n = updateUTCDay utcTime . Time.addDays $ 7 * n | 64 | add utcTime Week n = updateUTCDay utcTime . Time.addDays $ 7 * n | 64 | add utcTime Week n = updateUTCDay utcTime . Time.addDays $ 7 * n | 64 | false | false | 0 | 8 | 12 | 30 | 14 | 16 | null | null |
kejace/ethereum-client-haskell | src/Blockchain/Data/Wire.hs | bsd-3-clause | wireMessage2Obj (Disconnect reason) = (0x0, RLPArray [rlpEncode $ terminationReasonToNumber reason]) | 100 | wireMessage2Obj (Disconnect reason) = (0x0, RLPArray [rlpEncode $ terminationReasonToNumber reason]) | 100 | wireMessage2Obj (Disconnect reason) = (0x0, RLPArray [rlpEncode $ terminationReasonToNumber reason]) | 100 | false | false | 0 | 9 | 9 | 34 | 17 | 17 | null | null |
brodyberg/Notes | ProjectRosalind.hsproj/LearnHaskell/lib/HaskellBook/YesMonomorphism.hs | mit | exampleYes = 1 | 14 | exampleYes = 1 | 14 | exampleYes = 1 | 14 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
pparkkin/eta | compiler/ETA/Main/DynFlags.hs | bsd-3-clause | setWarnUnsafe :: Bool -> DynP ()
setWarnUnsafe True = getCurLoc >>= \l -> upd (\d -> d { warnUnsafeOnLoc = l }) | 112 | setWarnUnsafe :: Bool -> DynP ()
setWarnUnsafe True = getCurLoc >>= \l -> upd (\d -> d { warnUnsafeOnLoc = l }) | 112 | setWarnUnsafe True = getCurLoc >>= \l -> upd (\d -> d { warnUnsafeOnLoc = l }) | 79 | false | true | 0 | 11 | 22 | 55 | 28 | 27 | null | null |
yesodweb/persistent | persistent/Database/Persist/Sql/Orphan/PersistQuery.hs | mit | updateWhereCount :: (PersistEntity val, MonadIO m, SqlBackend ~ PersistEntityBackend val, BackendCompatible SqlBackend backend)
=> [Filter val]
-> [Update val]
-> ReaderT backend m Int64
updateWhereCount _ [] = return 0 | 270 | updateWhereCount :: (PersistEntity val, MonadIO m, SqlBackend ~ PersistEntityBackend val, BackendCompatible SqlBackend backend)
=> [Filter val]
-> [Update val]
-> ReaderT backend m Int64
updateWhereCount _ [] = return 0 | 270 | updateWhereCount _ [] = return 0 | 32 | false | true | 0 | 9 | 80 | 82 | 40 | 42 | null | null |
bergey/plots | src/Plots/Types/Others.hs | bsd-3-clause | linerangevPlotwithPoint :: (Typeable b, Renderable (Path V2 Double) b,
MonadState (Axis b c Double) m, BaseSpace c ~ V2) =>
(Double, Double) -> Double -> m ()
linerangevPlotwithPoint a s = do
linePlot' (createlinerangev a s) $ do
plotColor .= purple
... | 605 | linerangevPlotwithPoint :: (Typeable b, Renderable (Path V2 Double) b,
MonadState (Axis b c Double) m, BaseSpace c ~ V2) =>
(Double, Double) -> Double -> m ()
linerangevPlotwithPoint a s = do
linePlot' (createlinerangev a s) $ do
plotColor .= purple
... | 605 | linerangevPlotwithPoint a s = do
linePlot' (createlinerangev a s) $ do
plotColor .= purple
addLegendEntry "data 1"
scatterPlot' [a] $ do
plotColor .= purple
plotMarker %= scale 2
------------------------------------------------------------------------
-- Linerange Horizontal
-... | 391 | false | true | 0 | 11 | 157 | 153 | 74 | 79 | null | null |
kovach/web | res1/Parser.hs | gpl-2.0 | -- TODO move this?
ref_ = R <$> (char '#' *> int_) | 50 | ref_ = R <$> (char '#' *> int_) | 31 | ref_ = R <$> (char '#' *> int_) | 31 | true | false | 3 | 8 | 11 | 26 | 11 | 15 | null | null |
Lainepress/hledger | hledger-lib/Hledger/Data/Amount.hs | gpl-3.0 | showPrice (TotalPrice pa) = " @@ " ++ showMixedAmount pa | 56 | showPrice (TotalPrice pa) = " @@ " ++ showMixedAmount pa | 56 | showPrice (TotalPrice pa) = " @@ " ++ showMixedAmount pa | 56 | false | false | 0 | 7 | 9 | 22 | 10 | 12 | null | null |
spockwangs/scheme.in.haskell | list6.3.hs | unlicense | parseExpr :: Parser LispVal
parseExpr = parseAtom
<|> parseString -- begin with "
<|> do char '#'
parseBool <|> parseNumber <|> parseCharacter <|> parseArray
<|> parseDecNumber -- begin with a digit
<|> parseQuoted -- begin with '
<|> p... | 494 | parseExpr :: Parser LispVal
parseExpr = parseAtom
<|> parseString -- begin with "
<|> do char '#'
parseBool <|> parseNumber <|> parseCharacter <|> parseArray
<|> parseDecNumber -- begin with a digit
<|> parseQuoted -- begin with '
<|> p... | 494 | parseExpr = parseAtom
<|> parseString -- begin with "
<|> do char '#'
parseBool <|> parseNumber <|> parseCharacter <|> parseArray
<|> parseDecNumber -- begin with a digit
<|> parseQuoted -- begin with '
<|> parseBackquoted -- begin with... | 466 | false | true | 0 | 14 | 209 | 98 | 46 | 52 | null | null |
kawu/dawg-ord | tests/Ord.hs | bsd-2-clause | tests :: TestTree
tests = testGroup "Tests" [properties, unitTests] | 67 | tests :: TestTree
tests = testGroup "Tests" [properties, unitTests] | 67 | tests = testGroup "Tests" [properties, unitTests] | 49 | false | true | 0 | 6 | 8 | 22 | 12 | 10 | null | null |
rCEx/feldspar-lang-small | src/Feldspar/Core/Frontend/Complex.hs | bsd-3-clause | mkPolar :: (Numeric a, RealFloat a) => Data a -> Data a -> Data (Complex a)
mkPolar = sugarSymF MkPolar | 103 | mkPolar :: (Numeric a, RealFloat a) => Data a -> Data a -> Data (Complex a)
mkPolar = sugarSymF MkPolar | 103 | mkPolar = sugarSymF MkPolar | 27 | false | true | 0 | 10 | 19 | 52 | 25 | 27 | null | null |
input-output-hk/pos-haskell-prototype | lib/src/Pos/Worker/Ssc.hs | mit | checkNSendOurCert
:: forall ctx m.
SscMode ctx m
=> Genesis.Config
-> (VssCertificate -> m ())
-> m ()
checkNSendOurCert genesisConfig sendCert = do
ourId <- getOurStakeholderId
let sendCertDo resend slot = do
if resend then
logErrorS "Our VSS certificate is in... | 2,351 | checkNSendOurCert
:: forall ctx m.
SscMode ctx m
=> Genesis.Config
-> (VssCertificate -> m ())
-> m ()
checkNSendOurCert genesisConfig sendCert = do
ourId <- getOurStakeholderId
let sendCertDo resend slot = do
if resend then
logErrorS "Our VSS certificate is in... | 2,351 | checkNSendOurCert genesisConfig sendCert = do
ourId <- getOurStakeholderId
let sendCertDo resend slot = do
if resend then
logErrorS "Our VSS certificate is in global state, but it has already expired, \
\apparently it's a bug, but we are announcing it just in... | 2,225 | false | true | 0 | 22 | 834 | 443 | 198 | 245 | null | null |
lawrencelomax/ResultWorthy | ResultWorthy/Runner.hs | bsd-3-clause | -- Make the String Output
processOutput :: SwiftModule -> Mode -> String
processOutput mod Tree = show mod | 108 | processOutput :: SwiftModule -> Mode -> String
processOutput mod Tree = show mod | 82 | processOutput mod Tree = show mod | 35 | true | true | 0 | 6 | 19 | 28 | 14 | 14 | null | null |
hbrouwer/pdrt-sandbox | src/Data/PDRS/Translate.hs | apache-2.0 | ---------------------------------------------------------------------------
-- | Translates a PDRS into a DRS.
---------------------------------------------------------------------------
pdrsToDRS :: PDRS -> D.DRS
pdrsToDRS p = stripPVars $ movePContent gp (emptyPDRS gp) gp
where gp = pdrsPurify (pdrsResolveMerges p)... | 752 | pdrsToDRS :: PDRS -> D.DRS
pdrsToDRS p = stripPVars $ movePContent gp (emptyPDRS gp) gp
where gp = pdrsPurify (pdrsResolveMerges p)
---------------------------------------------------------------------------
-- * Private
---------------------------------------------------------------------------
-------------------... | 565 | pdrsToDRS p = stripPVars $ movePContent gp (emptyPDRS gp) gp
where gp = pdrsPurify (pdrsResolveMerges p)
---------------------------------------------------------------------------
-- * Private
---------------------------------------------------------------------------
----------------------------------------------... | 538 | true | true | 0 | 8 | 61 | 64 | 36 | 28 | null | null |
visood/bioalgo | test/Test/Examples/Prices.hs | bsd-3-clause | hourlyPrices :: [(LocalTime,Double,Double)]
hourlyPrices = [ (mkDateTime dd mm yyyy hh 00, p1, p2)
| (dd,mm,yyyy,hh,p1,p2) <- rawHourly ] | 152 | hourlyPrices :: [(LocalTime,Double,Double)]
hourlyPrices = [ (mkDateTime dd mm yyyy hh 00, p1, p2)
| (dd,mm,yyyy,hh,p1,p2) <- rawHourly ] | 152 | hourlyPrices = [ (mkDateTime dd mm yyyy hh 00, p1, p2)
| (dd,mm,yyyy,hh,p1,p2) <- rawHourly ] | 108 | false | true | 0 | 8 | 33 | 72 | 43 | 29 | null | null |
arekfu/markov-chains | test/MCTest.hs | mit | runTests :: IO Bool
runTests = $quickCheckAll | 45 | runTests :: IO Bool
runTests = $quickCheckAll | 45 | runTests = $quickCheckAll | 25 | false | true | 0 | 6 | 6 | 21 | 8 | 13 | null | null |
joshcough/Scrabble | src/Scrabble/Tile.hs | mit | tilesFromJSON ::
String -- ^ type
-> (String -> String) -- ^ err message function
-> ([Tile] -> a) -- ^ constructor
-> Value -- ^ json value to parse
-> Parser a
tilesFromJSON typ errMsg cons =
withText typ $ \t -> let s = unpack t in
maybe (fail $ errMsg s)
(r... | 375 | tilesFromJSON ::
String -- ^ type
-> (String -> String) -- ^ err message function
-> ([Tile] -> a) -- ^ constructor
-> Value -- ^ json value to parse
-> Parser a
tilesFromJSON typ errMsg cons =
withText typ $ \t -> let s = unpack t in
maybe (fail $ errMsg s)
(r... | 375 | tilesFromJSON typ errMsg cons =
withText typ $ \t -> let s = unpack t in
maybe (fail $ errMsg s)
(return . cons)
(sequence $ tileFromChar <$> s) | 170 | false | true | 0 | 12 | 130 | 120 | 62 | 58 | null | null |
brendanhay/gogol | gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Insert.hs | mpl-2.0 | -- | The *part* parameter serves two purposes in this operation. It
-- identifies the properties that the write operation will set as well as
-- the properties that the API response will include. The part properties
-- that you can include in the parameter value are id, snippet,
-- contentDetails, and status.
lbiPart :... | 418 | lbiPart :: Lens' LiveBroadcastsInsert [Text]
lbiPart
= lens _lbiPart (\ s a -> s{_lbiPart = a}) . _Coerce | 107 | lbiPart
= lens _lbiPart (\ s a -> s{_lbiPart = a}) . _Coerce | 62 | true | true | 0 | 10 | 72 | 53 | 30 | 23 | null | null |
wavewave/hoodle-types | src/Data/Hoodle/BBox.hs | bsd-2-clause | mkbbox :: [Pair Double Double] -> BBox
mkbbox lst = let xs = map fst lst
ys = map snd lst
in BBox { bbox_upperleft = (minimum xs, minimum ys)
, bbox_lowerright = (maximum xs, maximum ys) } | 243 | mkbbox :: [Pair Double Double] -> BBox
mkbbox lst = let xs = map fst lst
ys = map snd lst
in BBox { bbox_upperleft = (minimum xs, minimum ys)
, bbox_lowerright = (maximum xs, maximum ys) } | 242 | mkbbox lst = let xs = map fst lst
ys = map snd lst
in BBox { bbox_upperleft = (minimum xs, minimum ys)
, bbox_lowerright = (maximum xs, maximum ys) } | 203 | false | true | 0 | 10 | 92 | 90 | 46 | 44 | null | null |
Zigazou/containers | Data/Sequence.hs | bsd-3-clause | -- | /O(1)/. Add an element to the left end of a sequence.
-- Mnemonic: a triangle with the single element at the pointy end.
(<|) :: a -> Seq a -> Seq a
x <| Seq xs = Seq (Elem x `consTree` xs) | 210 | (<|) :: a -> Seq a -> Seq a
x <| Seq xs = Seq (Elem x `consTree` xs) | 84 | x <| Seq xs = Seq (Elem x `consTree` xs) | 45 | true | true | 0 | 9 | 59 | 53 | 27 | 26 | null | null |
Proclivis/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxFONTENCODING_KOI8 :: Int
wxFONTENCODING_KOI8 = 17 | 51 | wxFONTENCODING_KOI8 :: Int
wxFONTENCODING_KOI8 = 17 | 51 | wxFONTENCODING_KOI8 = 17 | 24 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
ingemaradahl/bilder | src/Compiler/Utils.hs | lgpl-3.0 | foldExpM f p e@(EAssAdd el _ er) = foldM (foldExpM f) p [el,er] >>= flip f e | 76 | foldExpM f p e@(EAssAdd el _ er) = foldM (foldExpM f) p [el,er] >>= flip f e | 76 | foldExpM f p e@(EAssAdd el _ er) = foldM (foldExpM f) p [el,er] >>= flip f e | 76 | false | false | 0 | 8 | 16 | 54 | 27 | 27 | null | null |
facebookincubator/duckling | Duckling/Numeral/MN/Rules.hs | bsd-3-clause | -- TODO: Single-word composition (#110)
ruleInteger2 :: Rule
ruleInteger2 = Rule
{ name = "integer (20..90)"
, pattern =
[ regex "(хорь|гуч|дөч|тавь|жар|дал|ная|ер)"
]
, prod = \tokens -> case tokens of
(Token RegexMatch (GroupMatch (match:_)):_) ->
HashMap.lookup (Text.toLower match) tensMa... | 356 | ruleInteger2 :: Rule
ruleInteger2 = Rule
{ name = "integer (20..90)"
, pattern =
[ regex "(хорь|гуч|дөч|тавь|жар|дал|ная|ер)"
]
, prod = \tokens -> case tokens of
(Token RegexMatch (GroupMatch (match:_)):_) ->
HashMap.lookup (Text.toLower match) tensMap >>= integer
_ -> Nothing
} | 316 | ruleInteger2 = Rule
{ name = "integer (20..90)"
, pattern =
[ regex "(хорь|гуч|дөч|тавь|жар|дал|ная|ер)"
]
, prod = \tokens -> case tokens of
(Token RegexMatch (GroupMatch (match:_)):_) ->
HashMap.lookup (Text.toLower match) tensMap >>= integer
_ -> Nothing
} | 295 | true | true | 0 | 18 | 81 | 107 | 57 | 50 | null | null |
oshyshko/adventofcode | src/Y15/D21.hs | bsd-3-clause | solve2 :: String -> Int
solve2 s =
let boss = parseOrDie character s
in loadouts shopItems
& fmap loadout2stat
& filter (\Stat{statDamage,statArmor} -> not $ playerDefeatsBoss (Character playerBaseHp statDamage statArmor) boss)
& fmap statCost
& maximum | 293 | solve2 :: String -> Int
solve2 s =
let boss = parseOrDie character s
in loadouts shopItems
& fmap loadout2stat
& filter (\Stat{statDamage,statArmor} -> not $ playerDefeatsBoss (Character playerBaseHp statDamage statArmor) boss)
& fmap statCost
& maximum | 293 | solve2 s =
let boss = parseOrDie character s
in loadouts shopItems
& fmap loadout2stat
& filter (\Stat{statDamage,statArmor} -> not $ playerDefeatsBoss (Character playerBaseHp statDamage statArmor) boss)
& fmap statCost
& maximum | 269 | false | true | 0 | 16 | 76 | 98 | 47 | 51 | null | null |
sergv/tags-server | src/Haskell/Language/Lexer/Preprocessor.hs | bsd-3-clause | isCPPIdentifierChar :: Char -> Bool
isCPPIdentifierChar c = isLeadingCPPIdentifierChar c || isDigit c | 101 | isCPPIdentifierChar :: Char -> Bool
isCPPIdentifierChar c = isLeadingCPPIdentifierChar c || isDigit c | 101 | isCPPIdentifierChar c = isLeadingCPPIdentifierChar c || isDigit c | 65 | false | true | 0 | 7 | 12 | 33 | 14 | 19 | null | null |
hirokai/PaperServer | Parser/Publisher/NatureL.hs | bsd-2-clause | _mainHtml _ cursor = fmap FlatHtml $ render $ map subLink $ nofignav $ extractMainL $ map node $ (cursor $// element "section") | 127 | _mainHtml _ cursor = fmap FlatHtml $ render $ map subLink $ nofignav $ extractMainL $ map node $ (cursor $// element "section") | 127 | _mainHtml _ cursor = fmap FlatHtml $ render $ map subLink $ nofignav $ extractMainL $ map node $ (cursor $// element "section") | 127 | false | false | 1 | 11 | 22 | 55 | 25 | 30 | null | null |
kosmoskatten/traffic-analysis | src/Network/Traffic/Object/Enumerator.hs | mit | enumerateBy ClientApp = enumerateByField clientApp | 50 | enumerateBy ClientApp = enumerateByField clientApp | 50 | enumerateBy ClientApp = enumerateByField clientApp | 50 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
alexander-at-github/eta | compiler/ETA/Types/TyCon.hs | bsd-3-clause | isProductTyCon (TupleTyCon {}) = True | 38 | isProductTyCon (TupleTyCon {}) = True | 38 | isProductTyCon (TupleTyCon {}) = True | 38 | false | false | 0 | 7 | 5 | 16 | 8 | 8 | null | null |
emmanueltouzery/cigale-timesheet | src/EventProviders/Email.hs | mit | qpEltToString encoding (NonAsciiChars chrInt) = iconvFuzzyText encoding (BSL.pack chrInt) | 89 | qpEltToString encoding (NonAsciiChars chrInt) = iconvFuzzyText encoding (BSL.pack chrInt) | 89 | qpEltToString encoding (NonAsciiChars chrInt) = iconvFuzzyText encoding (BSL.pack chrInt) | 89 | false | false | 0 | 8 | 8 | 32 | 14 | 18 | null | null |
sinelaw/buildsome | src/BMake/Base.hs | gpl-2.0 | -- | Traversal of direct children of statement
substmts ::
Applicative f =>
([Statement] -> f [Statement]) ->
Statement -> f (Statement)
substmts f (Local dl) = Local <$> f dl | 187 | substmts ::
Applicative f =>
([Statement] -> f [Statement]) ->
Statement -> f (Statement)
substmts f (Local dl) = Local <$> f dl | 140 | substmts f (Local dl) = Local <$> f dl | 38 | true | true | 0 | 11 | 42 | 71 | 35 | 36 | null | null |
facebookincubator/duckling | Duckling/Numeral/TE/Rules.hs | bsd-3-clause | hundredsMap :: HashMap Text Integer
hundredsMap = HashMap.fromList
[ ( "వంద", 100 )
, ( "వెయ్యి", 1000 )
, ( "లక్ష", 100000 )
, ( "కోటి", 10000000 )
] | 160 | hundredsMap :: HashMap Text Integer
hundredsMap = HashMap.fromList
[ ( "వంద", 100 )
, ( "వెయ్యి", 1000 )
, ( "లక్ష", 100000 )
, ( "కోటి", 10000000 )
] | 160 | hundredsMap = HashMap.fromList
[ ( "వంద", 100 )
, ( "వెయ్యి", 1000 )
, ( "లక్ష", 100000 )
, ( "కోటి", 10000000 )
] | 124 | false | true | 1 | 6 | 38 | 60 | 34 | 26 | null | null |
Paow/encore | src/ir/AST/PrettyPrinter.hs | bsd-3-clause | ppExpr Get {val} = "get" <> parens (ppExpr val) | 47 | ppExpr Get {val} = "get" <> parens (ppExpr val) | 47 | ppExpr Get {val} = "get" <> parens (ppExpr val) | 47 | false | false | 1 | 8 | 8 | 33 | 14 | 19 | null | null |
urbanslug/ghc | compiler/main/DynFlags.hs | bsd-3-clause | exposePackageKey p =
upd (\s -> s{ packageFlags =
parsePackageFlag PackageKeyArg p : packageFlags s }) | 108 | exposePackageKey p =
upd (\s -> s{ packageFlags =
parsePackageFlag PackageKeyArg p : packageFlags s }) | 108 | exposePackageKey p =
upd (\s -> s{ packageFlags =
parsePackageFlag PackageKeyArg p : packageFlags s }) | 108 | false | false | 1 | 11 | 21 | 44 | 20 | 24 | null | null |
Tener/personal-library-yesod | Model.hs | bsd-2-clause | showAssetKind AssetMusic = "music" | 34 | showAssetKind AssetMusic = "music" | 34 | showAssetKind AssetMusic = "music" | 34 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
plclub/cis670-16fa | projects/DynamicLang/src/PrettyPrint.hs | mit | intBoolTextOp Lt = text "<" | 28 | intBoolTextOp Lt = text "<" | 28 | intBoolTextOp Lt = text "<" | 28 | false | false | 0 | 5 | 5 | 12 | 5 | 7 | null | null |
dorchard/gram_lang | frontend/src/Language/Granule/Checker/Kinds.hs | bsd-3-clause | joinKind k (KUnion k1 k2) = joinKind (KUnion k1 k2) k | 53 | joinKind k (KUnion k1 k2) = joinKind (KUnion k1 k2) k | 53 | joinKind k (KUnion k1 k2) = joinKind (KUnion k1 k2) k | 53 | false | false | 0 | 7 | 10 | 32 | 15 | 17 | null | null |
aloiscochard/sarsi | src/Sarsi/Tools/Trace.hs | apache-2.0 | traceHS :: Handle -> IO ()
traceHS = traceParser GHC.messageParser | 66 | traceHS :: Handle -> IO ()
traceHS = traceParser GHC.messageParser | 66 | traceHS = traceParser GHC.messageParser | 39 | false | true | 0 | 8 | 9 | 30 | 13 | 17 | null | null |
jspahrsummers/network | tests/Simple.hs | bsd-3-clause | basicTests :: Test
basicTests = testGroup "Basic socket operations"
[
-- Sending and receiving
testCase "testSend" testSend
, testCase "testSendAll" testSendAll
, testCase "testSendTo" testSendTo
, testCase "testSendAllTo" testSendAllTo
, testCase "testSendMany" testSendMany
, testCa... | 548 | basicTests :: Test
basicTests = testGroup "Basic socket operations"
[
-- Sending and receiving
testCase "testSend" testSend
, testCase "testSendAll" testSendAll
, testCase "testSendTo" testSendTo
, testCase "testSendAllTo" testSendAllTo
, testCase "testSendMany" testSendMany
, testCa... | 548 | basicTests = testGroup "Basic socket operations"
[
-- Sending and receiving
testCase "testSend" testSend
, testCase "testSendAll" testSendAll
, testCase "testSendTo" testSendTo
, testCase "testSendAllTo" testSendAllTo
, testCase "testSendMany" testSendMany
, testCase "testSendManyTo"... | 529 | false | true | 0 | 7 | 109 | 97 | 49 | 48 | null | null |
corngood/cabal | Cabal/Distribution/Simple/Utils.hs | bsd-3-clause | setupMessage :: Verbosity -> String -> PackageIdentifier -> IO ()
setupMessage verbosity msg pkgid =
notice verbosity (msg ++ ' ': display pkgid ++ "...") | 158 | setupMessage :: Verbosity -> String -> PackageIdentifier -> IO ()
setupMessage verbosity msg pkgid =
notice verbosity (msg ++ ' ': display pkgid ++ "...") | 158 | setupMessage verbosity msg pkgid =
notice verbosity (msg ++ ' ': display pkgid ++ "...") | 92 | false | true | 0 | 9 | 28 | 58 | 28 | 30 | null | null |
mstksg/tensor-ops | src/TensorOps/BLAS.hs | bsd-3-clause | bgenRows
:: (BLAS b, SingI n)
=> (IndexN k n -> b ('BV m))
-> b ('BM n m)
bgenRows f = getI $ bgenRowsA (I . f) | 123 | bgenRows
:: (BLAS b, SingI n)
=> (IndexN k n -> b ('BV m))
-> b ('BM n m)
bgenRows f = getI $ bgenRowsA (I . f) | 123 | bgenRows f = getI $ bgenRowsA (I . f) | 37 | false | true | 2 | 13 | 39 | 88 | 42 | 46 | null | null |
ganeti-github-testing/ganeti-test-1 | src/Ganeti/OpParams.hs | bsd-2-clause | pRebootType :: Field
pRebootType =
withDoc "How to reboot the instance" $
simpleField "reboot_type" [t| RebootType |] | 121 | pRebootType :: Field
pRebootType =
withDoc "How to reboot the instance" $
simpleField "reboot_type" [t| RebootType |] | 121 | pRebootType =
withDoc "How to reboot the instance" $
simpleField "reboot_type" [t| RebootType |] | 100 | false | true | 0 | 6 | 20 | 34 | 16 | 18 | null | null |
green-haskell/ghc | compiler/simplCore/SimplUtils.hs | bsd-3-clause | countValArgs :: SimplCont -> Int
-- Count value arguments excluding coercions
countValArgs (ApplyToVal { sc_arg = arg, sc_cont = cont })
| Coercion {} <- arg = countValArgs cont
| otherwise = 1 + countValArgs cont | 226 | countValArgs :: SimplCont -> Int
countValArgs (ApplyToVal { sc_arg = arg, sc_cont = cont })
| Coercion {} <- arg = countValArgs cont
| otherwise = 1 + countValArgs cont | 181 | countValArgs (ApplyToVal { sc_arg = arg, sc_cont = cont })
| Coercion {} <- arg = countValArgs cont
| otherwise = 1 + countValArgs cont | 148 | true | true | 1 | 9 | 48 | 68 | 35 | 33 | null | null |
mudphone/HaskellBook | src/Five.hs | mit | f :: (a, b) -> (c, d) -> ((b, d), (a, c))
f x y =
(((snd x), (snd y)), ((fst x), (fst y))) | 92 | f :: (a, b) -> (c, d) -> ((b, d), (a, c))
f x y =
(((snd x), (snd y)), ((fst x), (fst y))) | 92 | f x y =
(((snd x), (snd y)), ((fst x), (fst y))) | 50 | false | true | 0 | 10 | 25 | 102 | 57 | 45 | null | null |
ecaustin/haskhol-math | src/HaskHOL/Lib/Arith.hs | bsd-2-clause | thmPRE_ELIM' :: ArithCtxt thry => HOL cls thry HOLThm
thmPRE_ELIM' = cacheProof "thmPRE_ELIM'" ctxtArith .
prove [txt| P(PRE n) <=> ?m. (n = SUC m \/ m = 0 /\ n = 0) /\ P m |] $
tacMP (primINST [([txt| P:num->bool |], [txt| \x:num. ~P x |])]
thmPRE_ELIM) `_THEN` tacMESON_NIL | 300 | thmPRE_ELIM' :: ArithCtxt thry => HOL cls thry HOLThm
thmPRE_ELIM' = cacheProof "thmPRE_ELIM'" ctxtArith .
prove [txt| P(PRE n) <=> ?m. (n = SUC m \/ m = 0 /\ n = 0) /\ P m |] $
tacMP (primINST [([txt| P:num->bool |], [txt| \x:num. ~P x |])]
thmPRE_ELIM) `_THEN` tacMESON_NIL | 300 | thmPRE_ELIM' = cacheProof "thmPRE_ELIM'" ctxtArith .
prove [txt| P(PRE n) <=> ?m. (n = SUC m \/ m = 0 /\ n = 0) /\ P m |] $
tacMP (primINST [([txt| P:num->bool |], [txt| \x:num. ~P x |])]
thmPRE_ELIM) `_THEN` tacMESON_NIL | 246 | false | true | 0 | 9 | 75 | 85 | 47 | 38 | null | null |
ian-ross/c2hs-macos-test | c2hs-0.26.1/src/C2HS/CHS.hs | mit | parseIsVariadic :: [CHSToken] -> CST s (Bool, [CHSToken])
parseIsVariadic (CHSTokVariadic _:toks) = return (True , toks) | 120 | parseIsVariadic :: [CHSToken] -> CST s (Bool, [CHSToken])
parseIsVariadic (CHSTokVariadic _:toks) = return (True , toks) | 120 | parseIsVariadic (CHSTokVariadic _:toks) = return (True , toks) | 62 | false | true | 0 | 8 | 15 | 54 | 29 | 25 | null | null |
gilith/opentheory | data/haskell/opentheory-divides/src/Test.hs | mit | proposition3 ::
Primitive.Natural.Natural -> Primitive.Natural.Natural -> Bool
proposition3 a b = Divides.divides (fst (Divides.egcd a b)) a | 142 | proposition3 ::
Primitive.Natural.Natural -> Primitive.Natural.Natural -> Bool
proposition3 a b = Divides.divides (fst (Divides.egcd a b)) a | 142 | proposition3 a b = Divides.divides (fst (Divides.egcd a b)) a | 61 | false | true | 0 | 10 | 18 | 53 | 27 | 26 | null | null |
senare/hell | gitall.hs | gpl-2.0 | pull = sh $ gitall "git pull --rebase" | 38 | pull = sh $ gitall "git pull --rebase" | 38 | pull = sh $ gitall "git pull --rebase" | 38 | false | false | 0 | 6 | 7 | 13 | 6 | 7 | null | null |
De-Narm/NGramPredict | main.hs | bsd-3-clause | write :: [[String]] -- ^ list of ["prob", "prediction", "bow"]
-> IO() -- ^ final console output
write [] = putStr "\n" | 132 | write :: [[String]] -- ^ list of ["prob", "prediction", "bow"]
-> IO()
write [] = putStr "\n" | 98 | write [] = putStr "\n" | 22 | true | true | 0 | 8 | 34 | 40 | 20 | 20 | null | null |
rueshyna/gogol | gogol-compute/gen/Network/Google/Compute/Types/Product.hs | mpl-2.0 | -- | [Output Only] A token used to continue a truncated list request.
rNextPageToken :: Lens' RegionAutoscalerList (Maybe Text)
rNextPageToken
= lens _rNextPageToken
(\ s a -> s{_rNextPageToken = a}) | 207 | rNextPageToken :: Lens' RegionAutoscalerList (Maybe Text)
rNextPageToken
= lens _rNextPageToken
(\ s a -> s{_rNextPageToken = a}) | 137 | rNextPageToken
= lens _rNextPageToken
(\ s a -> s{_rNextPageToken = a}) | 79 | true | true | 1 | 9 | 37 | 52 | 25 | 27 | null | null |
rvion/ride | jetpack/src/Data/List/NonEmpty/AsNe.hs | bsd-3-clause | -- ne_break :: forall a. (a -> Bool) -> NonEmpty a -> ([a], [a])
ne_break = I.break | 83 | ne_break = I.break | 18 | ne_break = I.break | 18 | true | false | 1 | 6 | 16 | 13 | 5 | 8 | null | null |
GU-CLASP/TypedFlow | TypedFlow/Abstract.hs | lgpl-3.0 | doExtractVars :: Gen a -> (a, GState, [VarInfo])
doExtractVars p = runRWS (extractVars p) () initialGstate | 106 | doExtractVars :: Gen a -> (a, GState, [VarInfo])
doExtractVars p = runRWS (extractVars p) () initialGstate | 106 | doExtractVars p = runRWS (extractVars p) () initialGstate | 57 | false | true | 0 | 7 | 15 | 48 | 25 | 23 | null | null |
gafiatulin/codewars | src/8 kyu/Supersize.hs | mit | superSize :: Integer -> Integer
superSize = read . sortBy (flip compare) . show | 79 | superSize :: Integer -> Integer
superSize = read . sortBy (flip compare) . show | 79 | superSize = read . sortBy (flip compare) . show | 47 | false | true | 0 | 9 | 13 | 32 | 16 | 16 | null | null |
mettekou/ghc | compiler/prelude/PrelInfo.hs | bsd-3-clause | isStandardClass clas = classKey clas `is_elem` standardClassKeys | 67 | isStandardClass clas = classKey clas `is_elem` standardClassKeys | 67 | isStandardClass clas = classKey clas `is_elem` standardClassKeys | 67 | false | false | 0 | 6 | 9 | 18 | 9 | 9 | null | null |
LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Common/ActorState.hs | bsd-3-clause | adjacentBigAssocs body s =
let lvl = (EM.! blid body) . sdungeon $ s
f !p = posToBigLvl p lvl
g !aid = (aid, getActorBody aid s)
in map g $ mapMaybe f $ vicinityUnsafe $ bpos body | 195 | adjacentBigAssocs body s =
let lvl = (EM.! blid body) . sdungeon $ s
f !p = posToBigLvl p lvl
g !aid = (aid, getActorBody aid s)
in map g $ mapMaybe f $ vicinityUnsafe $ bpos body | 195 | adjacentBigAssocs body s =
let lvl = (EM.! blid body) . sdungeon $ s
f !p = posToBigLvl p lvl
g !aid = (aid, getActorBody aid s)
in map g $ mapMaybe f $ vicinityUnsafe $ bpos body | 195 | false | false | 0 | 12 | 53 | 94 | 44 | 50 | null | null |
sonyandy/logicst | benchmarks/unify.hs | bsd-3-clause | zebraProblem h w z = do
(h #=) =<< fromList [house norwegian __ __ __ __, __, house __ __ __ milk __, __, __]
join $ member <$> house englishman __ __ __ red <*> pure h
join $ member <$> house spaniard dog __ __ __ <*> pure h
join $ member <$> house __ __ __ coffee green <*> pure h
join $ member <$> house ukr... | 1,061 | zebraProblem h w z = do
(h #=) =<< fromList [house norwegian __ __ __ __, __, house __ __ __ milk __, __, __]
join $ member <$> house englishman __ __ __ red <*> pure h
join $ member <$> house spaniard dog __ __ __ <*> pure h
join $ member <$> house __ __ __ coffee green <*> pure h
join $ member <$> house ukr... | 1,061 | zebraProblem h w z = do
(h #=) =<< fromList [house norwegian __ __ __ __, __, house __ __ __ milk __, __, __]
join $ member <$> house englishman __ __ __ red <*> pure h
join $ member <$> house spaniard dog __ __ __ <*> pure h
join $ member <$> house __ __ __ coffee green <*> pure h
join $ member <$> house ukr... | 1,061 | false | false | 0 | 11 | 266 | 542 | 249 | 293 | null | null |
badp/ganeti | src/Ganeti/Constants.hs | gpl-2.0 | hooksPath :: String
hooksPath = "/sbin:/bin:/usr/sbin:/usr/bin" | 63 | hooksPath :: String
hooksPath = "/sbin:/bin:/usr/sbin:/usr/bin" | 63 | hooksPath = "/sbin:/bin:/usr/sbin:/usr/bin" | 43 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
zepto-lang/zepto-js | src/Zepto/Types.hs | gpl-2.0 | toSimple :: LispVal -> Simple
toSimple (SimpleVal x) = x | 56 | toSimple :: LispVal -> Simple
toSimple (SimpleVal x) = x | 56 | toSimple (SimpleVal x) = x | 26 | false | true | 0 | 9 | 9 | 30 | 13 | 17 | null | null |
kairne/repa-lts | Data/Rope/Operators/Zipping.hs | bsd-3-clause | leftmostConsumed :: Rope b -> ZipCtxs a b c -> (Seq b, ZipCtxs a b c)
leftmostConsumed (Leaf xs) ctx = (xs, ctx) | 112 | leftmostConsumed :: Rope b -> ZipCtxs a b c -> (Seq b, ZipCtxs a b c)
leftmostConsumed (Leaf xs) ctx = (xs, ctx) | 112 | leftmostConsumed (Leaf xs) ctx = (xs, ctx) | 42 | false | true | 0 | 8 | 22 | 62 | 31 | 31 | null | null |
ghcjs/haddock-internal | vendor/attoparsec-0.10.4.0/Data/Attoparsec/ByteString/Char8.hs | bsd-2-clause | toLower :: Word8 -> Word8
toLower w | w >= 65 && w <= 90 = w + 32
| otherwise = w | 100 | toLower :: Word8 -> Word8
toLower w | w >= 65 && w <= 90 = w + 32
| otherwise = w | 100 | toLower w | w >= 65 && w <= 90 = w + 32
| otherwise = w | 74 | false | true | 1 | 10 | 41 | 53 | 24 | 29 | null | null |
ekmett/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_HPHP_OPERATOR :: Int
wxSTC_HPHP_OPERATOR = 127 | 52 | wxSTC_HPHP_OPERATOR :: Int
wxSTC_HPHP_OPERATOR = 127 | 52 | wxSTC_HPHP_OPERATOR = 127 | 25 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
cjack/Adt4c | dev/two34.hs | mit | foldr234 f0 f2 f3 f4 f2l f3l f4l (FourLeaf k1 v1 k2 v2 k3 v3) =
f4l k1 v1 k2 v2 k3 v3 | 89 | foldr234 f0 f2 f3 f4 f2l f3l f4l (FourLeaf k1 v1 k2 v2 k3 v3) =
f4l k1 v1 k2 v2 k3 v3 | 89 | foldr234 f0 f2 f3 f4 f2l f3l f4l (FourLeaf k1 v1 k2 v2 k3 v3) =
f4l k1 v1 k2 v2 k3 v3 | 89 | false | false | 0 | 7 | 26 | 60 | 25 | 35 | null | null |
graninas/Haskell-Algorithms | Tests/Lessons/ListMap.hs | gpl-3.0 | owerOfTwo'' = map (pow 2) l1
| 38 | powerOfTwo'' = map (pow 2) l1 | 38 | powerOfTwo'' = map (pow 2) l1 | 38 | false | false | 0 | 7 | 15 | 17 | 8 | 9 | null | null |
limaner2002/EPC-tools | USACScripts/src/Scripts/ViewFCCForm470.hs | bsd-3-clause | runViewForm470 :: Bounds -> HostUrl -> LogMode -> CsvPath -> RampupTime -> NThreads -> IO [Maybe (Either ServantError (Either ScriptError Value))]
runViewForm470 = runIt viewForm470 | 181 | runViewForm470 :: Bounds -> HostUrl -> LogMode -> CsvPath -> RampupTime -> NThreads -> IO [Maybe (Either ServantError (Either ScriptError Value))]
runViewForm470 = runIt viewForm470 | 181 | runViewForm470 = runIt viewForm470 | 34 | false | true | 0 | 18 | 24 | 69 | 32 | 37 | null | null |
kmate/raw-feldspar | src/Feldspar/Optimize.hs | bsd-3-clause | simplifyUp (RemP t a (LitP _ 1)) = LitP t 0 | 43 | simplifyUp (RemP t a (LitP _ 1)) = LitP t 0 | 43 | simplifyUp (RemP t a (LitP _ 1)) = LitP t 0 | 43 | false | false | 0 | 9 | 10 | 32 | 15 | 17 | null | null |
elegios/datalang | src/Inference.hs | mit | applyRestriction errF t@(IStruct ps) (IRestriction _ as k)
| not $ isNumKind k = do
mapM_ (attemptCompoundExpand errF) as
case k of
NoRestrKind -> return ()
StructKind ms ps' | isNothing ps' || length (fromJust ps') == length ps -> do
forM_ (M.toList ms) $ \(m, mt') -> case looku... | 586 | applyRestriction errF t@(IStruct ps) (IRestriction _ as k)
| not $ isNumKind k = do
mapM_ (attemptCompoundExpand errF) as
case k of
NoRestrKind -> return ()
StructKind ms ps' | isNothing ps' || length (fromJust ps') == length ps -> do
forM_ (M.toList ms) $ \(m, mt') -> case looku... | 586 | applyRestriction errF t@(IStruct ps) (IRestriction _ as k)
| not $ isNumKind k = do
mapM_ (attemptCompoundExpand errF) as
case k of
NoRestrKind -> return ()
StructKind ms ps' | isNothing ps' || length (fromJust ps') == length ps -> do
forM_ (M.toList ms) $ \(m, mt') -> case looku... | 586 | false | false | 1 | 22 | 179 | 259 | 120 | 139 | null | null |
rueshyna/gogol | gogol-games/gen/Network/Google/Games/Types/Product.hs | mpl-2.0 | -- | Uniquely identifies the type of this resource. Value is always the fixed
-- string games#eventBatchRecordFailure.
ebrfKind :: Lens' EventBatchRecordFailure Text
ebrfKind = lens _ebrfKind (\ s a -> s{_ebrfKind = a}) | 219 | ebrfKind :: Lens' EventBatchRecordFailure Text
ebrfKind = lens _ebrfKind (\ s a -> s{_ebrfKind = a}) | 100 | ebrfKind = lens _ebrfKind (\ s a -> s{_ebrfKind = a}) | 53 | true | true | 0 | 9 | 32 | 41 | 23 | 18 | null | null |
nevrenato/Hets_Fork | CASL/QuickCheck.hs | gpl-2.0 | calculateTerm :: QModel -> VariableAssignment -> CASLTERM -> Result CASLTERM
calculateTerm qm ass trm = case trm of
Qual_var var _ _ -> lookupVar var ass
Application opSymb terms _ ->
applyOperation qm ass opSymb terms
Sorted_term term _ _ -> calculateTerm qm ass term
Cast _ _ _ -> error "... | 560 | calculateTerm :: QModel -> VariableAssignment -> CASLTERM -> Result CASLTERM
calculateTerm qm ass trm = case trm of
Qual_var var _ _ -> lookupVar var ass
Application opSymb terms _ ->
applyOperation qm ass opSymb terms
Sorted_term term _ _ -> calculateTerm qm ass term
Cast _ _ _ -> error "... | 560 | calculateTerm qm ass trm = case trm of
Qual_var var _ _ -> lookupVar var ass
Application opSymb terms _ ->
applyOperation qm ass opSymb terms
Sorted_term term _ _ -> calculateTerm qm ass term
Cast _ _ _ -> error "Cast not implemented"
Conditional t1 fo t2 _ -> do
res <- c... | 483 | false | true | 0 | 11 | 171 | 182 | 83 | 99 | null | null |
narrative/stack | src/Stack/Init.hs | bsd-3-clause | getSnapshots' :: (MonadIO m, MonadMask m, MonadReader env m, HasConfig env, HasHttpManager env, MonadLogger m, MonadBaseControl IO m)
=> m Snapshots
getSnapshots' =
getSnapshots `catchAny` \e -> do
$logError $
"Unable to download snapshot list, and therefore could " <>
... | 963 | getSnapshots' :: (MonadIO m, MonadMask m, MonadReader env m, HasConfig env, HasHttpManager env, MonadLogger m, MonadBaseControl IO m)
=> m Snapshots
getSnapshots' =
getSnapshots `catchAny` \e -> do
$logError $
"Unable to download snapshot list, and therefore could " <>
... | 963 | getSnapshots' =
getSnapshots `catchAny` \e -> do
$logError $
"Unable to download snapshot list, and therefore could " <>
"not generate a stack.yaml file automatically"
$logError $
"This sometimes happens due to missing Certificate Authorities " <>
"on ... | 800 | false | true | 0 | 13 | 270 | 186 | 78 | 108 | null | null |
authchir/log710-lab1-bash | wait.hs | bsd-3-clause | main :: IO ()
main = do
args <- Environment.getArgs
case args of
["--verbose", n] -> Monad.replicateM_ (read n) waitAndPrint
["--verbose"] -> Monad.forever waitAndPrint
[n] -> Monad.replicateM_ (read n) wait
[] -> Monad.forever wait
_ -> IO.hPutStrLn IO.stderr "Usage: wai... | 447 | main :: IO ()
main = do
args <- Environment.getArgs
case args of
["--verbose", n] -> Monad.replicateM_ (read n) waitAndPrint
["--verbose"] -> Monad.forever waitAndPrint
[n] -> Monad.replicateM_ (read n) wait
[] -> Monad.forever wait
_ -> IO.hPutStrLn IO.stderr "Usage: wai... | 447 | main = do
args <- Environment.getArgs
case args of
["--verbose", n] -> Monad.replicateM_ (read n) waitAndPrint
["--verbose"] -> Monad.forever waitAndPrint
[n] -> Monad.replicateM_ (read n) wait
[] -> Monad.forever wait
_ -> IO.hPutStrLn IO.stderr "Usage: wait [--verbose] ... | 433 | false | true | 1 | 12 | 120 | 147 | 71 | 76 | null | null |
osa1/sequent-core | examples/Compl.hs | bsd-3-clause | main = case f 10 of
(f, g, h) -> print (h, g, f) | 50 | main = case f 10 of
(f, g, h) -> print (h, g, f) | 50 | main = case f 10 of
(f, g, h) -> print (h, g, f) | 50 | false | false | 1 | 9 | 15 | 43 | 22 | 21 | null | null |
ekmett/ghc | compiler/main/DynFlags.hs | bsd-3-clause | pgm_l :: DynFlags -> (String,[Option])
pgm_l dflags = sPgm_l (settings dflags) | 94 | pgm_l :: DynFlags -> (String,[Option])
pgm_l dflags = sPgm_l (settings dflags) | 94 | pgm_l dflags = sPgm_l (settings dflags) | 39 | false | true | 0 | 9 | 26 | 42 | 20 | 22 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 1376493 = 4443 | 34 | getValueFromProduct 1376493 = 4443 | 34 | getValueFromProduct 1376493 = 4443 | 34 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
sdiehl/ghc | libraries/base/GHC/Real.hs | bsd-3-clause | (^%^) :: Integral a => Rational -> a -> Rational
(n :% d) ^%^ e
| e < 0 = errorWithoutStackTrace "Negative exponent"
| e == 0 = 1 :% 1
| otherwise = (n ^ e) :% (d ^ e) | 196 | (^%^) :: Integral a => Rational -> a -> Rational
(n :% d) ^%^ e
| e < 0 = errorWithoutStackTrace "Negative exponent"
| e == 0 = 1 :% 1
| otherwise = (n ^ e) :% (d ^ e) | 196 | (n :% d) ^%^ e
| e < 0 = errorWithoutStackTrace "Negative exponent"
| e == 0 = 1 :% 1
| otherwise = (n ^ e) :% (d ^ e) | 137 | false | true | 0 | 8 | 69 | 98 | 48 | 50 | null | null |
sopvop/cabal | Cabal/Distribution/Simple/Setup.hs | bsd-3-clause | emptyCleanFlags :: CleanFlags
emptyCleanFlags = mempty | 54 | emptyCleanFlags :: CleanFlags
emptyCleanFlags = mempty | 54 | emptyCleanFlags = mempty | 24 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
ekmett/ghc | utils/genapply/GenApply.hs | bsd-3-clause | mkBitmap :: [ArgRep] -> Word32
mkBitmap args = foldr f 0 args
where f arg bm | isPtr arg = bm `shiftL` 1
| otherwise = (bm `shiftL` size) .|. ((1 `shiftL` size) - 1)
where size = argSize arg
-- -----------------------------------------------------------------------------
-- Generating ... | 1,181 | mkBitmap :: [ArgRep] -> Word32
mkBitmap args = foldr f 0 args
where f arg bm | isPtr arg = bm `shiftL` 1
| otherwise = (bm `shiftL` size) .|. ((1 `shiftL` size) - 1)
where size = argSize arg
-- -----------------------------------------------------------------------------
-- Generating ... | 1,181 | mkBitmap args = foldr f 0 args
where f arg bm | isPtr arg = bm `shiftL` 1
| otherwise = (bm `shiftL` size) .|. ((1 `shiftL` size) - 1)
where size = argSize arg
-- -----------------------------------------------------------------------------
-- Generating the application functions
-- A... | 1,150 | false | true | 0 | 10 | 245 | 120 | 71 | 49 | null | null |
jmlb23/haskell | ch03/return_functions.hs | gpl-3.0 | renoOffice name = nameText ++ " - PO Box - Reno, NV, 89523"
where nameText = (snd name)
--funcion que fai a labor de factoria
--o case é parecido o match de scala | 164 | renoOffice name = nameText ++ " - PO Box - Reno, NV, 89523"
where nameText = (snd name)
--funcion que fai a labor de factoria
--o case é parecido o match de scala | 164 | renoOffice name = nameText ++ " - PO Box - Reno, NV, 89523"
where nameText = (snd name)
--funcion que fai a labor de factoria
--o case é parecido o match de scala | 164 | false | false | 2 | 7 | 34 | 36 | 15 | 21 | null | null |
msiegenthaler/haskell-xbee | System/Hardware/XBee/Device.hs | bsd-3-clause | sendCommand :: TimeUnit time => XBee -> time -> FrameCmd a -> STM (STM a)
sendCommand x tmo (FrameCmd cmd h) = do
(frame, future, feedFun) <- request (correlator x) h
writeTChan (outQueue x) (cmd frame)
writeTChan (scheduleQueue x) $ Scheduled tmoUs (atomically $ feedFun CRTimeout)
retur... | 434 | sendCommand :: TimeUnit time => XBee -> time -> FrameCmd a -> STM (STM a)
sendCommand x tmo (FrameCmd cmd h) = do
(frame, future, feedFun) <- request (correlator x) h
writeTChan (outQueue x) (cmd frame)
writeTChan (scheduleQueue x) $ Scheduled tmoUs (atomically $ feedFun CRTimeout)
retur... | 434 | sendCommand x tmo (FrameCmd cmd h) = do
(frame, future, feedFun) <- request (correlator x) h
writeTChan (outQueue x) (cmd frame)
writeTChan (scheduleQueue x) $ Scheduled tmoUs (atomically $ feedFun CRTimeout)
return future
where tmoUs = fromIntegral $ toMicroseconds tmo
-- | Timeout... | 360 | false | true | 0 | 11 | 101 | 156 | 74 | 82 | null | null |
Cahu/krpc-hs | src/KRPCHS/KerbalAlarmClock.hs | gpl-3.0 | getAlarmNotesStreamReq :: KRPCHS.KerbalAlarmClock.Alarm -> KRPCStreamReq (Data.Text.Text)
getAlarmNotesStreamReq thisArg =
let req = makeRequest "KerbalAlarmClock" "Alarm_get_Notes" [makeArgument 0 thisArg]
in makeStream req | 233 | getAlarmNotesStreamReq :: KRPCHS.KerbalAlarmClock.Alarm -> KRPCStreamReq (Data.Text.Text)
getAlarmNotesStreamReq thisArg =
let req = makeRequest "KerbalAlarmClock" "Alarm_get_Notes" [makeArgument 0 thisArg]
in makeStream req | 233 | getAlarmNotesStreamReq thisArg =
let req = makeRequest "KerbalAlarmClock" "Alarm_get_Notes" [makeArgument 0 thisArg]
in makeStream req | 143 | false | true | 0 | 11 | 29 | 63 | 30 | 33 | null | null |
yoo-e/hs-tar-conduit | Codec/Archive/Tar.hs | bsd-3-clause | -- | Extract all the files contained in a @\".tar\"@ file.
--
-- It is equivalent to calling the standard @tar@ program like so:
--
-- @$ tar -x -f tarball.tar -C dir@
--
-- So for example if the @tarball.tar@ file contains @foo\/bar.txt@ then this
-- will extract it to @dir\/foo\/bar.txt@.
--
-- This is a high level \... | 1,321 | extract :: FilePath -- ^ Destination directory
-> FilePath -- ^ Tarball
-> IO ()
extract dir tar = unpack dir . read =<< BS.readFile tar | 152 | extract dir tar = unpack dir . read =<< BS.readFile tar | 55 | true | true | 0 | 8 | 252 | 75 | 51 | 24 | null | null |
ben-schulz/Idris-dev | src/Idris/Parser/Helpers.hs | bsd-3-clause | mkName (n, ns) = sNS (sUN n) (reverse (parseNS ns))
where parseNS x = case span (/= '.') x of
(x, "") -> [x]
(x, '.':y) -> x : parseNS y | 185 | mkName (n, ns) = sNS (sUN n) (reverse (parseNS ns))
where parseNS x = case span (/= '.') x of
(x, "") -> [x]
(x, '.':y) -> x : parseNS y | 185 | mkName (n, ns) = sNS (sUN n) (reverse (parseNS ns))
where parseNS x = case span (/= '.') x of
(x, "") -> [x]
(x, '.':y) -> x : parseNS y | 185 | false | false | 0 | 9 | 79 | 99 | 52 | 47 | null | null |
HIPERFIT/futhark | src/Futhark/IR/Mem.hs | isc | maybeReturns (MemMem space) =
MemMem space | 44 | maybeReturns (MemMem space) =
MemMem space | 44 | maybeReturns (MemMem space) =
MemMem space | 44 | false | false | 0 | 7 | 7 | 18 | 8 | 10 | null | null |
pparkkin/eta | compiler/ETA/BasicTypes/VarEnv.hs | bsd-3-clause | rnOccR (RV2 { envR = env }) v = lookupVarEnv env v `orElse` v | 61 | rnOccR (RV2 { envR = env }) v = lookupVarEnv env v `orElse` v | 61 | rnOccR (RV2 { envR = env }) v = lookupVarEnv env v `orElse` v | 61 | false | false | 0 | 9 | 13 | 34 | 18 | 16 | null | null |
janm399/equationsolver | src/EquationSolver/Solver.hs | apache-2.0 | simplify x = x | 14 | simplify x = x | 14 | simplify x = x | 14 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
ku-fpg/better-life | HERMIT/QTree/Life.hs | bsd-2-clause | -- abstraction of "empty"
absxB f = absB . f | 44 | absxB f = absB . f | 18 | absxB f = absB . f | 18 | true | false | 0 | 5 | 9 | 14 | 7 | 7 | null | null |
erochest/topical | src/Topical/Text/Tokenizer/TextTiling.hs | apache-2.0 | avg :: [Double] -> Double
avg = uncurry (/) . L.foldl' accum (0, 0)
where
accum p x = ((+ x) *** succ) p | 116 | avg :: [Double] -> Double
avg = uncurry (/) . L.foldl' accum (0, 0)
where
accum p x = ((+ x) *** succ) p | 116 | avg = uncurry (/) . L.foldl' accum (0, 0)
where
accum p x = ((+ x) *** succ) p | 90 | false | true | 2 | 8 | 35 | 78 | 37 | 41 | null | null |
devonhollowood/dailyprog | 2015-02-11/sortletters.hs | mit | main = getArgs >>= putStrLn . sort . filter (isAlpha) . head | 60 | main = getArgs >>= putStrLn . sort . filter (isAlpha) . head | 60 | main = getArgs >>= putStrLn . sort . filter (isAlpha) . head | 60 | false | false | 0 | 8 | 11 | 28 | 14 | 14 | null | null |
atsukotakahashi/wi | src/library/Yi/UI/Vty/Conversions.hs | gpl-2.0 | fromVtyKey (Vty.KHome ) = Yi.Event.KHome | 44 | fromVtyKey (Vty.KHome ) = Yi.Event.KHome | 44 | fromVtyKey (Vty.KHome ) = Yi.Event.KHome | 44 | false | false | 0 | 6 | 8 | 18 | 9 | 9 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.