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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
kmilner/tamarin-prover | lib/theory/src/Theory.hs | gpl-3.0 | getDiffSource LHS False RefinedSource = L.get (crcRefinedSources . diffThyCacheLeft) | 84 | getDiffSource LHS False RefinedSource = L.get (crcRefinedSources . diffThyCacheLeft) | 84 | getDiffSource LHS False RefinedSource = L.get (crcRefinedSources . diffThyCacheLeft) | 84 | false | false | 0 | 7 | 8 | 25 | 12 | 13 | null | null |
krame505/board_games | haskell/RectBoard.hs | gpl-3.0 | selectMove :: PlayerId -> (Maybe Loc, Maybe Loc, Maybe String) ->
RectBoard -> Either RectBoardMove String
selectMove player (loc1, loc2, promote) board =
if null options
then Right $ "Invalid move"-- ++ show options
else if length options == 1
then Left $ head options
else Right $ "Ambiguous mo... | 919 | selectMove :: PlayerId -> (Maybe Loc, Maybe Loc, Maybe String) ->
RectBoard -> Either RectBoardMove String
selectMove player (loc1, loc2, promote) board =
if null options
then Right $ "Invalid move"-- ++ show options
else if length options == 1
then Left $ head options
else Right $ "Ambiguous mo... | 919 | selectMove player (loc1, loc2, promote) board =
if null options
then Right $ "Invalid move"-- ++ show options
else if length options == 1
then Left $ head options
else Right $ "Ambiguous move"-- ++ show options
where
options =
[move | move <- moves player board,
case loc1 of
Just l... | 798 | false | true | 0 | 15 | 305 | 308 | 153 | 155 | null | null |
np/ling | Ling/Rename.hs | bsd-3-clause | boundVars = someNames isBoundVar | 33 | boundVars = someNames isBoundVar | 33 | boundVars = someNames isBoundVar | 33 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
kim/amazonka | amazonka-ecs/gen/Network/AWS/ECS/StartTask.hs | mpl-2.0 | -- | A full description of the tasks that were started. Each task that was
-- successfully placed on your container instances will be described here.
strTasks :: Lens' StartTaskResponse [Task]
strTasks = lens _strTasks (\s a -> s { _strTasks = a }) . _List | 256 | strTasks :: Lens' StartTaskResponse [Task]
strTasks = lens _strTasks (\s a -> s { _strTasks = a }) . _List | 106 | strTasks = lens _strTasks (\s a -> s { _strTasks = a }) . _List | 63 | true | true | 0 | 10 | 45 | 48 | 27 | 21 | null | null |
wyager/IHaskell | src/IHaskell/IPython.hs | mit | fp :: SH.FilePath -> FilePath
fp = T.unpack . SH.toTextIgnore | 61 | fp :: SH.FilePath -> FilePath
fp = T.unpack . SH.toTextIgnore | 61 | fp = T.unpack . SH.toTextIgnore | 31 | false | true | 0 | 7 | 9 | 32 | 14 | 18 | null | null |
shouya/thinking-dumps | transformer/trans.hs | mit | eval3 (Lit i) = do tick
return $ IntVal i | 66 | eval3 (Lit i) = do tick
return $ IntVal i | 66 | eval3 (Lit i) = do tick
return $ IntVal i | 66 | false | false | 0 | 8 | 34 | 28 | 12 | 16 | null | null |
nevrenato/Hets_Fork | CASL/Morphism.hs | gpl-2.0 | idOrInclMorphism :: Morphism f e m -> Morphism f e m
idOrInclMorphism m =
let src = opMap $ msource m
tar = opMap $ mtarget m
in if isSubOpMap tar src then m
else let diffOpMap = MapSet.toMap $ MapSet.difference src tar in
m { op_map = Map.fromList $ concatMap (\ (i, s) ->
map (\ ... | 404 | idOrInclMorphism :: Morphism f e m -> Morphism f e m
idOrInclMorphism m =
let src = opMap $ msource m
tar = opMap $ mtarget m
in if isSubOpMap tar src then m
else let diffOpMap = MapSet.toMap $ MapSet.difference src tar in
m { op_map = Map.fromList $ concatMap (\ (i, s) ->
map (\ ... | 404 | idOrInclMorphism m =
let src = opMap $ msource m
tar = opMap $ mtarget m
in if isSubOpMap tar src then m
else let diffOpMap = MapSet.toMap $ MapSet.difference src tar in
m { op_map = Map.fromList $ concatMap (\ (i, s) ->
map (\ t -> ((i, t), (i, Total)))
$ Set.toL... | 351 | false | true | 0 | 22 | 125 | 177 | 91 | 86 | null | null |
mac10688/GameOfLife-Haskell | src/World.hs | apache-2.0 | iterateCell :: Map Position Cell -> Position -> Cell -> Cell
iterateCell worldMap position cell =
let
neighbors = getNeighbors worldMap position
in
newState cell neighbors | 186 | iterateCell :: Map Position Cell -> Position -> Cell -> Cell
iterateCell worldMap position cell =
let
neighbors = getNeighbors worldMap position
in
newState cell neighbors | 186 | iterateCell worldMap position cell =
let
neighbors = getNeighbors worldMap position
in
newState cell neighbors | 125 | false | true | 0 | 9 | 40 | 56 | 26 | 30 | null | null |
gafiatulin/codewars | src/5 kyu/Johnann.hs | mit | sumJohn :: Int -> Integer
sumJohn = sum . john | 46 | sumJohn :: Int -> Integer
sumJohn = sum . john | 46 | sumJohn = sum . john | 20 | false | true | 0 | 5 | 9 | 19 | 10 | 9 | null | null |
ambiata/highlighting-kate | Text/Highlighting/Kate/Syntax/D.hs | gpl-2.0 | regex_0'5bxX'5d'5f'2a'5b'5cda'2dfA'2dF'5d'5b'5cda'2dfA'2dF'5f'5d'2a'28L'5buU'5d'3f'7c'5buU'5dL'3f'29'3f = compileRegex True "0[xX]_*[\\da-fA-F][\\da-fA-F_]*(L[uU]?|[uU]L?)?" | 173 | regex_0'5bxX'5d'5f'2a'5b'5cda'2dfA'2dF'5d'5b'5cda'2dfA'2dF'5f'5d'2a'28L'5buU'5d'3f'7c'5buU'5dL'3f'29'3f = compileRegex True "0[xX]_*[\\da-fA-F][\\da-fA-F_]*(L[uU]?|[uU]L?)?" | 173 | regex_0'5bxX'5d'5f'2a'5b'5cda'2dfA'2dF'5d'5b'5cda'2dfA'2dF'5f'5d'2a'28L'5buU'5d'3f'7c'5buU'5dL'3f'29'3f = compileRegex True "0[xX]_*[\\da-fA-F][\\da-fA-F_]*(L[uU]?|[uU]L?)?" | 173 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
olsner/ghc | compiler/typecheck/TcEvidence.hs | bsd-3-clause | evVarsOfTerm :: EvTerm -> VarSet
evVarsOfTerm (EvId v) = unitVarSet v | 81 | evVarsOfTerm :: EvTerm -> VarSet
evVarsOfTerm (EvId v) = unitVarSet v | 81 | evVarsOfTerm (EvId v) = unitVarSet v | 48 | false | true | 0 | 7 | 22 | 27 | 13 | 14 | null | null |
pairyo/elm-compiler | src/Optimize.hs | bsd-3-clause | left :: Assoc
left =
flip (,) | 33 | left :: Assoc
left =
flip (,) | 33 | left =
flip (,) | 19 | false | true | 0 | 6 | 10 | 23 | 10 | 13 | null | null |
deech/fltkhs | src/Graphics/UI/FLTK/LowLevel/Utils.hs | mit | staticArrayToRefs:: (Ptr ()) -> Int -> IO [(Ref a)]
staticArrayToRefs arrayPtr numElements =
go arrayPtr numElements []
where
go _ 0 accum = return accum
go currPtr numLeft accum = do
let nextPtr = currPtr `plusPtr` (sizeOf (undefined :: Ptr a))
ref <- toRef currPtr
go nextP... | 375 | staticArrayToRefs:: (Ptr ()) -> Int -> IO [(Ref a)]
staticArrayToRefs arrayPtr numElements =
go arrayPtr numElements []
where
go _ 0 accum = return accum
go currPtr numLeft accum = do
let nextPtr = currPtr `plusPtr` (sizeOf (undefined :: Ptr a))
ref <- toRef currPtr
go nextP... | 375 | staticArrayToRefs arrayPtr numElements =
go arrayPtr numElements []
where
go _ 0 accum = return accum
go currPtr numLeft accum = do
let nextPtr = currPtr `plusPtr` (sizeOf (undefined :: Ptr a))
ref <- toRef currPtr
go nextPtr
(numLeft - 1)
(accum ++ [re... | 323 | false | true | 0 | 15 | 119 | 157 | 75 | 82 | null | null |
BartAdv/Idris-dev | src/Idris/Core/Elaborate.hs | bsd-3-clause | solve :: Elab' aux ()
solve = processTactic' Solve | 50 | solve :: Elab' aux ()
solve = processTactic' Solve | 50 | solve = processTactic' Solve | 28 | false | true | 1 | 6 | 8 | 24 | 10 | 14 | null | null |
kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/CreateVolume.hs | mpl-2.0 | -- | Only valid for Provisioned IOPS (SSD) volumes. The number of I/O operations
-- per second (IOPS) to provision for the volume, with a maximum ratio of 30
-- IOPS/GiB.
--
-- Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes
cv1Iops :: Lens' CreateVolume (Maybe Int)
cv1Iops = lens _cv1Iops (\s a ->... | 340 | cv1Iops :: Lens' CreateVolume (Maybe Int)
cv1Iops = lens _cv1Iops (\s a -> s { _cv1Iops = a }) | 94 | cv1Iops = lens _cv1Iops (\s a -> s { _cv1Iops = a }) | 52 | true | true | 0 | 9 | 62 | 50 | 29 | 21 | null | null |
Blaisorblade/stack | src/test/Network/HTTP/Download/VerifiedSpec.hs | bsd-3-clause | isWrongContentLength :: VerifiedDownloadException -> Bool
isWrongContentLength WrongContentLength{} = True | 106 | isWrongContentLength :: VerifiedDownloadException -> Bool
isWrongContentLength WrongContentLength{} = True | 106 | isWrongContentLength WrongContentLength{} = True | 48 | false | true | 0 | 6 | 8 | 22 | 11 | 11 | null | null |
metachord/netlink-hs | System/Linux/Netlink/Attributes.hs | bsd-3-clause | putString :: String -> ByteString
putString s = append (pack s) "\0" | 68 | putString :: String -> ByteString
putString s = append (pack s) "\0" | 68 | putString s = append (pack s) "\0" | 34 | false | true | 0 | 7 | 11 | 36 | 15 | 21 | null | null |
isomorphism/labelled-hexdump-parser | Parser.hs | bsd-3-clause | parseWarning :: (Monad m) => String -> FieldParser m ()
parseWarning str = do
o <- use offset
w <- view debugWrite
liftFieldParser $ w o str
return () | 166 | parseWarning :: (Monad m) => String -> FieldParser m ()
parseWarning str = do
o <- use offset
w <- view debugWrite
liftFieldParser $ w o str
return () | 166 | parseWarning str = do
o <- use offset
w <- view debugWrite
liftFieldParser $ w o str
return () | 110 | false | true | 0 | 9 | 44 | 78 | 34 | 44 | null | null |
brendanhay/gogol | gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs | mpl-2.0 | -- | A token to request the next page of results.
lraprNextPageToken :: Lens' ListRowAccessPoliciesResponse (Maybe Text)
lraprNextPageToken
= lens _lraprNextPageToken
(\ s a -> s{_lraprNextPageToken = a}) | 212 | lraprNextPageToken :: Lens' ListRowAccessPoliciesResponse (Maybe Text)
lraprNextPageToken
= lens _lraprNextPageToken
(\ s a -> s{_lraprNextPageToken = a}) | 162 | lraprNextPageToken
= lens _lraprNextPageToken
(\ s a -> s{_lraprNextPageToken = a}) | 91 | true | true | 0 | 9 | 35 | 48 | 25 | 23 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Vector.Unboxed.hs | bsd-3-clause | ifoldM' = G.ifoldM' | 19 | ifoldM' = G.ifoldM' | 19 | ifoldM' = G.ifoldM' | 19 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
osa1/chsc | StaticFlags.hs | bsd-3-clause | sC_ROLLBACK :: Bool
sC_ROLLBACK = not $ "--no-sc-rollback" `elem` aRGS | 70 | sC_ROLLBACK :: Bool
sC_ROLLBACK = not $ "--no-sc-rollback" `elem` aRGS | 70 | sC_ROLLBACK = not $ "--no-sc-rollback" `elem` aRGS | 50 | false | true | 2 | 6 | 9 | 31 | 14 | 17 | null | null |
ahodgen/archer-calc | src/Infer.hs | bsd-2-clause | letters :: [String]
letters = [1..] >>= flip replicateM ['a'..'z'] | 66 | letters :: [String]
letters = [1..] >>= flip replicateM ['a'..'z'] | 66 | letters = [1..] >>= flip replicateM ['a'..'z'] | 46 | false | true | 0 | 7 | 9 | 31 | 17 | 14 | null | null |
foollbar/Ponga | src/Visualize.hs | bsd-3-clause | main :: IO ()
main = do
(g1, g2) <- readGene
simulate window background fps (initialSimulation g1 g2) render (const progress) | 129 | main :: IO ()
main = do
(g1, g2) <- readGene
simulate window background fps (initialSimulation g1 g2) render (const progress) | 129 | main = do
(g1, g2) <- readGene
simulate window background fps (initialSimulation g1 g2) render (const progress) | 115 | false | true | 0 | 9 | 24 | 59 | 29 | 30 | null | null |
m-alvarez/jhc | src/Util/Seq.hs | mit | concat :: Seq (Seq a) -> Seq a
concat (Seq f) = (Prelude.foldr mappend mempty (f [])) | 85 | concat :: Seq (Seq a) -> Seq a
concat (Seq f) = (Prelude.foldr mappend mempty (f [])) | 85 | concat (Seq f) = (Prelude.foldr mappend mempty (f [])) | 54 | false | true | 0 | 9 | 16 | 56 | 27 | 29 | null | null |
tulcod/megaparsec | Text/Megaparsec/Char.hs | bsd-2-clause | -- | As the dual of 'oneOf', @noneOf cs@ succeeds if the current
-- character /not/ in the supplied list of characters @cs@. Returns the
-- parsed character.
noneOf :: Stream s m Char => String -> ParsecT s u m Char
noneOf cs = satisfy (`notElem` cs) | 251 | noneOf :: Stream s m Char => String -> ParsecT s u m Char
noneOf cs = satisfy (`notElem` cs) | 92 | noneOf cs = satisfy (`notElem` cs) | 34 | true | true | 0 | 7 | 48 | 50 | 27 | 23 | null | null |
akru/haste-compiler | src/Data/JSTarget/Print.hs | bsd-3-clause | prettyCase cond def alts = do
line $ "switch(" .+. pp cond .+. "){"
indent $ do
mapM_ pp alts
line $ "default:"
indent $ pp def
line "}" | 154 | prettyCase cond def alts = do
line $ "switch(" .+. pp cond .+. "){"
indent $ do
mapM_ pp alts
line $ "default:"
indent $ pp def
line "}" | 154 | prettyCase cond def alts = do
line $ "switch(" .+. pp cond .+. "){"
indent $ do
mapM_ pp alts
line $ "default:"
indent $ pp def
line "}" | 154 | false | false | 0 | 11 | 46 | 69 | 29 | 40 | null | null |
michael-swan/quick-quiz | src/Quiz/Web/Style.hs | bsd-3-clause | webStyle :: Web ByteString
webStyle = do
["style.css"] <- getPath
liftIO $ BL.readFile "www/style.css" | 110 | webStyle :: Web ByteString
webStyle = do
["style.css"] <- getPath
liftIO $ BL.readFile "www/style.css" | 110 | webStyle = do
["style.css"] <- getPath
liftIO $ BL.readFile "www/style.css" | 83 | false | true | 0 | 10 | 21 | 42 | 18 | 24 | null | null |
cjp256/manager | xenmgr/Vm/Config.hs | gpl-2.0 | vmSeamlessTraffic = property "seamless-traffic" | 47 | vmSeamlessTraffic = property "seamless-traffic" | 47 | vmSeamlessTraffic = property "seamless-traffic" | 47 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
meteficha/biostockholm | src/Bio/Sequence/Stockholm/Stream.hs | bsd-3-clause | -- | Parse an 'Event' after 'EvHeader'.
eventParser :: A.Parser Event
eventParser = hash *> (ann <|> comment)
<|> end
<|> seqdata
A.<?> "Event"
where
word = A.takeTill A8.isHorizontalSpace <* spaces
tillNextLine = A.takeLazyByteString
hash = A8.char '#'
... | 980 | eventParser :: A.Parser Event
eventParser = hash *> (ann <|> comment)
<|> end
<|> seqdata
A.<?> "Event"
where
word = A.takeTill A8.isHorizontalSpace <* spaces
tillNextLine = A.takeLazyByteString
hash = A8.char '#'
comment = EvComment <$> tillNextLine A.<... | 940 | eventParser = hash *> (ann <|> comment)
<|> end
<|> seqdata
A.<?> "Event"
where
word = A.takeTill A8.isHorizontalSpace <* spaces
tillNextLine = A.takeLazyByteString
hash = A8.char '#'
comment = EvComment <$> tillNextLine A.<?> "Comment"
end = E... | 910 | true | true | 6 | 17 | 310 | 295 | 146 | 149 | null | null |
lamdu/lamdu | test/Tests/Sugar.hs | gpl-3.0 | -- Test for https://github.com/lamdu/lamdu/issues/123
testPunnedLightParam :: Test
testPunnedLightParam =
testCase "punned-light-param" $
Env.make >>= testProgram "punned-light-param.json" . convertWorkArea ""
<&> Lens.has
( replBinder . _BinderTerm . _BodyLam . lamFunc . fBody . hVal .
... | 504 | testPunnedLightParam :: Test
testPunnedLightParam =
testCase "punned-light-param" $
Env.make >>= testProgram "punned-light-param.json" . convertWorkArea ""
<&> Lens.has
( replBinder . _BinderTerm . _BodyLam . lamFunc . fBody . hVal .
bBody . _BinderTerm . _BodyRecord . cPunnedItems . tra... | 450 | testPunnedLightParam =
testCase "punned-light-param" $
Env.make >>= testProgram "punned-light-param.json" . convertWorkArea ""
<&> Lens.has
( replBinder . _BinderTerm . _BodyLam . lamFunc . fBody . hVal .
bBody . _BinderTerm . _BodyRecord . cPunnedItems . traverse . pvVar . hVal .
... | 421 | true | true | 0 | 23 | 116 | 116 | 57 | 59 | null | null |
alphaHeavy/hlint | src/HSE/Util.hs | gpl-2.0 | unqual :: QName S -> QName S
unqual (Qual an _ x) = UnQual an x | 63 | unqual :: QName S -> QName S
unqual (Qual an _ x) = UnQual an x | 63 | unqual (Qual an _ x) = UnQual an x | 34 | false | true | 0 | 9 | 15 | 45 | 19 | 26 | null | null |
nevrenato/Hets_Fork | Static/GTheory.hs | gpl-2.0 | isProvenSenStatus :: SenStatus a (AnyComorphism, BasicProof) -> Bool
isProvenSenStatus = any (isProvedBasically . snd) . thmStatus | 130 | isProvenSenStatus :: SenStatus a (AnyComorphism, BasicProof) -> Bool
isProvenSenStatus = any (isProvedBasically . snd) . thmStatus | 130 | isProvenSenStatus = any (isProvedBasically . snd) . thmStatus | 61 | false | true | 0 | 8 | 15 | 47 | 22 | 25 | null | null |
adept/hledger | bin/hledger-check-fancyassertions.hs | gpl-3.0 | -- | Parse a 'Compare'.
comparep :: Monad m => H.TextParser m Compare
comparep = gostringsp [("<=", LTE), ("<", LLT), ("==", EEQ), (">=", GTE), (">", GGT), ("!=", NEQ)] | 168 | comparep :: Monad m => H.TextParser m Compare
comparep = gostringsp [("<=", LTE), ("<", LLT), ("==", EEQ), (">=", GTE), (">", GGT), ("!=", NEQ)] | 144 | comparep = gostringsp [("<=", LTE), ("<", LLT), ("==", EEQ), (">=", GTE), (">", GGT), ("!=", NEQ)] | 98 | true | true | 0 | 7 | 27 | 83 | 50 | 33 | null | null |
cirquit/Personal-Repository | Haskell/GTK-Examples/gtk-example/.stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/autogen/Paths_gtk_example.hs | mit | catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a
catchIO = Exception.catch | 84 | catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a
catchIO = Exception.catch | 84 | catchIO = Exception.catch | 25 | false | true | 0 | 10 | 14 | 45 | 20 | 25 | null | null |
samscott89/tamarin-prover | lib/term/src/Term/Unification.hs | gpl-3.0 | -- | @unifyLNTerm eqs@ returns a complete set of unifiers for @eqs@ modulo AC.
unifyLNTerm :: [Equal LNTerm] -> WithMaude [SubstVFresh Name LVar]
unifyLNTerm = unifyLTerm sortOfName | 181 | unifyLNTerm :: [Equal LNTerm] -> WithMaude [SubstVFresh Name LVar]
unifyLNTerm = unifyLTerm sortOfName | 102 | unifyLNTerm = unifyLTerm sortOfName | 35 | true | true | 0 | 8 | 26 | 36 | 18 | 18 | null | null |
postgres-haskell/postgres-wire | src/Database/PostgreSQL/Protocol/Encoders.hs | mit | encodeValue :: Maybe Encode -> Encode
encodeValue Nothing = putWord32BE (-1) | 77 | encodeValue :: Maybe Encode -> Encode
encodeValue Nothing = putWord32BE (-1) | 77 | encodeValue Nothing = putWord32BE (-1) | 39 | false | true | 0 | 7 | 11 | 29 | 14 | 15 | null | null |
dmbarbour/awelon | hsrc/ABC/Quote.hs | bsd-3-clause | opd 1 = Op_1 | 12 | opd 1 = Op_1 | 12 | opd 1 = Op_1 | 12 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
carlohamalainen/imagetrove-uploader | src/Network/MyTardis/RestTypes.hs | bsd-2-clause | publicAccessFull = 100 | 29 | publicAccessFull = 100 | 29 | publicAccessFull = 100 | 29 | false | false | 0 | 4 | 9 | 6 | 3 | 3 | null | null |
siddhanathan/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | setCtLocEnv :: CtLoc -> TcLclEnv -> CtLoc
setCtLocEnv ctl env = ctl { ctl_env = env } | 85 | setCtLocEnv :: CtLoc -> TcLclEnv -> CtLoc
setCtLocEnv ctl env = ctl { ctl_env = env } | 85 | setCtLocEnv ctl env = ctl { ctl_env = env } | 43 | false | true | 0 | 6 | 16 | 32 | 17 | 15 | null | null |
spechub/Hets | Proofs/InferBasic.hs | gpl-2.0 | proveTheory :: Logic lid sublogics
basic_spec sentence symb_items symb_map_items
sign morphism symbol raw_symbol proof_tree
=> lid -> Prover sign sentence morphism sublogics proof_tree
-> String -> Theory sign sentence proof_tree
-> [FreeDefMorphism sentence ... | 519 | proveTheory :: Logic lid sublogics
basic_spec sentence symb_items symb_map_items
sign morphism symbol raw_symbol proof_tree
=> lid -> Prover sign sentence morphism sublogics proof_tree
-> String -> Theory sign sentence proof_tree
-> [FreeDefMorphism sentence ... | 519 | proveTheory _ =
fromMaybe (\ _ _ -> fail "proveGUI not implemented") . proveGUI | 83 | false | true | 0 | 15 | 149 | 137 | 68 | 69 | null | null |
bravit/Idris-dev | src/Idris/Docs.hs | bsd-3-clause | pprintFDWithoutTotality :: IState -> Bool -> FunDoc -> Doc OutputAnnotation
pprintFDWithoutTotality ist = pprintFD ist False | 124 | pprintFDWithoutTotality :: IState -> Bool -> FunDoc -> Doc OutputAnnotation
pprintFDWithoutTotality ist = pprintFD ist False | 124 | pprintFDWithoutTotality ist = pprintFD ist False | 48 | false | true | 0 | 8 | 15 | 34 | 16 | 18 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 3988 = 3987 | 11 | 3988 = 3987 | 11 | 3988 = 3987 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
zombiecalypse/LambdaRay | src/LambdaRay/Camera.hs | gpl-2.0 | centerMatrix eye = fromColumns [zero4, zero4, zero4, eye] | 57 | centerMatrix eye = fromColumns [zero4, zero4, zero4, eye] | 57 | centerMatrix eye = fromColumns [zero4, zero4, zero4, eye] | 57 | false | false | 0 | 6 | 7 | 24 | 13 | 11 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 63825 = 5603 | 32 | getValueFromProduct 63825 = 5603 | 32 | getValueFromProduct 63825 = 5603 | 32 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
Nathan-Fenner/New-Nickel | Verify.hs | mit | reject :: String -> Check any
reject x = Fail [x] | 49 | reject :: String -> Check any
reject x = Fail [x] | 49 | reject x = Fail [x] | 19 | false | true | 0 | 6 | 10 | 27 | 13 | 14 | null | null |
rfranek/duckling | Duckling/Rules/SV.hs | bsd-3-clause | rules (This Ordinal) = Ordinal.rules | 36 | rules (This Ordinal) = Ordinal.rules | 36 | rules (This Ordinal) = Ordinal.rules | 36 | false | false | 0 | 7 | 4 | 17 | 8 | 9 | null | null |
mhwombat/interactive-wains | test/LearningTest.hs | bsd-3-clause | readImage2 :: FilePath -> IO (Object Action)
readImage2 f = do
img <- readImage f
return $ IObject img (takeFileName f) | 123 | readImage2 :: FilePath -> IO (Object Action)
readImage2 f = do
img <- readImage f
return $ IObject img (takeFileName f) | 123 | readImage2 f = do
img <- readImage f
return $ IObject img (takeFileName f) | 78 | false | true | 0 | 10 | 24 | 55 | 25 | 30 | null | null |
ganeti-github-testing/ganeti-test-1 | src/Ganeti/HTools/Loader.hs | bsd-2-clause | -- | Disables moves for instances with a split group.
disableSplitMoves :: Node.List -> Instance.Instance -> Instance.Instance
disableSplitMoves nl inst =
if not . isOk . Cluster.instanceGroup nl $ inst
then Instance.setMovable inst False
else inst | 258 | disableSplitMoves :: Node.List -> Instance.Instance -> Instance.Instance
disableSplitMoves nl inst =
if not . isOk . Cluster.instanceGroup nl $ inst
then Instance.setMovable inst False
else inst | 204 | disableSplitMoves nl inst =
if not . isOk . Cluster.instanceGroup nl $ inst
then Instance.setMovable inst False
else inst | 131 | true | true | 0 | 9 | 45 | 63 | 32 | 31 | null | null |
green-haskell/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | tcSplitDFunHead :: Type -> (Class, [Type])
tcSplitDFunHead = getClassPredTys | 76 | tcSplitDFunHead :: Type -> (Class, [Type])
tcSplitDFunHead = getClassPredTys | 76 | tcSplitDFunHead = getClassPredTys | 33 | false | true | 0 | 9 | 8 | 31 | 15 | 16 | null | null |
kawu/nerf-proto | src/NLP/Nerf2/Tree.hs | bsd-2-clause | end (Branch _ t) = end t | 24 | end (Branch _ t) = end t | 24 | end (Branch _ t) = end t | 24 | false | false | 0 | 6 | 6 | 21 | 9 | 12 | null | null |
sdiehl/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | isSigmaTy (ForAllTy {}) = True | 45 | isSigmaTy (ForAllTy {}) = True | 45 | isSigmaTy (ForAllTy {}) = True | 45 | false | false | 0 | 6 | 19 | 17 | 8 | 9 | null | null |
lenary/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | mapPTermFC f g (PInferRef fc fcs n) = PInferRef (g fc) (map g fcs) n | 68 | mapPTermFC f g (PInferRef fc fcs n) = PInferRef (g fc) (map g fcs) n | 68 | mapPTermFC f g (PInferRef fc fcs n) = PInferRef (g fc) (map g fcs) n | 68 | false | false | 0 | 7 | 14 | 47 | 21 | 26 | null | null |
zepto-lang/zepto-js | src/Zepto/Primitives/HashPrimitives.hs | gpl-2.0 | hashKeys :: [LispVal] -> ThrowsError LispVal
hashKeys [HashMap x] = return $ List $ map SimpleVal (keys x) | 106 | hashKeys :: [LispVal] -> ThrowsError LispVal
hashKeys [HashMap x] = return $ List $ map SimpleVal (keys x) | 106 | hashKeys [HashMap x] = return $ List $ map SimpleVal (keys x) | 61 | false | true | 0 | 9 | 17 | 53 | 25 | 28 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | drowsily = id | 13 | drowsily = id | 13 | drowsily = id | 13 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
tanimoto/orc | src/Examples/test.hs | bsd-3-clause | success :: Orc String -> Orc Int
success m = (m >> return 1) `butAfter` (10, return 0) | 86 | success :: Orc String -> Orc Int
success m = (m >> return 1) `butAfter` (10, return 0) | 86 | success m = (m >> return 1) `butAfter` (10, return 0) | 53 | false | true | 0 | 8 | 17 | 49 | 25 | 24 | null | null |
urbit/urbit | pkg/hs/urbit-noun-core/lib/Urbit/Noun/Cue.hs | mit | swiz :: Word -> (Word, Word) -> Word
swiz !(fromIntegral -> off) (!low, !hig) =
(.|.) (shiftR low off) (shiftL hig (64-off)) | 126 | swiz :: Word -> (Word, Word) -> Word
swiz !(fromIntegral -> off) (!low, !hig) =
(.|.) (shiftR low off) (shiftL hig (64-off)) | 126 | swiz !(fromIntegral -> off) (!low, !hig) =
(.|.) (shiftR low off) (shiftL hig (64-off)) | 89 | false | true | 0 | 9 | 23 | 76 | 40 | 36 | null | null |
moonKimura/hashable-1.2.1.0 | tests/Properties.hs | bsd-3-clause | pHash :: [Word8] -> Bool
pHash xs = unsafePerformIO $ withArray xs $ \ p ->
(hashByteArray (fromList xs) 0 len ==) `fmap` hashPtr p len
where len = length xs
-- | Content equality implies hash equality. | 209 | pHash :: [Word8] -> Bool
pHash xs = unsafePerformIO $ withArray xs $ \ p ->
(hashByteArray (fromList xs) 0 len ==) `fmap` hashPtr p len
where len = length xs
-- | Content equality implies hash equality. | 209 | pHash xs = unsafePerformIO $ withArray xs $ \ p ->
(hashByteArray (fromList xs) 0 len ==) `fmap` hashPtr p len
where len = length xs
-- | Content equality implies hash equality. | 184 | false | true | 0 | 11 | 44 | 77 | 40 | 37 | null | null |
noamz/linlam-gos | src/LamTri.hs | mit | allNPTsupto n = flattenTerms (take n allNormalPlanar) | 53 | allNPTsupto n = flattenTerms (take n allNormalPlanar) | 53 | allNPTsupto n = flattenTerms (take n allNormalPlanar) | 53 | false | false | 1 | 7 | 6 | 23 | 9 | 14 | null | null |
mbakke/ganeti | src/Ganeti/Utils/MultiMap.hs | bsd-2-clause | -- | A 'Lens' that allows to access a set under a given key in a multi-map.
multiMapL :: (Ord k, Ord v) => k -> Lens' (MultiMap k v) (S.Set v)
multiMapL k f = fmap MultiMap
. at k (fmap (mfilter (not . S.null) . Just)
. f . fromMaybe S.empty)
. getMultiMap | 315 | multiMapL :: (Ord k, Ord v) => k -> Lens' (MultiMap k v) (S.Set v)
multiMapL k f = fmap MultiMap
. at k (fmap (mfilter (not . S.null) . Just)
. f . fromMaybe S.empty)
. getMultiMap | 239 | multiMapL k f = fmap MultiMap
. at k (fmap (mfilter (not . S.null) . Just)
. f . fromMaybe S.empty)
. getMultiMap | 172 | true | true | 0 | 17 | 113 | 111 | 55 | 56 | null | null |
ekmett/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | card :: DynFlags -> CmmExpr -> CmmExpr
card dflags i = cmmUShrWord dflags i (mkIntExpr dflags (mUT_ARR_PTRS_CARD_BITS dflags)) | 126 | card :: DynFlags -> CmmExpr -> CmmExpr
card dflags i = cmmUShrWord dflags i (mkIntExpr dflags (mUT_ARR_PTRS_CARD_BITS dflags)) | 126 | card dflags i = cmmUShrWord dflags i (mkIntExpr dflags (mUT_ARR_PTRS_CARD_BITS dflags)) | 87 | false | true | 0 | 9 | 17 | 45 | 22 | 23 | null | null |
MaxGabriel/yesod | yesod-form/Yesod/Helpers/Crud.hs | mit | crudHelper
:: (Item a, Yesod master, SinglePiece (Key a), ToForm a master)
=> Text -> Maybe (Key a, a) -> Bool
-> GHandler (Crud master a) master RepHtml
crudHelper title me isPost = do
crud <- getYesodSub
(errs, form, enctype, hidden) <- runFormPost $ toForm $ fmap snd me
toMaster <- getRouteTo... | 1,282 | crudHelper
:: (Item a, Yesod master, SinglePiece (Key a), ToForm a master)
=> Text -> Maybe (Key a, a) -> Bool
-> GHandler (Crud master a) master RepHtml
crudHelper title me isPost = do
crud <- getYesodSub
(errs, form, enctype, hidden) <- runFormPost $ toForm $ fmap snd me
toMaster <- getRouteTo... | 1,282 | crudHelper title me isPost = do
crud <- getYesodSub
(errs, form, enctype, hidden) <- runFormPost $ toForm $ fmap snd me
toMaster <- getRouteToMaster
case (isPost, errs) of
(True, FormSuccess a) -> do
eid <- case me of
Just (eid, _) -> do
cr... | 1,116 | false | true | 0 | 18 | 485 | 284 | 137 | 147 | null | null |
alphalambda/codeworld | codeworld-base/src/Internal/Text.hs | apache-2.0 | numberOfLines :: Text -> Number
numberOfLines = fromInt . length . J.lines . unT | 80 | numberOfLines :: Text -> Number
numberOfLines = fromInt . length . J.lines . unT | 80 | numberOfLines = fromInt . length . J.lines . unT | 48 | false | true | 0 | 7 | 13 | 36 | 16 | 20 | null | null |
nevrenato/Hets_Fork | GUI/ConsoleUtils.hs | gpl-2.0 | askFileNameAndSave :: String -- ^ default filename for saving the text
-> String -- ^ text to be saved
-> IO ()
askFileNameAndSave f txt = do
putStrLn $ "save text in file \"" ++ f ++ "\"? (y/n)"
s <- getLine
if "y" `isPrefixOf` map toLower s then writeFile f txt
... | 456 | askFileNameAndSave :: String -- ^ default filename for saving the text
-> String -- ^ text to be saved
-> IO ()
askFileNameAndSave f txt = do
putStrLn $ "save text in file \"" ++ f ++ "\"? (y/n)"
s <- getLine
if "y" `isPrefixOf` map toLower s then writeFile f txt
... | 456 | askFileNameAndSave f txt = do
putStrLn $ "save text in file \"" ++ f ++ "\"? (y/n)"
s <- getLine
if "y" `isPrefixOf` map toLower s then writeFile f txt
else do
putStrLn "enter new file name (or abort with return):"
n <- getLine
unless (null n) $ askFileNameAndSave n txt | 306 | false | true | 0 | 14 | 146 | 119 | 55 | 64 | null | null |
keithodulaigh/Hets | Common/IRI.hs | gpl-2.0 | relPathFrom pabs base = -- Construct a relative path isegments
if sa1 == sb1 -- if the paths share a leading isegment
then if sa1 == "/" -- other than a leading '/'
then if sa2 == sb2
then relPathFrom1 ra2 rb2
els... | 681 | relPathFrom pabs base = -- Construct a relative path isegments
if sa1 == sb1 -- if the paths share a leading isegment
then if sa1 == "/" -- other than a leading '/'
then if sa2 == sb2
then relPathFrom1 ra2 rb2
els... | 681 | relPathFrom pabs base = -- Construct a relative path isegments
if sa1 == sb1 -- if the paths share a leading isegment
then if sa1 == "/" -- other than a leading '/'
then if sa2 == sb2
then relPathFrom1 ra2 rb2
els... | 681 | false | false | 1 | 8 | 257 | 128 | 67 | 61 | null | null |
MarkX95/TinyHask | Parser.hs | bsd-3-clause | letExpr_P :: Parser CoreExpr
letExpr_P = do
isRec <- checkRec
defns <- semiSep1 localDefn_P
reserved "in"
ex <- lexeme expr_P
return (ELet isRec defns ex)
where
checkRec
= (try (reserved "letrec") >> return True)
<|> (reserved "let" >> return False) | 287 | letExpr_P :: Parser CoreExpr
letExpr_P = do
isRec <- checkRec
defns <- semiSep1 localDefn_P
reserved "in"
ex <- lexeme expr_P
return (ELet isRec defns ex)
where
checkRec
= (try (reserved "letrec") >> return True)
<|> (reserved "let" >> return False) | 286 | letExpr_P = do
isRec <- checkRec
defns <- semiSep1 localDefn_P
reserved "in"
ex <- lexeme expr_P
return (ELet isRec defns ex)
where
checkRec
= (try (reserved "letrec") >> return True)
<|> (reserved "let" >> return False) | 257 | false | true | 4 | 9 | 77 | 119 | 51 | 68 | null | null |
vollmerm/shallow-fission | Data/Array/Accelerate/Fission.hs | bsd-3-clause | dosplit :: (A.Slice sh,Shape sh,Elt a)
=> DimId
-> A.Acc (Array (sh A.:. Int) a)
-> TuneM ( A.Acc (Array (sh A.:. Int) a),
A.Acc (Array (sh A.:. Int) a))
dosplit _dimid arr = return (arr1, arr2)
where arrTl = A.indexTail $ A.shape arr
arrHd = A.indexHead $ A.shap... | 1,567 | dosplit :: (A.Slice sh,Shape sh,Elt a)
=> DimId
-> A.Acc (Array (sh A.:. Int) a)
-> TuneM ( A.Acc (Array (sh A.:. Int) a),
A.Acc (Array (sh A.:. Int) a))
dosplit _dimid arr = return (arr1, arr2)
where arrTl = A.indexTail $ A.shape arr
arrHd = A.indexHead $ A.shap... | 1,567 | dosplit _dimid arr = return (arr1, arr2)
where arrTl = A.indexTail $ A.shape arr
arrHd = A.indexHead $ A.shape arr
(chunk, leftover) = arrHd `quotRem` 2
arr1Sh = arrTl :. chunk
arr2Sh = arrTl :. (chunk + leftover)
adjust i = let t = A.indexTail i
... | 1,370 | false | true | 0 | 14 | 716 | 343 | 184 | 159 | null | null |
themattchan/tandoori | input/class-list.hs | bsd-3-clause | testNum = map (\ x -> x + 1) | 28 | testNum = map (\ x -> x + 1) | 28 | testNum = map (\ x -> x + 1) | 28 | false | false | 1 | 8 | 8 | 25 | 11 | 14 | null | null |
sopvop/cabal | cabal-install/Distribution/Solver/Modular/PSQ.hs | bsd-3-clause | degree (PSQ _) = Other | 27 | degree (PSQ _) = Other | 27 | degree (PSQ _) = Other | 27 | false | false | 0 | 7 | 9 | 15 | 7 | 8 | null | null |
kgadek/mbank_analyser | test.hs | gpl-3.0 | -- Nagłówek pliku .cvs zawiera dodatkowe informacje w postaci:
-- #Klucz
-- wartość
parseHeaderData :: T.Text -> AT.Parser [T.Text]
parseHeaderData name = do
AT.string name
AT.takeWhile AT.isEndOfLine
res <- readValues
AT.takeWhile AT.isEndOfLine
return res
---- #Data operacji; #Data księgowani... | 995 | parseHeaderData :: T.Text -> AT.Parser [T.Text]
parseHeaderData name = do
AT.string name
AT.takeWhile AT.isEndOfLine
res <- readValues
AT.takeWhile AT.isEndOfLine
return res
---- #Data operacji; #Data księgowania; #Opis operacji; #Tytuł; #Nadawca/Odbiorca; ... | 907 | parseHeaderData name = do
AT.string name
AT.takeWhile AT.isEndOfLine
res <- readValues
AT.takeWhile AT.isEndOfLine
return res
---- #Data operacji; #Data księgowania; #Opis operacji; #Tytuł; #Nadawca/Odbiorca; #Numer konta; #Kwota; #... | 859 | true | true | 0 | 8 | 343 | 83 | 43 | 40 | null | null |
mightymoose/liquidhaskell | benchmarks/bytestring-0.9.2.1/Data/ByteString/Lazy.hs | bsd-3-clause | --TODO: use a better implementation
-- ---------------------------------------------------------------------
-- Searching for substrings
-- | /O(n)/ The 'isPrefixOf' function takes two ByteStrings and returns 'True'
-- iff the first is a prefix of the second.
{-@ isPrefixOf :: ByteString -> ByteString -> Bool @-}
isP... | 390 | isPrefixOf :: ByteString -> ByteString -> Bool
isPrefixOf Empty _ = True | 73 | isPrefixOf Empty _ = True | 26 | true | true | 0 | 8 | 56 | 36 | 19 | 17 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | genericIntSubCOp :: GenericOp
genericIntSubCOp [res_r, res_c] [aa, bb]
{- Similarly:
#define subIntCzh(r,c,a,b) \
{ r = ((I_)(a)) - ((I_)(b)); \
c = ((StgWord)((((I_)(a))^((I_)(b))) & (((I_)(a))^r))) \
>> (BITS_IN (I_) - 1); ... | 908 | genericIntSubCOp :: GenericOp
genericIntSubCOp [res_r, res_c] [aa, bb]
{- Similarly:
#define subIntCzh(r,c,a,b) \
{ r = ((I_)(a)) - ((I_)(b)); \
c = ((StgWord)((((I_)(a))^((I_)(b))) & (((I_)(a))^r))) \
>> (BITS_IN (I_) - 1); ... | 908 | genericIntSubCOp [res_r, res_c] [aa, bb]
{- Similarly:
#define subIntCzh(r,c,a,b) \
{ r = ((I_)(a)) - ((I_)(b)); \
c = ((StgWord)((((I_)(a))^((I_)(b))) & (((I_)(a))^r))) \
>> (BITS_IN (I_) - 1); \
... | 878 | false | true | 0 | 19 | 357 | 188 | 97 | 91 | null | null |
mariefarrell/Hets | OMDoc/XmlInterface.hs | gpl-2.0 | mkElement :: QName -> [Attr] -> [Content] -> Content
mkElement qn atts elems = Elem $ Element qn atts elems Nothing | 115 | mkElement :: QName -> [Attr] -> [Content] -> Content
mkElement qn atts elems = Elem $ Element qn atts elems Nothing | 115 | mkElement qn atts elems = Elem $ Element qn atts elems Nothing | 62 | false | true | 0 | 8 | 20 | 49 | 25 | 24 | null | null |
sdiehl/llvm-codegen | src/LLVM/Codegen/Module.hs | mit | -- | Produce a reference to an LLVM intrinsic.
llintrinsic :: Definition -> LLVM Name
llintrinsic intr = addDefn intr >> return (globalName intr) | 145 | llintrinsic :: Definition -> LLVM Name
llintrinsic intr = addDefn intr >> return (globalName intr) | 98 | llintrinsic intr = addDefn intr >> return (globalName intr) | 59 | true | true | 0 | 8 | 23 | 42 | 19 | 23 | null | null |
vTurbine/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | proxyPrimTyConKey :: Unique
proxyPrimTyConKey = mkPreludeTyConUnique 176 | 72 | proxyPrimTyConKey :: Unique
proxyPrimTyConKey = mkPreludeTyConUnique 176 | 72 | proxyPrimTyConKey = mkPreludeTyConUnique 176 | 44 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
holzensp/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitPrimOp _ res PrefetchMutableByteArrayOp1 args = doPrefetchByteArrayOp 1 res args | 84 | emitPrimOp _ res PrefetchMutableByteArrayOp1 args = doPrefetchByteArrayOp 1 res args | 84 | emitPrimOp _ res PrefetchMutableByteArrayOp1 args = doPrefetchByteArrayOp 1 res args | 84 | false | false | 0 | 5 | 9 | 22 | 10 | 12 | null | null |
Mahdi89/eTeak | src/Misc.hs | bsd-3-clause | showSomeList :: (a -> String) -> ([String] -> String) -> Some a -> String
showSomeList showLocal _ (One link) = showLocal link | 130 | showSomeList :: (a -> String) -> ([String] -> String) -> Some a -> String
showSomeList showLocal _ (One link) = showLocal link | 126 | showSomeList showLocal _ (One link) = showLocal link | 52 | false | true | 0 | 9 | 25 | 59 | 30 | 29 | null | null |
drhodes/jade2hdl | rawr/src/Rawr/Note.hs | bsd-3-clause | dropNotes xs = filter (not . isNote) xs | 39 | dropNotes xs = filter (not . isNote) xs | 39 | dropNotes xs = filter (not . isNote) xs | 39 | false | false | 0 | 7 | 7 | 21 | 10 | 11 | null | null |
ancientlanguage/haskell-analysis | grammar/src/Grammar/Common/Decompose.hs | mit | decomposeChar '\xFA62' = "\x8B01" | 33 | decomposeChar '\xFA62' = "\x8B01" | 33 | decomposeChar '\xFA62' = "\x8B01" | 33 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
jeremyjh/distributed-process-zookeeper | examples/Boss.hs | bsd-3-clause | workLoop :: Process ()
workLoop =
do work <- expect :: Process String
case take 4 work of
"stop" ->
say "No more work for me!"
_ ->
do say $ "Doing task: " ++ work
workLoop | 228 | workLoop :: Process ()
workLoop =
do work <- expect :: Process String
case take 4 work of
"stop" ->
say "No more work for me!"
_ ->
do say $ "Doing task: " ++ work
workLoop | 228 | workLoop =
do work <- expect :: Process String
case take 4 work of
"stop" ->
say "No more work for me!"
_ ->
do say $ "Doing task: " ++ work
workLoop | 205 | false | true | 0 | 13 | 92 | 70 | 32 | 38 | null | null |
romanb/amazonka | amazonka-rds/gen/Network/AWS/RDS/DescribeCertificates.hs | mpl-2.0 | -- | The maximum number of records to include in the response. If more records
-- exist than the specified 'MaxRecords' value, a pagination token called a marker
-- is included in the response so that the remaining results can be retrieved.
--
-- Default: 100
--
-- Constraints: Minimum 20, maximum 100
dcMaxRecords :: L... | 425 | dcMaxRecords :: Lens' DescribeCertificates (Maybe Int)
dcMaxRecords = lens _dcMaxRecords (\s a -> s { _dcMaxRecords = a }) | 122 | dcMaxRecords = lens _dcMaxRecords (\s a -> s { _dcMaxRecords = a }) | 67 | true | true | 1 | 9 | 71 | 57 | 31 | 26 | null | null |
robeverest/accelerate | Data/Array/Accelerate/Trafo.hs | bsd-3-clause | convertAccWith :: Arrays arrs => Phase -> Acc arrs -> AST.Acc arrs
convertAccWith ok acc
= Fusion.fuseAcc `when` enableAccFusion
$ Rewrite.convertSegments `when` convertOffsetOfSegment
$ Sharing.convertAcc (recoverAccSharing ok) (recoverExpSharing ok) (floatOutAccFromExp ok) acc
where
when f phase
... | 492 | convertAccWith :: Arrays arrs => Phase -> Acc arrs -> AST.Acc arrs
convertAccWith ok acc
= Fusion.fuseAcc `when` enableAccFusion
$ Rewrite.convertSegments `when` convertOffsetOfSegment
$ Sharing.convertAcc (recoverAccSharing ok) (recoverExpSharing ok) (floatOutAccFromExp ok) acc
where
when f phase
... | 492 | convertAccWith ok acc
= Fusion.fuseAcc `when` enableAccFusion
$ Rewrite.convertSegments `when` convertOffsetOfSegment
$ Sharing.convertAcc (recoverAccSharing ok) (recoverExpSharing ok) (floatOutAccFromExp ok) acc
where
when f phase
| phase ok = f
| otherwise = id
-- | Con... | 425 | false | true | 4 | 9 | 111 | 129 | 62 | 67 | null | null |
DominikDitoIvosevic/Uni | IRG/src/Irg/Lab1/Bresenham.hs | mit | bresenham :: (Num a, Ord a) => (a, a) -> (a, a) -> [(a, a)]
bresenham pa@(xa,ya) pb@(xb,yb) = map maySwitch . unfoldr go $ (x1,y1,0)
where
steep = abs (yb - ya) > abs (xb - xa)
maySwitch = if steep then (\(x,y) -> (y,x)) else id
[(x1,y1),(x2,y2)] = sort [maySwitch pa, maySwitch pb]
deltax = x2 - x1
... | 740 | bresenham :: (Num a, Ord a) => (a, a) -> (a, a) -> [(a, a)]
bresenham pa@(xa,ya) pb@(xb,yb) = map maySwitch . unfoldr go $ (x1,y1,0)
where
steep = abs (yb - ya) > abs (xb - xa)
maySwitch = if steep then (\(x,y) -> (y,x)) else id
[(x1,y1),(x2,y2)] = sort [maySwitch pa, maySwitch pb]
deltax = x2 - x1
... | 740 | bresenham pa@(xa,ya) pb@(xb,yb) = map maySwitch . unfoldr go $ (x1,y1,0)
where
steep = abs (yb - ya) > abs (xb - xa)
maySwitch = if steep then (\(x,y) -> (y,x)) else id
[(x1,y1),(x2,y2)] = sort [maySwitch pa, maySwitch pb]
deltax = x2 - x1
deltay = abs (y2 - y1)
ystep = if y1 < y2 then 1 else ... | 680 | false | true | 2 | 10 | 244 | 375 | 212 | 163 | null | null |
hsyl20/HViperVM | lib/ViperVM/Library/OpenCL/FloatMatrixSub.hs | lgpl-3.0 | config :: [CLKernelParameter] -> KernelConfiguration
config pms = KernelConfiguration gDim lDim pms
where
[CLUIntParam width, CLUIntParam height,_,_,_,_,_,_,_,_,_] = pms
gDim = [roundTo 16 width, roundTo 16 height,1]
lDim = [16,16,1] | 254 | config :: [CLKernelParameter] -> KernelConfiguration
config pms = KernelConfiguration gDim lDim pms
where
[CLUIntParam width, CLUIntParam height,_,_,_,_,_,_,_,_,_] = pms
gDim = [roundTo 16 width, roundTo 16 height,1]
lDim = [16,16,1] | 254 | config pms = KernelConfiguration gDim lDim pms
where
[CLUIntParam width, CLUIntParam height,_,_,_,_,_,_,_,_,_] = pms
gDim = [roundTo 16 width, roundTo 16 height,1]
lDim = [16,16,1] | 201 | false | true | 0 | 6 | 50 | 118 | 65 | 53 | null | null |
greydot/iproute | Data/IP/RouteTable/Internal.hs | bsd-3-clause | intToTBitIPv6 :: Int -> IPv6
intToTBitIPv6 len = IP6 (intToTBitsIPv6 ! len) | 75 | intToTBitIPv6 :: Int -> IPv6
intToTBitIPv6 len = IP6 (intToTBitsIPv6 ! len) | 75 | intToTBitIPv6 len = IP6 (intToTBitsIPv6 ! len) | 46 | false | true | 0 | 7 | 11 | 28 | 14 | 14 | null | null |
brendanhay/gogol | gogol-partners/gen/Network/Google/Partners/Types/Product.hs | mpl-2.0 | -- | Advertiser lead information.
luerLead :: Lens' LogUserEventRequest (Maybe Lead)
luerLead = lens _luerLead (\ s a -> s{_luerLead = a}) | 138 | luerLead :: Lens' LogUserEventRequest (Maybe Lead)
luerLead = lens _luerLead (\ s a -> s{_luerLead = a}) | 104 | luerLead = lens _luerLead (\ s a -> s{_luerLead = a}) | 53 | true | true | 0 | 9 | 21 | 46 | 25 | 21 | null | null |
Alexander-Ignatyev/astro | src/Data/Astro/Effects/Nutation.hs | bsd-3-clause | -- | It takes a number of centuries and returns the Sun's mean longitude in radians
sunMeanLongutude :: Double -> Double
sunMeanLongutude t =
let a = 100.002136 * t
in U.toRadians $ U.reduceToZeroRange 360 $ 279.6967 + 360 * (a - int a) | 240 | sunMeanLongutude :: Double -> Double
sunMeanLongutude t =
let a = 100.002136 * t
in U.toRadians $ U.reduceToZeroRange 360 $ 279.6967 + 360 * (a - int a) | 156 | sunMeanLongutude t =
let a = 100.002136 * t
in U.toRadians $ U.reduceToZeroRange 360 $ 279.6967 + 360 * (a - int a) | 119 | true | true | 0 | 12 | 47 | 67 | 33 | 34 | null | null |
DM2014/pre-homework | src/main.hs | mit | filterUnknown :: Conduit Product (ResourceT IO) Product
filterUnknown = do
p <- await
case p of
Just (Product "unknown" _) -> filterUnknown
Just (Product _ "unknown") -> filterUnknown
Just (Product u p) -> yield (Product u p) >> filterUnknown
Nothing -> return () | 303 | filterUnknown :: Conduit Product (ResourceT IO) Product
filterUnknown = do
p <- await
case p of
Just (Product "unknown" _) -> filterUnknown
Just (Product _ "unknown") -> filterUnknown
Just (Product u p) -> yield (Product u p) >> filterUnknown
Nothing -> return () | 303 | filterUnknown = do
p <- await
case p of
Just (Product "unknown" _) -> filterUnknown
Just (Product _ "unknown") -> filterUnknown
Just (Product u p) -> yield (Product u p) >> filterUnknown
Nothing -> return () | 247 | false | true | 0 | 13 | 82 | 115 | 54 | 61 | null | null |
alekar/hugs | packages/base/Data/Map.hs | bsd-3-clause | intersection :: Ord k => Map k a -> Map k b -> Map k a
intersection m1 m2
= intersectionWithKey (\k x y -> x) m1 m2 | 117 | intersection :: Ord k => Map k a -> Map k b -> Map k a
intersection m1 m2
= intersectionWithKey (\k x y -> x) m1 m2 | 117 | intersection m1 m2
= intersectionWithKey (\k x y -> x) m1 m2 | 62 | false | true | 0 | 8 | 29 | 65 | 31 | 34 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | action_585 (156#) = happyShift action_50 | 40 | action_585 (156#) = happyShift action_50 | 40 | action_585 (156#) = happyShift action_50 | 40 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
spechub/Hets | CspCASLProver/CspProverConsts.hs | gpl-2.0 | -- | DIV primitive process symbol
cspProver_divS :: String
cspProver_divS = "DIV" | 81 | cspProver_divS :: String
cspProver_divS = "DIV" | 47 | cspProver_divS = "DIV" | 22 | true | true | 0 | 4 | 11 | 12 | 7 | 5 | null | null |
ppetr/functional-data-structures | FIFO.hs | bsd-2-clause | -- * internal helpers
-- | An internal helper (smart constructor) that maintains the required
-- invariant. If the 'front' becomes empty, replace it with the reversed 'rear'.
--
-- Credit counting: If maintaining the invariant requires reversing 'rear', we
-- discharge all the credits to pay for the operation. At the ... | 488 | fifo :: [a] -> [a] -> FIFO a
fifo [] r = FIFO (reverse r) [] | 60 | fifo [] r = FIFO (reverse r) [] | 31 | true | true | 0 | 7 | 86 | 56 | 32 | 24 | null | null |
brendanhay/gogol | gogol-manufacturers/gen/Network/Google/Manufacturers/Types/Product.hs | mpl-2.0 | -- | The numeric value of the capacity.
capValue :: Lens' Capacity (Maybe Int64)
capValue
= lens _capValue (\ s a -> s{_capValue = a}) .
mapping _Coerce | 160 | capValue :: Lens' Capacity (Maybe Int64)
capValue
= lens _capValue (\ s a -> s{_capValue = a}) .
mapping _Coerce | 120 | capValue
= lens _capValue (\ s a -> s{_capValue = a}) .
mapping _Coerce | 79 | true | true | 2 | 9 | 35 | 62 | 28 | 34 | null | null |
GaloisInc/halvm-ghc | compiler/ghci/ByteCodeAsm.hs | bsd-3-clause | -- -----------------------------------------------------------------------------
-- Unlinked BCOs
-- CompiledByteCode represents the result of byte-code
-- compiling a bunch of functions and data types
-- | Finds external references. Remember to remove the names
-- defined by this group of BCOs themselves
bcoFreeNam... | 1,227 | bcoFreeNames :: UnlinkedBCO -> NameSet
bcoFreeNames bco
= bco_refs bco `minusNameSet` mkNameSet [unlinkedBCOName bco]
where
bco_refs (UnlinkedBCO _ _ _ _ nonptrs ptrs)
= unionNameSets (
mkNameSet [ n | BCOPtrName n <- ssElts ptrs ] :
mkNameSet [ n | BCONPtrItbl n <- ssElts nonp... | 917 | bcoFreeNames bco
= bco_refs bco `minusNameSet` mkNameSet [unlinkedBCOName bco]
where
bco_refs (UnlinkedBCO _ _ _ _ nonptrs ptrs)
= unionNameSets (
mkNameSet [ n | BCOPtrName n <- ssElts ptrs ] :
mkNameSet [ n | BCONPtrItbl n <- ssElts nonptrs ] :
map bco_refs [ bco... | 878 | true | true | 0 | 13 | 254 | 153 | 81 | 72 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2017/M09/D04/Exercise.hs | mit | sourceDocumentRoot :: URL
sourceDocumentRoot = "https://github.com/geophf/1HaskellADay/blob/master/exercises/HAD/Y2017/M09/D04/articles/" | 137 | sourceDocumentRoot :: URL
sourceDocumentRoot = "https://github.com/geophf/1HaskellADay/blob/master/exercises/HAD/Y2017/M09/D04/articles/" | 137 | sourceDocumentRoot = "https://github.com/geophf/1HaskellADay/blob/master/exercises/HAD/Y2017/M09/D04/articles/" | 111 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
coghex/abridgefaraway | src/GLUtil/Font.hs | bsd-3-clause | findLetter SMFONT '5' = (71, 12) | 33 | findLetter SMFONT '5' = (71, 12) | 33 | findLetter SMFONT '5' = (71, 12) | 33 | false | false | 0 | 5 | 6 | 19 | 9 | 10 | null | null |
alosich/language-java | Language/Java/Parser.hs | bsd-3-clause | period = tok Period | 22 | period = tok Period | 22 | period = tok Period | 22 | false | false | 0 | 5 | 6 | 9 | 4 | 5 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F07.hs | bsd-3-clause | ptr_glEndConditionalRenderNVX :: FunPtr (IO ())
ptr_glEndConditionalRenderNVX = unsafePerformIO $ getCommand "glEndConditionalRenderNVX" | 136 | ptr_glEndConditionalRenderNVX :: FunPtr (IO ())
ptr_glEndConditionalRenderNVX = unsafePerformIO $ getCommand "glEndConditionalRenderNVX" | 136 | ptr_glEndConditionalRenderNVX = unsafePerformIO $ getCommand "glEndConditionalRenderNVX" | 88 | false | true | 0 | 8 | 10 | 29 | 14 | 15 | null | null |
merijn/GPU-benchmarks | process-tools/ProcessTools.hs | gpl-3.0 | unexpectedTermination :: CreateProcess -> ExitCode -> UnexpectedTermination
unexpectedTermination p = UnexpectedTermination . ProcessExitedUnsuccessfully p | 155 | unexpectedTermination :: CreateProcess -> ExitCode -> UnexpectedTermination
unexpectedTermination p = UnexpectedTermination . ProcessExitedUnsuccessfully p | 155 | unexpectedTermination p = UnexpectedTermination . ProcessExitedUnsuccessfully p | 79 | false | true | 0 | 6 | 13 | 29 | 14 | 15 | null | null |
brendanhay/gogol | gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs | mpl-2.0 | -- | Maximum number of business days spent before an order is shipped. 0
-- means same day shipped, 1 means next day shipped. Must be greater than
-- or equal to \`minHandlingTimeInDays\`.
dtMaxHandlingTimeInDays :: Lens' DeliveryTime (Maybe Word32)
dtMaxHandlingTimeInDays
= lens _dtMaxHandlingTimeInDays
(\ s a... | 380 | dtMaxHandlingTimeInDays :: Lens' DeliveryTime (Maybe Word32)
dtMaxHandlingTimeInDays
= lens _dtMaxHandlingTimeInDays
(\ s a -> s{_dtMaxHandlingTimeInDays = a})
. mapping _Coerce | 191 | dtMaxHandlingTimeInDays
= lens _dtMaxHandlingTimeInDays
(\ s a -> s{_dtMaxHandlingTimeInDays = a})
. mapping _Coerce | 130 | true | true | 0 | 10 | 66 | 57 | 30 | 27 | null | null |
ocramz/sparse-linear-algebra | test/LibSpec.hs | gpl-3.0 | -- tvc4 : unknown to be found
tvc4 = vc [1:+3,2:+2,1:+9] | 56 | tvc4 = vc [1:+3,2:+2,1:+9] | 26 | tvc4 = vc [1:+3,2:+2,1:+9] | 26 | true | false | 1 | 6 | 10 | 34 | 17 | 17 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.