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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
upsoft/bond | compiler/src/Language/Bond/Lexer.hs | mit | lexeme = P.lexeme lexer | 28 | lexeme = P.lexeme lexer | 28 | lexeme = P.lexeme lexer | 28 | false | false | 0 | 6 | 8 | 11 | 5 | 6 | null | null |
danr/hipspec | examples/old-examples/hip/ProductiveUseOfFailure.hs | gpl-3.0 | prop_T26 :: Nat -> Nat -> Prop Nat
prop_T26 x y = half (x + y) =:= half (y + x) | 82 | prop_T26 :: Nat -> Nat -> Prop Nat
prop_T26 x y = half (x + y) =:= half (y + x) | 82 | prop_T26 x y = half (x + y) =:= half (y + x) | 47 | false | true | 0 | 8 | 23 | 55 | 26 | 29 | null | null |
maoe/fop | 12-Fun-with-Phantom-Types/Type.hs | bsd-3-clause | eq (RList _) [] [] = True | 47 | eq (RList _) [] [] = True | 47 | eq (RList _) [] [] = True | 47 | false | false | 0 | 7 | 28 | 23 | 11 | 12 | null | null |
Cahu/krpc-hs | src/KRPCHS/UI.hs | gpl-3.0 | getTextLineSpacingStream :: KRPCHS.UI.Text -> RPCContext (KRPCStream (Float))
getTextLineSpacingStream thisArg = requestStream $ getTextLineSpacingStreamReq thisArg | 164 | getTextLineSpacingStream :: KRPCHS.UI.Text -> RPCContext (KRPCStream (Float))
getTextLineSpacingStream thisArg = requestStream $ getTextLineSpacingStreamReq thisArg | 164 | getTextLineSpacingStream thisArg = requestStream $ getTextLineSpacingStreamReq thisArg | 86 | false | true | 0 | 10 | 13 | 44 | 21 | 23 | null | null |
jonpetterbergman/wai-snap | src/Snap/Internal/Parsing.hs | bsd-3-clause | ---------------------------------------
-- application/x-www-form-urlencoded --
---------------------------------------
------------------------------------------------------------------------------
-- | Parses a string encoded in @application/x-www-form-urlencoded@ format.
pars... | 1,581 | parseUrlEncoded :: ByteString -> Map ByteString [ByteString]
parseUrlEncoded s = foldr ins Map.empty decoded
where
--------------------------------------------------------------------------
ins (!k,v) !m = Map.insertWith' (++) k [v] m
---------------------------------------------------------------------... | 1,265 | parseUrlEncoded s = foldr ins Map.empty decoded
where
--------------------------------------------------------------------------
ins (!k,v) !m = Map.insertWith' (++) k [v] m
--------------------------------------------------------------------------
parts :: [(ByteString,ByteString)]
parts = map ... | 1,204 | true | true | 1 | 12 | 346 | 320 | 169 | 151 | null | null |
input-output-hk/pos-haskell-prototype | binary/test/Test/Pos/Cbor/RefImpl.hs | mit | prop_halfToFromFloat :: Property
prop_halfToFromFloat =
conjoin . map roundTrip
. filter (not . isNaN . Half.Half)
$ [minBound..maxBound]
where
roundTrip w =
w === (Half.getHalf . Half.toHalf . Half.fromHalf . Half.Half $ w) | 264 | prop_halfToFromFloat :: Property
prop_halfToFromFloat =
conjoin . map roundTrip
. filter (not . isNaN . Half.Half)
$ [minBound..maxBound]
where
roundTrip w =
w === (Half.getHalf . Half.toHalf . Half.fromHalf . Half.Half $ w) | 264 | prop_halfToFromFloat =
conjoin . map roundTrip
. filter (not . isNaN . Half.Half)
$ [minBound..maxBound]
where
roundTrip w =
w === (Half.getHalf . Half.toHalf . Half.fromHalf . Half.Half $ w) | 231 | false | true | 6 | 9 | 72 | 103 | 47 | 56 | null | null |
beni55/haste-compiler | libraries/haste-lib/src/Haste/App/Concurrent.hs | bsd-3-clause | -- | Read the value of an MVar. If the MVar is empty, @takeMVar@ blocks until
-- a value arrives. @takeMVar@ empties the MVar.
takeMVar :: C.MVar a -> Client a
takeMVar = liftCIO . C.takeMVar | 193 | takeMVar :: C.MVar a -> Client a
takeMVar = liftCIO . C.takeMVar | 64 | takeMVar = liftCIO . C.takeMVar | 31 | true | true | 1 | 8 | 37 | 38 | 17 | 21 | null | null |
sdiehl/ghc | hadrian/src/Rules/Generate.hs | bsd-3-clause | derivedConstantsFiles :: [FilePath]
derivedConstantsFiles =
[ "DerivedConstants.h"
, "GHCConstantsHaskellExports.hs"
, "GHCConstantsHaskellType.hs"
, "GHCConstantsHaskellWrappers.hs" ] | 200 | derivedConstantsFiles :: [FilePath]
derivedConstantsFiles =
[ "DerivedConstants.h"
, "GHCConstantsHaskellExports.hs"
, "GHCConstantsHaskellType.hs"
, "GHCConstantsHaskellWrappers.hs" ] | 200 | derivedConstantsFiles =
[ "DerivedConstants.h"
, "GHCConstantsHaskellExports.hs"
, "GHCConstantsHaskellType.hs"
, "GHCConstantsHaskellWrappers.hs" ] | 164 | false | true | 0 | 5 | 29 | 26 | 16 | 10 | null | null |
hackern/halfs | Halfs/CoreAPI.hs | bsd-3-clause | flush :: (HalfsCapable b t r l m) =>
FileHandle r l -> HalfsM b r l m ()
flush _fh = lift . bdFlush =<< hasks hsBlockDev | 129 | flush :: (HalfsCapable b t r l m) =>
FileHandle r l -> HalfsM b r l m ()
flush _fh = lift . bdFlush =<< hasks hsBlockDev | 129 | flush _fh = lift . bdFlush =<< hasks hsBlockDev | 47 | false | true | 0 | 8 | 36 | 64 | 31 | 33 | null | null |
ku-fpg/ecc-ldpc-accelerate | src/ECC/Code/LDPC/Accelerate.hs | bsd-2-clause | compareWith' msg a b =
if L.and [abs(a-b) < (0.01 :: Double) | (a,b) <- as `zip` bs ]
then a
else error $ "compare failed for " ++ msg ++ show (length as, length bs, as,bs)
where
as = A.toList (run a)
bs = U.toList b | 258 | compareWith' msg a b =
if L.and [abs(a-b) < (0.01 :: Double) | (a,b) <- as `zip` bs ]
then a
else error $ "compare failed for " ++ msg ++ show (length as, length bs, as,bs)
where
as = A.toList (run a)
bs = U.toList b | 258 | compareWith' msg a b =
if L.and [abs(a-b) < (0.01 :: Double) | (a,b) <- as `zip` bs ]
then a
else error $ "compare failed for " ++ msg ++ show (length as, length bs, as,bs)
where
as = A.toList (run a)
bs = U.toList b | 258 | false | false | 1 | 11 | 88 | 131 | 69 | 62 | null | null |
blender/Rome | src/Engine/Downloading.hs | mit | getAndUnzipDSYMWithEngine
:: FilePath -- ^ The `FilePath` to the engine
-> InvertedRepositoryMap -- ^ The map used to resolve from a `FrameworkVersion` to the path of the dSYM in the cache
-> FrameworkVersion -- ^ The `FrameworkVersion` identifying the dSYM
-> TargetPlatform -- ^ The `TargetPlatform` to limit t... | 935 | getAndUnzipDSYMWithEngine
:: FilePath -- ^ The `FilePath` to the engine
-> InvertedRepositoryMap -- ^ The map used to resolve from a `FrameworkVersion` to the path of the dSYM in the cache
-> FrameworkVersion -- ^ The `FrameworkVersion` identifying the dSYM
-> TargetPlatform -- ^ The `TargetPlatform` to limit t... | 935 | getAndUnzipDSYMWithEngine enginePath reverseRomeMap fVersion@(FrameworkVersion f@(Framework fwn _ fwps) version) platform tmpDir
= when (platform `elem` fwps) $ do
(_, verbose, _) <- ask
dSYMBinary <- getDSYMFromEngine enginePath reverseRomeMap fVersion platform tmpDir
deleteDSYMDirectory fVersion pl... | 478 | false | true | 9 | 7 | 159 | 166 | 93 | 73 | null | null |
fryguybob/LaTeXGrapher | src/LaTeXGrapher/Repl.hs | bsd-3-clause | replContext :: Context -> IO ()
replContext c = do putStrLn "Context loaded. Enter \":q\" to quit."
replC c | 126 | replContext :: Context -> IO ()
replContext c = do putStrLn "Context loaded. Enter \":q\" to quit."
replC c | 126 | replContext c = do putStrLn "Context loaded. Enter \":q\" to quit."
replC c | 94 | false | true | 0 | 8 | 37 | 40 | 16 | 24 | null | null |
freizl/hoauth2 | hoauth2-example/src/Utils.hs | bsd-3-clause | parseValue (Just a) = case Aeson.fromJSON a of
Aeson.Error _ -> Nothing
Aeson.Success b -> Just b | 101 | parseValue (Just a) = case Aeson.fromJSON a of
Aeson.Error _ -> Nothing
Aeson.Success b -> Just b | 101 | parseValue (Just a) = case Aeson.fromJSON a of
Aeson.Error _ -> Nothing
Aeson.Success b -> Just b | 101 | false | false | 3 | 7 | 20 | 47 | 22 | 25 | null | null |
jeffreyrosenbluth/flourine | src/Fluorine/HTML/Events.hs | bsd-3-clause | onReset :: (Event () -> EventHandler i) -> H.Attr i
onReset = H.handler (H.eventName "reset") | 93 | onReset :: (Event () -> EventHandler i) -> H.Attr i
onReset = H.handler (H.eventName "reset") | 93 | onReset = H.handler (H.eventName "reset") | 41 | false | true | 0 | 10 | 14 | 53 | 24 | 29 | null | null |
ssonal/haskell-experiments | haskell.hs | mit | sayMe 3 = "Three" | 17 | sayMe 3 = "Three" | 17 | sayMe 3 = "Three" | 17 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
ekmett/ghc | ghc/Main.hs | bsd-3-clause | -- ghc --abi-hash
doMkDependHSMode, doMakeMode, doInteractiveMode, doAbiHashMode :: Mode
doMkDependHSMode = mkPostLoadMode DoMkDependHS | 136 | doMkDependHSMode, doMakeMode, doInteractiveMode, doAbiHashMode :: Mode
doMkDependHSMode = mkPostLoadMode DoMkDependHS | 117 | doMkDependHSMode = mkPostLoadMode DoMkDependHS | 46 | true | true | 0 | 5 | 13 | 21 | 14 | 7 | null | null |
tolysz/yesod | yesod-persistent/Yesod/Persist/Core.hs | mit | getBy404 key = do
mres <- getBy key
case mres of
Nothing -> notFound'
Just res -> return res
-- | Create a new record in the database, returning an automatically
-- created key, or raise a 400 bad request if a uniqueness constraint
-- is violated.
--
-- @since 1.4.1
#if MIN_VERSION_persistent(2... | 325 | getBy404 key = do
mres <- getBy key
case mres of
Nothing -> notFound'
Just res -> return res
-- | Create a new record in the database, returning an automatically
-- created key, or raise a 400 bad request if a uniqueness constraint
-- is violated.
--
-- @since 1.4.1
#if MIN_VERSION_persistent(2... | 325 | getBy404 key = do
mres <- getBy key
case mres of
Nothing -> notFound'
Just res -> return res
-- | Create a new record in the database, returning an automatically
-- created key, or raise a 400 bad request if a uniqueness constraint
-- is violated.
--
-- @since 1.4.1
#if MIN_VERSION_persistent(2... | 325 | false | false | 1 | 11 | 77 | 54 | 25 | 29 | null | null |
beni55/pandoc-types | Text/Pandoc/Builder.hs | gpl-2.0 | linebreak :: Inlines
linebreak = inline LineBreak | 49 | linebreak :: Inlines
linebreak = inline LineBreak | 49 | linebreak = inline LineBreak | 28 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
ezyang/ghc | compiler/iface/ToIface.hs | bsd-3-clause | ---------------------
toIfaceAlt :: (AltCon, [Var], CoreExpr)
-> (IfaceConAlt, [FastString], IfaceExpr)
toIfaceAlt (c,bs,r) = (toIfaceCon c, map getOccFS bs, toIfaceExpr r) | 183 | toIfaceAlt :: (AltCon, [Var], CoreExpr)
-> (IfaceConAlt, [FastString], IfaceExpr)
toIfaceAlt (c,bs,r) = (toIfaceCon c, map getOccFS bs, toIfaceExpr r) | 161 | toIfaceAlt (c,bs,r) = (toIfaceCon c, map getOccFS bs, toIfaceExpr r) | 68 | true | true | 0 | 7 | 30 | 72 | 42 | 30 | null | null |
haslab/SecreC | src/Language/SecreC/TypeChecker/Expression.hs | gpl-3.0 | andExprsLoc :: Location loc => [Expression iden (Typed loc)] -> Expression iden (Typed loc)
andExprsLoc [] = fmap (Typed noloc) trueExpr | 136 | andExprsLoc :: Location loc => [Expression iden (Typed loc)] -> Expression iden (Typed loc)
andExprsLoc [] = fmap (Typed noloc) trueExpr | 136 | andExprsLoc [] = fmap (Typed noloc) trueExpr | 44 | false | true | 0 | 11 | 20 | 68 | 31 | 37 | null | null |
mettekou/ghc | compiler/nativeGen/PIC.hs | bsd-3-clause | howToAccessLabel dflags _ os this_mod _ lbl
| osElfTarget os
= if labelDynamic dflags (thisPackage dflags) this_mod lbl
then AccessViaSymbolPtr
else AccessDirectly | 203 | howToAccessLabel dflags _ os this_mod _ lbl
| osElfTarget os
= if labelDynamic dflags (thisPackage dflags) this_mod lbl
then AccessViaSymbolPtr
else AccessDirectly | 203 | howToAccessLabel dflags _ os this_mod _ lbl
| osElfTarget os
= if labelDynamic dflags (thisPackage dflags) this_mod lbl
then AccessViaSymbolPtr
else AccessDirectly | 203 | false | false | 0 | 9 | 61 | 51 | 24 | 27 | null | null |
joranvar/GoogleCodeJam | Y2014/R1C/ATest.hs | gpl-3.0 | test_solve1 = assertEqual (Generations 1) $ solve $ Problem (1%2) | 65 | test_solve1 = assertEqual (Generations 1) $ solve $ Problem (1%2) | 65 | test_solve1 = assertEqual (Generations 1) $ solve $ Problem (1%2) | 65 | false | false | 0 | 9 | 9 | 33 | 16 | 17 | null | null |
energyflowanalysis/efa-2.1 | demo/sliceSignals/Demo_sliceSignals.hs | bsd-3-clause | --------------------------------------------------
t5 :: String
t5 = "only one middle Point" | 93 | t5 :: String
t5 = "only one middle Point" | 41 | t5 = "only one middle Point" | 28 | true | true | 0 | 6 | 10 | 19 | 8 | 11 | null | null |
cmoresid/lightning-haskell | src/Web/Lightning.hs | bsd-3-clause | handleReceive :: (MonadIO m, Receivable a) => Route
-> LightningState
-> m (Either (APIError LightningError) a)
handleReceive r lstate = do
(res, _, _) <- runAPI (builderFromState lstate) (stConnManager lstate) () $
API.runRoute r
return res
-- | Runs the specified rout... | 384 | handleReceive :: (MonadIO m, Receivable a) => Route
-> LightningState
-> m (Either (APIError LightningError) a)
handleReceive r lstate = do
(res, _, _) <- runAPI (builderFromState lstate) (stConnManager lstate) () $
API.runRoute r
return res
-- | Runs the specified rout... | 384 | handleReceive r lstate = do
(res, _, _) <- runAPI (builderFromState lstate) (stConnManager lstate) () $
API.runRoute r
return res
-- | Runs the specified route and sends the specified JSON value as the the
-- request body. | 232 | false | true | 0 | 12 | 103 | 110 | 55 | 55 | null | null |
siddhanathan/ghc | compiler/hsSyn/HsDecls.hs | bsd-3-clause | famDeclHasCusk _ = True | 23 | famDeclHasCusk _ = True | 23 | famDeclHasCusk _ = True | 23 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
sgord512/Utilities | Util/Unicode.hs | mit | superscriptZero = '\x2070' | 26 | superscriptZero = '\x2070' | 26 | superscriptZero = '\x2070' | 26 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
capitanbatata/functional-systems-in-haskell | fsh-exercises/src/DMR.hs | mit | plus = (+) | 10 | plus = (+) | 10 | plus = (+) | 10 | false | false | 0 | 4 | 2 | 8 | 5 | 3 | null | null |
apoluektov/domino | src/Domino/GameState.hs | mit | updateGameState e@(Opponent, (EMove m)) (GameState stk oh h t es)
= (GameState stk (oh-1) h (makeMove t m) (e:es)) | 118 | updateGameState e@(Opponent, (EMove m)) (GameState stk oh h t es)
= (GameState stk (oh-1) h (makeMove t m) (e:es)) | 118 | updateGameState e@(Opponent, (EMove m)) (GameState stk oh h t es)
= (GameState stk (oh-1) h (makeMove t m) (e:es)) | 118 | false | false | 0 | 9 | 22 | 76 | 40 | 36 | null | null |
tek/proteome | packages/test/test/Proteome/Test/ReplaceTest.hs | mit | replaceChars :: [Text]
replaceChars =
["*", "r"] | 50 | replaceChars :: [Text]
replaceChars =
["*", "r"] | 50 | replaceChars =
["*", "r"] | 27 | false | true | 0 | 5 | 8 | 20 | 12 | 8 | null | null |
ndmitchell/shake | src/Development/Shake/Internal/CompactUI.hs | bsd-3-clause | ddOutput pri msg s = s{sOutput = msg : sOutput s}
| 50 | addOutput pri msg s = s{sOutput = msg : sOutput s} | 50 | addOutput pri msg s = s{sOutput = msg : sOutput s} | 50 | false | false | 1 | 8 | 11 | 37 | 15 | 22 | null | null |
tolysz/vector-algorithms | bench/Main.hs | bsd-3-clause | partialSortSuite :: String -> GenIO -> Int -> Int
-> (MVector RealWorld Int -> Int -> IO ()) -> IO ()
partialSortSuite str g n k sort = sortSuite str g n (\a -> sort a k) | 187 | partialSortSuite :: String -> GenIO -> Int -> Int
-> (MVector RealWorld Int -> Int -> IO ()) -> IO ()
partialSortSuite str g n k sort = sortSuite str g n (\a -> sort a k) | 187 | partialSortSuite str g n k sort = sortSuite str g n (\a -> sort a k) | 68 | false | true | 0 | 14 | 53 | 90 | 44 | 46 | null | null |
d0kt0r0/estuary | server/src/Estuary/Types/EnsembleS.hs | gpl-3.0 | readZones :: EnsembleS -> STM (IntMap.IntMap Definition)
readZones e = readTVar (zones e) >>= mapM readTVar | 107 | readZones :: EnsembleS -> STM (IntMap.IntMap Definition)
readZones e = readTVar (zones e) >>= mapM readTVar | 107 | readZones e = readTVar (zones e) >>= mapM readTVar | 50 | false | true | 2 | 10 | 15 | 51 | 23 | 28 | null | null |
uduki/hsQt | Qtc/Enums/Gui/QComboBox.hs | bsd-2-clause | eAdjustToContents :: SizeAdjustPolicy
eAdjustToContents
= ieSizeAdjustPolicy $ 0 | 82 | eAdjustToContents :: SizeAdjustPolicy
eAdjustToContents
= ieSizeAdjustPolicy $ 0 | 82 | eAdjustToContents
= ieSizeAdjustPolicy $ 0 | 44 | false | true | 2 | 6 | 9 | 23 | 9 | 14 | null | null |
sdiehl/ghc | compiler/GHC/Hs/Utils.hs | bsd-3-clause | mkPatSynBind :: Located RdrName -> HsPatSynDetails (Located RdrName)
-> LPat GhcPs -> HsPatSynDir GhcPs -> HsBind GhcPs
mkPatSynBind name details lpat dir = PatSynBind noExtField psb
where
psb = PSB{ psb_ext = noExtField
, psb_id = name
, psb_args = details
, ps... | 456 | mkPatSynBind :: Located RdrName -> HsPatSynDetails (Located RdrName)
-> LPat GhcPs -> HsPatSynDir GhcPs -> HsBind GhcPs
mkPatSynBind name details lpat dir = PatSynBind noExtField psb
where
psb = PSB{ psb_ext = noExtField
, psb_id = name
, psb_args = details
, ps... | 456 | mkPatSynBind name details lpat dir = PatSynBind noExtField psb
where
psb = PSB{ psb_ext = noExtField
, psb_id = name
, psb_args = details
, psb_def = lpat
, psb_dir = dir }
-- |If any of the matches in the 'FunBind' are infix, the 'FunBind' is
-- considered inf... | 323 | false | true | 0 | 9 | 138 | 104 | 55 | 49 | null | null |
sjakobi/brick | programs/ListViDemo.hs | bsd-3-clause | customAttr :: A.AttrName
customAttr = L.listSelectedAttr <> "custom" | 68 | customAttr :: A.AttrName
customAttr = L.listSelectedAttr <> "custom" | 68 | customAttr = L.listSelectedAttr <> "custom" | 43 | false | true | 0 | 7 | 7 | 26 | 11 | 15 | null | null |
tel/saltine | src/Crypto/Saltine/Core/Password.hs | mit | newSalt :: IO Salt
newSalt = Salt <$> randomByteString Bytes.pwhash_saltbytes | 77 | newSalt :: IO Salt
newSalt = Salt <$> randomByteString Bytes.pwhash_saltbytes | 77 | newSalt = Salt <$> randomByteString Bytes.pwhash_saltbytes | 58 | false | true | 0 | 7 | 9 | 23 | 11 | 12 | null | null |
Mathnerd314/lamdu | src/Lamdu/CodeEdit/ExpressionEdit/ExpressionGui.hs | gpl-3.0 | makeCollapser ::
MonadA m =>
FocusDelegator.Config ->
(Widget.Id -> Collapser m) ->
Widget.Id -> ExprGuiM m (ExpressionGui m)
makeCollapser fdConfig f =
wrapDelegated fdConfig FocusDelegator.NotDelegating $
\myId -> do
let Collapser makeExpanded makeFocusedCompact = f myId
-- TODO: This is just to d... | 750 | makeCollapser ::
MonadA m =>
FocusDelegator.Config ->
(Widget.Id -> Collapser m) ->
Widget.Id -> ExprGuiM m (ExpressionGui m)
makeCollapser fdConfig f =
wrapDelegated fdConfig FocusDelegator.NotDelegating $
\myId -> do
let Collapser makeExpanded makeFocusedCompact = f myId
-- TODO: This is just to d... | 750 | makeCollapser fdConfig f =
wrapDelegated fdConfig FocusDelegator.NotDelegating $
\myId -> do
let Collapser makeExpanded makeFocusedCompact = f myId
-- TODO: This is just to detect whether cursor is in the full
-- expression. Even when it's not displayed, which may be wasteful
-- (even with laziness... | 616 | false | true | 0 | 12 | 164 | 138 | 66 | 72 | null | null |
tel/saltine | tests/SealedBoxProperties.hs | mit | rightInverseFailureProp4 :: Keypair -> Message -> Perturb -> IO Bool
rightInverseFailureProp4 (Keypair sk1 pk1) (Message bs) p = do
enc <- boxSeal pk1 bs
return (Nothing == boxSealOpen pk1 sk1 (perturb enc p)) | 213 | rightInverseFailureProp4 :: Keypair -> Message -> Perturb -> IO Bool
rightInverseFailureProp4 (Keypair sk1 pk1) (Message bs) p = do
enc <- boxSeal pk1 bs
return (Nothing == boxSealOpen pk1 sk1 (perturb enc p)) | 213 | rightInverseFailureProp4 (Keypair sk1 pk1) (Message bs) p = do
enc <- boxSeal pk1 bs
return (Nothing == boxSealOpen pk1 sk1 (perturb enc p)) | 144 | false | true | 0 | 12 | 36 | 87 | 41 | 46 | null | null |
ksaveljev/hake-2 | src/Constants.hs | bsd-3-clause | defaultBulletHspread = 300 :: Int | 43 | defaultBulletHspread = 300 :: Int | 43 | defaultBulletHspread = 300 :: Int | 43 | false | false | 0 | 4 | 14 | 9 | 5 | 4 | null | null |
JakDar/lab6-project | test/Spec.hs | bsd-3-clause | main :: IO (Counts)
main = do--putStrLn "Test suite not yet implemented" ??
putStrLn "QuickCheck:"
quickCheck maybeInsertExtractTest
quickCheck maybeSafeTail3xCheck
quickCheck _ToPoverFiveTest
quickCheck isPalindromeTest
quickCheck add3TTest
putStrLn "HUnit:"
runTestTT tests | 291 | main :: IO (Counts)
main = do--putStrLn "Test suite not yet implemented" ??
putStrLn "QuickCheck:"
quickCheck maybeInsertExtractTest
quickCheck maybeSafeTail3xCheck
quickCheck _ToPoverFiveTest
quickCheck isPalindromeTest
quickCheck add3TTest
putStrLn "HUnit:"
runTestTT tests | 291 | main = do--putStrLn "Test suite not yet implemented" ??
putStrLn "QuickCheck:"
quickCheck maybeInsertExtractTest
quickCheck maybeSafeTail3xCheck
quickCheck _ToPoverFiveTest
quickCheck isPalindromeTest
quickCheck add3TTest
putStrLn "HUnit:"
runTestTT tests | 271 | false | true | 0 | 8 | 44 | 72 | 27 | 45 | null | null |
christiaanb/ghc | compiler/cmm/PprC.hs | bsd-3-clause | strangeRegType (CmmGlobal CurrentNursery) = Just (ptext (sLit "struct bdescr_ *")) | 82 | strangeRegType (CmmGlobal CurrentNursery) = Just (ptext (sLit "struct bdescr_ *")) | 82 | strangeRegType (CmmGlobal CurrentNursery) = Just (ptext (sLit "struct bdescr_ *")) | 82 | false | false | 0 | 9 | 9 | 31 | 14 | 17 | null | null |
qnikst/distributed-process | src/Control/Distributed/Process/Internal/Primitives.hs | bsd-3-clause | -- | Get statistics about the specified node
getNodeStats :: NodeId -> Process (Either DiedReason NodeStats)
getNodeStats nid = do
selfNode <- getSelfNode
if nid == selfNode
then Right `fmap` getLocalNodeStats -- optimisation
else getNodeStatsRemote selfNode
where
getNodeStatsRemote :: NodeId ... | 831 | getNodeStats :: NodeId -> Process (Either DiedReason NodeStats)
getNodeStats nid = do
selfNode <- getSelfNode
if nid == selfNode
then Right `fmap` getLocalNodeStats -- optimisation
else getNodeStatsRemote selfNode
where
getNodeStatsRemote :: NodeId -> Process (Either DiedReason NodeStats)
... | 786 | getNodeStats nid = do
selfNode <- getSelfNode
if nid == selfNode
then Right `fmap` getLocalNodeStats -- optimisation
else getNodeStatsRemote selfNode
where
getNodeStatsRemote :: NodeId -> Process (Either DiedReason NodeStats)
getNodeStatsRemote selfNode = do
sendCtrlMsg (Just nid) ... | 722 | true | true | 0 | 15 | 241 | 222 | 112 | 110 | null | null |
meiersi/scyther-proof | src/Scyther/Typing.hs | gpl-3.0 | isaType :: IsarConf -> Maybe Role -> Type -> Doc
isaType conf optRole = go
where
go ty = case ty of
AgentT -> text "AgentT"
ConstT i -> parens $ text "ConstT" <-> isar conf i
NonceT role i -> parens $ text "NonceT" <-> text (roleName role) <-> isar conf i
HashT ty1 -> parens $ text "... | 963 | isaType :: IsarConf -> Maybe Role -> Type -> Doc
isaType conf optRole = go
where
go ty = case ty of
AgentT -> text "AgentT"
ConstT i -> parens $ text "ConstT" <-> isar conf i
NonceT role i -> parens $ text "NonceT" <-> text (roleName role) <-> isar conf i
HashT ty1 -> parens $ text "... | 963 | isaType conf optRole = go
where
go ty = case ty of
AgentT -> text "AgentT"
ConstT i -> parens $ text "ConstT" <-> isar conf i
NonceT role i -> parens $ text "NonceT" <-> text (roleName role) <-> isar conf i
HashT ty1 -> parens $ text "HashT" <-> go ty1
EncT ty1 ty2 -> parens $ t... | 914 | false | true | 0 | 14 | 259 | 346 | 156 | 190 | null | null |
snoyberg/photosorter | fay/Language/Fay/JQuery.hs | bsd-2-clause | parentSelector :: String -> JQuery -> Fay JQuery
parentSelector = ffi "%2['parent'](%1)" | 88 | parentSelector :: String -> JQuery -> Fay JQuery
parentSelector = ffi "%2['parent'](%1)" | 88 | parentSelector = ffi "%2['parent'](%1)" | 39 | false | true | 0 | 7 | 11 | 25 | 12 | 13 | null | null |
maxigit/sql-fragment | src/Database/SQLFragment/Join.hs | bsd-3-clause | -- | Computes the mimimum set of join needed to cover the tables from an 'SQLFragment' .
--
-- >>> :set -XDataKinds -XOverloadedStrings
-- >>> let a = "a.x" :: SQLFragment '[] '[]
-- >>> let b = "b.x" :: SQLFragment '[] '[]
-- >>> let c = "c.x" :: SQLFragment '[] '[]
-- >>> let g = a !->! b ++ b !->! c
-- >>> either ... | 1,230 | autoJoin :: SQLFragment e p -> [Join] -> Either (SQLFragment e p) (SQLFragment e p)
autoJoin q js = let
tables = getSection FROM q
path = cover tables js
to_str join = do
clause <- joinClause join
return$ to_sql (joinType join) ++ " " ++ (destination join) ++ " ON " ++ clause
t... | 546 | autoJoin q js = let
tables = getSection FROM q
path = cover tables js
to_str join = do
clause <- joinClause join
return$ to_sql (joinType join) ++ " " ++ (destination join) ++ " ON " ++ clause
to_sql INNER = "JOIN"
to_sql OUTER = ","
to_sql t = show t ++ " JOIN"
in ... | 462 | true | true | 0 | 18 | 298 | 240 | 121 | 119 | null | null |
unisonweb/platform | parser-typechecker/src/Unison/CommandLine/InputPatterns.hs | mit | dependencies = InputPattern "dependencies" [] []
"List the dependencies of the specified definition."
(\case
[thing] -> fmap Input.ListDependenciesI $ parseHashQualifiedName thing
_ -> Left (I.help dependencies)) | 224 | dependencies = InputPattern "dependencies" [] []
"List the dependencies of the specified definition."
(\case
[thing] -> fmap Input.ListDependenciesI $ parseHashQualifiedName thing
_ -> Left (I.help dependencies)) | 224 | dependencies = InputPattern "dependencies" [] []
"List the dependencies of the specified definition."
(\case
[thing] -> fmap Input.ListDependenciesI $ parseHashQualifiedName thing
_ -> Left (I.help dependencies)) | 224 | false | false | 0 | 12 | 37 | 66 | 31 | 35 | null | null |
mgrabmueller/harpy | Harpy/X86CodeGen.hs | bsd-3-clause | x86_cc_nb = 5 | 14 | x86_cc_nb = 5 | 14 | x86_cc_nb = 5 | 14 | false | false | 0 | 4 | 3 | 6 | 3 | 3 | null | null |
ckaestne/CIDE | CIDE_Language_Haskell/test/WSP/Webserver/Dispatch.hs | gpl-3.0 | legalSuffix (x : xs) = legalSuffixChar x | 40 | legalSuffix (x : xs) = legalSuffixChar x | 40 | legalSuffix (x : xs) = legalSuffixChar x | 40 | false | false | 0 | 6 | 6 | 20 | 9 | 11 | null | null |
input-output-hk/pos-haskell-prototype | chain/src/Pos/Chain/Update/Poll/Modifier.hs | mit | modifyPollModifier :: PollModifier -> PollModifier -> PollModifier
modifyPollModifier pmOld pmNew = PollModifier
(pmBVs pmOld <> pmBVs pmNew)
(pmAdoptedBVFull pmNew <|> pmAdoptedBVFull pmOld)
(pmConfirmed pmOld <> pmConfirmed pmNew)
(pmConfirmedProps pmOld <> pmConfirmedProps pmNew)
... | 483 | modifyPollModifier :: PollModifier -> PollModifier -> PollModifier
modifyPollModifier pmOld pmNew = PollModifier
(pmBVs pmOld <> pmBVs pmNew)
(pmAdoptedBVFull pmNew <|> pmAdoptedBVFull pmOld)
(pmConfirmed pmOld <> pmConfirmed pmNew)
(pmConfirmedProps pmOld <> pmConfirmedProps pmNew)
... | 483 | modifyPollModifier pmOld pmNew = PollModifier
(pmBVs pmOld <> pmBVs pmNew)
(pmAdoptedBVFull pmNew <|> pmAdoptedBVFull pmOld)
(pmConfirmed pmOld <> pmConfirmed pmNew)
(pmConfirmedProps pmOld <> pmConfirmedProps pmNew)
(pmActiveProps pmOld <> pmActiveProps pmNew)
(pmSlottin... | 416 | false | true | 0 | 7 | 101 | 136 | 61 | 75 | null | null |
brendanhay/gogol | gogol-containeranalysis/gen/Network/Google/ContainerAnalysis/Types/Product.hs | mpl-2.0 | -- | The type of package; whether native or non native(ruby gems, node.js
-- packages etc).
detPackageType :: Lens' Detail (Maybe Text)
detPackageType
= lens _detPackageType
(\ s a -> s{_detPackageType = a}) | 215 | detPackageType :: Lens' Detail (Maybe Text)
detPackageType
= lens _detPackageType
(\ s a -> s{_detPackageType = a}) | 123 | detPackageType
= lens _detPackageType
(\ s a -> s{_detPackageType = a}) | 79 | true | true | 0 | 8 | 40 | 50 | 26 | 24 | null | null |
rumblesan/improviz | src/Configuration/Screen.hs | bsd-3-clause | defaultScreenConfig = ImprovizScreenConfig { _front = 0.1, _back = 100 } | 72 | defaultScreenConfig = ImprovizScreenConfig { _front = 0.1, _back = 100 } | 72 | defaultScreenConfig = ImprovizScreenConfig { _front = 0.1, _back = 100 } | 72 | false | false | 0 | 6 | 10 | 20 | 12 | 8 | null | null |
nushio3/ghc | compiler/utils/Util.hs | bsd-3-clause | dropList _ xs@[] = xs | 22 | dropList _ xs@[] = xs | 22 | dropList _ xs@[] = xs | 22 | false | false | 0 | 7 | 5 | 20 | 9 | 11 | null | null |
gittywithexcitement/hindent | src/HIndent.hs | bsd-3-clause | styles :: [Style]
styles =
[fundamental,chrisDone,johanTibell,gibiansky] | 74 | styles :: [Style]
styles =
[fundamental,chrisDone,johanTibell,gibiansky] | 74 | styles =
[fundamental,chrisDone,johanTibell,gibiansky] | 56 | false | true | 0 | 5 | 7 | 26 | 16 | 10 | null | null |
cchens/courseography | hs/Css/Constants.hs | gpl-3.0 | aiDark :: T.Text
aiDark = "#80B2FF" | 35 | aiDark :: T.Text
aiDark = "#80B2FF" | 35 | aiDark = "#80B2FF" | 18 | false | true | 0 | 5 | 5 | 13 | 7 | 6 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/LT_6.hs | mit | ltEsOrdering EQ GT = MyTrue | 27 | ltEsOrdering EQ GT = MyTrue | 27 | ltEsOrdering EQ GT = MyTrue | 27 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-code/Language/Drasil/Code/Imperative/Import.hs | bsd-2-clause | unop Sin = sin | 15 | unop Sin = sin | 15 | unop Sin = sin | 15 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
bitemyapp/existentialist | src/Data/Existentialist.hs | bsd-3-clause | toExistentials Nil = [] | 29 | toExistentials Nil = [] | 29 | toExistentials Nil = [] | 29 | false | false | 1 | 6 | 9 | 15 | 5 | 10 | null | null |
baldo/epass | src/Control/Concurrent/Mailbox.hs | bsd-3-clause | -- Timeout calculations (internal) ---------------------------------------------
timeoutFactor
:: Num a
=> a
timeoutFactor = 1000000 | 141 | timeoutFactor
:: Num a
=> a
timeoutFactor = 1000000 | 59 | timeoutFactor = 1000000 | 23 | true | true | 0 | 7 | 22 | 26 | 11 | 15 | null | null |
randallalexander/LYAH | src/Ch5.hs | bsd-3-clause | zip' (x:xs) (y:ys) = (x,y):zip' xs ys | 37 | zip' (x:xs) (y:ys) = (x,y):zip' xs ys | 37 | zip' (x:xs) (y:ys) = (x,y):zip' xs ys | 37 | false | false | 0 | 7 | 6 | 40 | 21 | 19 | null | null |
noteed/openerpdist | OpenERP/Dist.hs | bsd-3-clause | -- TODO keep in sync with setup.py.
fullname :: String
fullname = "openerp-core-7.0.1" | 86 | fullname :: String
fullname = "openerp-core-7.0.1" | 50 | fullname = "openerp-core-7.0.1" | 31 | true | true | 0 | 4 | 12 | 12 | 7 | 5 | null | null |
AlexanderPankiv/ghc | compiler/hsSyn/HsUtils.hs | bsd-3-clause | mkHsLams :: [TyVar] -> [EvVar] -> LHsExpr Id -> LHsExpr Id
mkHsLams tyvars dicts expr = mkLHsWrap (mkWpTyLams tyvars
<.> mkWpLams dicts) expr | 180 | mkHsLams :: [TyVar] -> [EvVar] -> LHsExpr Id -> LHsExpr Id
mkHsLams tyvars dicts expr = mkLHsWrap (mkWpTyLams tyvars
<.> mkWpLams dicts) expr | 180 | mkHsLams tyvars dicts expr = mkLHsWrap (mkWpTyLams tyvars
<.> mkWpLams dicts) expr | 121 | false | true | 0 | 8 | 61 | 60 | 29 | 31 | null | null |
rueshyna/gogol | gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/List.hs | mpl-2.0 | -- | Identifies the project addressed by this request.
mzlProject :: Lens' ManagedZonesList Text
mzlProject
= lens _mzlProject (\ s a -> s{_mzlProject = a}) | 158 | mzlProject :: Lens' ManagedZonesList Text
mzlProject
= lens _mzlProject (\ s a -> s{_mzlProject = a}) | 103 | mzlProject
= lens _mzlProject (\ s a -> s{_mzlProject = a}) | 61 | true | true | 0 | 9 | 26 | 42 | 22 | 20 | null | null |
spechub/Hets | RDF/Sign.hs | gpl-2.0 | isSubSign :: Sign -> Sign -> Bool
isSubSign a b =
Set.isSubsetOf (subjects a) (subjects b)
&& Set.isSubsetOf (predicates a) (predicates b)
&& Set.isSubsetOf (objects a) (objects b) | 198 | isSubSign :: Sign -> Sign -> Bool
isSubSign a b =
Set.isSubsetOf (subjects a) (subjects b)
&& Set.isSubsetOf (predicates a) (predicates b)
&& Set.isSubsetOf (objects a) (objects b) | 198 | isSubSign a b =
Set.isSubsetOf (subjects a) (subjects b)
&& Set.isSubsetOf (predicates a) (predicates b)
&& Set.isSubsetOf (objects a) (objects b) | 164 | false | true | 4 | 7 | 45 | 95 | 44 | 51 | null | null |
imalsogreg/reffit | src/Reffit/FieldTag.hs | gpl-3.0 | insertTag (x:xs) [] = [Node x (insertTag xs [])] | 48 | insertTag (x:xs) [] = [Node x (insertTag xs [])] | 48 | insertTag (x:xs) [] = [Node x (insertTag xs [])] | 48 | false | false | 1 | 10 | 8 | 43 | 19 | 24 | null | null |
nominolo/haddock2 | src/Haddock/Backends/Xhtml/Decl.hs | bsd-2-clause | ppContextNoLocs cxt unicode = pp_hs_context cxt unicode <+> darrow unicode | 74 | ppContextNoLocs cxt unicode = pp_hs_context cxt unicode <+> darrow unicode | 74 | ppContextNoLocs cxt unicode = pp_hs_context cxt unicode <+> darrow unicode | 74 | false | false | 0 | 6 | 9 | 23 | 10 | 13 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-lang/Language/Drasil/Sentence/Extract.hs | bsd-2-clause | lnames Percent = [] | 26 | lnames Percent = [] | 26 | lnames Percent = [] | 26 | false | false | 0 | 5 | 10 | 11 | 5 | 6 | null | null |
rolph-recto/liquid-fixpoint | src/Language/Fixpoint/Types/Names.hs | bsd-3-clause | unPrefixSymbol :: Symbol -> Symbol -> Symbol
unPrefixSymbol p s = fromMaybe s (stripPrefix p s) | 95 | unPrefixSymbol :: Symbol -> Symbol -> Symbol
unPrefixSymbol p s = fromMaybe s (stripPrefix p s) | 95 | unPrefixSymbol p s = fromMaybe s (stripPrefix p s) | 50 | false | true | 0 | 8 | 15 | 44 | 19 | 25 | null | null |
hkupty/aura | src/Aura/Languages.hs | gpl-3.0 | install_3 :: Language -> String
install_3 = \case
Japanese -> "続行?"
Polish -> "Kontynuować?"
Croatian -> "Nastaviti?"
Swedish -> "Fortsätta?"
German -> "Fortsetzen?"
Spanish -> "¿Continuar?"
Portuguese -> "Continuar?"
French -> "Continuer ?"
Russian -> "Продо... | 478 | install_3 :: Language -> String
install_3 = \case
Japanese -> "続行?"
Polish -> "Kontynuować?"
Croatian -> "Nastaviti?"
Swedish -> "Fortsätta?"
German -> "Fortsetzen?"
Spanish -> "¿Continuar?"
Portuguese -> "Continuar?"
French -> "Continuer ?"
Russian -> "Продо... | 478 | install_3 = \case
Japanese -> "続行?"
Polish -> "Kontynuować?"
Croatian -> "Nastaviti?"
Swedish -> "Fortsätta?"
German -> "Fortsetzen?"
Spanish -> "¿Continuar?"
Portuguese -> "Continuar?"
French -> "Continuer ?"
Russian -> "Продолжить?"
Italian -> "Conti... | 446 | false | true | 0 | 7 | 148 | 101 | 51 | 50 | null | null |
antalsz/hs-to-coq | examples/wc/drop-in/MultiCore.hs | mit | multiCoreCount :: FilePath -> IO Counts
multiCoreCount fp = do
putStrLn ("Using available cores: " <> show numCapabilities)
size <- fromIntegral . fileSize <$> getFileStatus fp
let chunkSize = fromIntegral (size `div` numCapabilities)
fold <$!> (forConcurrently [0..numCapabilities-1] $ \n -> do
... | 756 | multiCoreCount :: FilePath -> IO Counts
multiCoreCount fp = do
putStrLn ("Using available cores: " <> show numCapabilities)
size <- fromIntegral . fileSize <$> getFileStatus fp
let chunkSize = fromIntegral (size `div` numCapabilities)
fold <$!> (forConcurrently [0..numCapabilities-1] $ \n -> do
... | 756 | multiCoreCount fp = do
putStrLn ("Using available cores: " <> show numCapabilities)
size <- fromIntegral . fileSize <$> getFileStatus fp
let chunkSize = fromIntegral (size `div` numCapabilities)
fold <$!> (forConcurrently [0..numCapabilities-1] $ \n -> do
-- Take all remaining bytes on the last ... | 716 | false | true | 0 | 19 | 205 | 201 | 96 | 105 | null | null |
abakst/brisk-prelude | examples/SimpleSpawn00.hs | bsd-3-clause | child :: ProcessId -> Process ()
child p = do me <- getSelfPid
send p (Ping me)
q <- expect
send q (Foo { a = 0, b = me })
expect :: Process () | 195 | child :: ProcessId -> Process ()
child p = do me <- getSelfPid
send p (Ping me)
q <- expect
send q (Foo { a = 0, b = me })
expect :: Process () | 195 | child p = do me <- getSelfPid
send p (Ping me)
q <- expect
send q (Foo { a = 0, b = me })
expect :: Process () | 162 | false | true | 0 | 11 | 86 | 92 | 43 | 49 | null | null |
bgaster/hlinda | NetworkTuple.hs | mit | sendInReqNet :: ServerConn -> Int -> Bool -> Template -> IO ()
sendInReqNet (ServerConn f _) id _ template = f $ InReqNetMsg id template | 138 | sendInReqNet :: ServerConn -> Int -> Bool -> Template -> IO ()
sendInReqNet (ServerConn f _) id _ template = f $ InReqNetMsg id template | 137 | sendInReqNet (ServerConn f _) id _ template = f $ InReqNetMsg id template | 74 | false | true | 0 | 10 | 26 | 58 | 28 | 30 | null | null |
brendanhay/gogol | gogol-servicemanagement/gen/Network/Google/ServiceManagement/Types/Product.hs | mpl-2.0 | -- | The name of the metric this quota limit applies to. The quota limits
-- with the same metric will be checked together during runtime. The metric
-- must be defined within the service config.
qlMetric :: Lens' QuotaLimit (Maybe Text)
qlMetric = lens _qlMetric (\ s a -> s{_qlMetric = a}) | 291 | qlMetric :: Lens' QuotaLimit (Maybe Text)
qlMetric = lens _qlMetric (\ s a -> s{_qlMetric = a}) | 95 | qlMetric = lens _qlMetric (\ s a -> s{_qlMetric = a}) | 53 | true | true | 0 | 9 | 52 | 48 | 27 | 21 | null | null |
scottgw/eiffel-typecheck | Language/Eiffel/TypeCheck/TypedExpr.hs | bsd-3-clause | untypeExpr' (Old e) = E.UnOpExpr E.Old (untypeExpr e) | 53 | untypeExpr' (Old e) = E.UnOpExpr E.Old (untypeExpr e) | 53 | untypeExpr' (Old e) = E.UnOpExpr E.Old (untypeExpr e) | 53 | false | false | 0 | 7 | 7 | 30 | 14 | 16 | null | null |
rueshyna/gogol | gogol-ml/gen/Network/Google/Resource/Ml/Projects/GetConfig.hs | mpl-2.0 | -- | JSONP
pgcCallback :: Lens' ProjectsGetConfig (Maybe Text)
pgcCallback
= lens _pgcCallback (\ s a -> s{_pgcCallback = a}) | 127 | pgcCallback :: Lens' ProjectsGetConfig (Maybe Text)
pgcCallback
= lens _pgcCallback (\ s a -> s{_pgcCallback = a}) | 116 | pgcCallback
= lens _pgcCallback (\ s a -> s{_pgcCallback = a}) | 64 | true | true | 1 | 9 | 21 | 52 | 25 | 27 | null | null |
shlevy/ghc | compiler/typecheck/FamInst.hs | bsd-3-clause | -- | Build injecivity error herald common to all injectivity errors.
injectivityErrorHerald :: Bool -> SDoc
injectivityErrorHerald isSingular =
text "Type family equation" <> s isSingular <+> text "violate" <>
s (not isSingular) <+> text "injectivity annotation" <>
if isSingular then dot else colon
-- Above is ... | 784 | injectivityErrorHerald :: Bool -> SDoc
injectivityErrorHerald isSingular =
text "Type family equation" <> s isSingular <+> text "violate" <>
s (not isSingular) <+> text "injectivity annotation" <>
if isSingular then dot else colon
-- Above is an ugly hack. We want this: "sentence. herald:" (note the dot and
... | 715 | injectivityErrorHerald isSingular =
text "Type family equation" <> s isSingular <+> text "violate" <>
s (not isSingular) <+> text "injectivity annotation" <>
if isSingular then dot else colon
-- Above is an ugly hack. We want this: "sentence. herald:" (note the dot and
-- colon). But if herald is empty we w... | 676 | true | true | 1 | 8 | 169 | 96 | 50 | 46 | null | null |
wmarvel/haskellrogue | src/Level/LevelGen.hs | mit | randOdd :: Int -> Int -> IO Int
randOdd x x' = (+ x) <$> randOdd' (x' - x)
where
randOdd' = randMapped (.|. 1) (.|. 1) . subtract 1 | 137 | randOdd :: Int -> Int -> IO Int
randOdd x x' = (+ x) <$> randOdd' (x' - x)
where
randOdd' = randMapped (.|. 1) (.|. 1) . subtract 1 | 137 | randOdd x x' = (+ x) <$> randOdd' (x' - x)
where
randOdd' = randMapped (.|. 1) (.|. 1) . subtract 1 | 105 | false | true | 4 | 8 | 35 | 83 | 39 | 44 | null | null |
randen/haddock | haddock-api/src/Haddock/GhcUtils.hs | bsd-2-clause | parents _ _ = [] | 16 | parents _ _ = [] | 16 | parents _ _ = [] | 16 | false | false | 0 | 5 | 4 | 13 | 6 | 7 | null | null |
chreekat/yesod | yesod-routes/test/main.hs | bsd-2-clause | justRoot :: Dispatch Int
justRoot = toDispatch
[ Route [] False $ result $ const $ Just 1
] | 99 | justRoot :: Dispatch Int
justRoot = toDispatch
[ Route [] False $ result $ const $ Just 1
] | 99 | justRoot = toDispatch
[ Route [] False $ result $ const $ Just 1
] | 74 | false | true | 1 | 11 | 26 | 46 | 20 | 26 | null | null |
dysinger/amazonka | amazonka-directconnect/gen/Network/AWS/DirectConnect/AllocatePublicVirtualInterface.hs | mpl-2.0 | apvir1VirtualInterfaceName :: Lens' AllocatePublicVirtualInterfaceResponse (Maybe Text)
apvir1VirtualInterfaceName =
lens _apvir1VirtualInterfaceName
(\s a -> s { _apvir1VirtualInterfaceName = a }) | 209 | apvir1VirtualInterfaceName :: Lens' AllocatePublicVirtualInterfaceResponse (Maybe Text)
apvir1VirtualInterfaceName =
lens _apvir1VirtualInterfaceName
(\s a -> s { _apvir1VirtualInterfaceName = a }) | 209 | apvir1VirtualInterfaceName =
lens _apvir1VirtualInterfaceName
(\s a -> s { _apvir1VirtualInterfaceName = a }) | 121 | false | true | 1 | 9 | 30 | 51 | 24 | 27 | null | null |
rzil/honours | DeepLearning/PNN/PNN-Haskell/src/PNN.hs | mit | makeComplex (x:y:xs) = (x :+ y) : makeComplex xs | 48 | makeComplex (x:y:xs) = (x :+ y) : makeComplex xs | 48 | makeComplex (x:y:xs) = (x :+ y) : makeComplex xs | 48 | false | false | 0 | 8 | 8 | 34 | 17 | 17 | null | null |
alexander-at-github/eta | libraries/base/GHC/Stack.hs | bsd-3-clause | showCallStack :: CallStack -> String
showCallStack (CallStack (root:rest))
= unlines (showCallSite root : map (indent . showCallSite) rest)
where
indent l = " " ++ l
showCallSite (f, loc) = f ++ ", called at " ++ showSrcLoc loc | 236 | showCallStack :: CallStack -> String
showCallStack (CallStack (root:rest))
= unlines (showCallSite root : map (indent . showCallSite) rest)
where
indent l = " " ++ l
showCallSite (f, loc) = f ++ ", called at " ++ showSrcLoc loc | 236 | showCallStack (CallStack (root:rest))
= unlines (showCallSite root : map (indent . showCallSite) rest)
where
indent l = " " ++ l
showCallSite (f, loc) = f ++ ", called at " ++ showSrcLoc loc | 199 | false | true | 0 | 10 | 47 | 96 | 48 | 48 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-example/Drasil/GamePhysics/GenDefs.hs | bsd-2-clause | impulseRel :: Relation
impulseRel = sy QP.impulseS $= (negate (1 + sy QP.restitutionCoef) * sy initRelVel $.
sy normalVect) / (((1 / sy massA) + (1 / sy massB)) *
(sy normalLen $^ 2) +
((sy perpLenA $^ 2) / sy momtInertA) +
((sy perpLenB $^ 2) / sy momtInertB)) | 269 | impulseRel :: Relation
impulseRel = sy QP.impulseS $= (negate (1 + sy QP.restitutionCoef) * sy initRelVel $.
sy normalVect) / (((1 / sy massA) + (1 / sy massB)) *
(sy normalLen $^ 2) +
((sy perpLenA $^ 2) / sy momtInertA) +
((sy perpLenB $^ 2) / sy momtInertB)) | 269 | impulseRel = sy QP.impulseS $= (negate (1 + sy QP.restitutionCoef) * sy initRelVel $.
sy normalVect) / (((1 / sy massA) + (1 / sy massB)) *
(sy normalLen $^ 2) +
((sy perpLenA $^ 2) / sy momtInertA) +
((sy perpLenB $^ 2) / sy momtInertB)) | 246 | false | true | 4 | 14 | 57 | 158 | 76 | 82 | null | null |
keithodulaigh/Hets | GUI/ShowLibGraph.hs | gpl-2.0 | getLibDeps :: Set.Set LibName -> LibEnv -> [(LibName, LibName)]
getLibDeps ks =
Rel.toList . Rel.intransKernel . (`Rel.restrict` ks) . getLibDepRel | 149 | getLibDeps :: Set.Set LibName -> LibEnv -> [(LibName, LibName)]
getLibDeps ks =
Rel.toList . Rel.intransKernel . (`Rel.restrict` ks) . getLibDepRel | 149 | getLibDeps ks =
Rel.toList . Rel.intransKernel . (`Rel.restrict` ks) . getLibDepRel | 85 | false | true | 0 | 8 | 21 | 60 | 33 | 27 | null | null |
fujimura/spot | src/Option.hs | bsd-3-clause | options = Options { port' = "3000"
, environment' = "development" } | 85 | options = Options { port' = "3000"
, environment' = "development" } | 85 | options = Options { port' = "3000"
, environment' = "development" } | 85 | false | false | 0 | 6 | 29 | 20 | 12 | 8 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Query/Unit.hs | mit | race ProtossZealot = Protoss | 28 | race ProtossZealot = Protoss | 28 | race ProtossZealot = Protoss | 28 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
mitchellwrosen/language-lua2 | src/Language/Lua/Token.hs | bsd-3-clause | showToken TkLength = "#" | 31 | showToken TkLength = "#" | 31 | showToken TkLength = "#" | 31 | false | false | 0 | 5 | 10 | 9 | 4 | 5 | null | null |
pgj/bead | src/Bead/Persistence/SQL/JSON.hs | bsd-3-clause | decodeRole :: JSONText -> Domain.Role
decodeRole = decodeJSON | 61 | decodeRole :: JSONText -> Domain.Role
decodeRole = decodeJSON | 61 | decodeRole = decodeJSON | 23 | false | true | 0 | 6 | 7 | 17 | 9 | 8 | null | null |
ocramz/petsc-hs | examples/Test2.hs | gpl-3.0 | isCreateGeneral comm n idx mode =
withPtr (\isp ->
withArray idx $ \idxp -> isCreateGeneral' comm n idxp mo isp) >>= handleErrTup
where mo = fromIntegral $ petscCopyModeToInt mode | 189 | isCreateGeneral comm n idx mode =
withPtr (\isp ->
withArray idx $ \idxp -> isCreateGeneral' comm n idxp mo isp) >>= handleErrTup
where mo = fromIntegral $ petscCopyModeToInt mode | 189 | isCreateGeneral comm n idx mode =
withPtr (\isp ->
withArray idx $ \idxp -> isCreateGeneral' comm n idxp mo isp) >>= handleErrTup
where mo = fromIntegral $ petscCopyModeToInt mode | 189 | false | false | 0 | 11 | 38 | 67 | 33 | 34 | null | null |
PeterHajdu/hs | src/Hs.hs | bsd-3-clause | calcNewHead :: Snake -> Coordinate
calcNewHead (Snake _ currentDirection (Coordinate x' y') _) = case currentDirection of
North -> Coordinate x' (y' - 1)
West -> Coordinate (x' - 1) y'
... | 464 | calcNewHead :: Snake -> Coordinate
calcNewHead (Snake _ currentDirection (Coordinate x' y') _) = case currentDirection of
North -> Coordinate x' (y' - 1)
West -> Coordinate (x' - 1) y'
... | 464 | calcNewHead (Snake _ currentDirection (Coordinate x' y') _) = case currentDirection of
North -> Coordinate x' (y' - 1)
West -> Coordinate (x' - 1) y'
East ->... | 429 | false | true | 0 | 10 | 261 | 114 | 57 | 57 | null | null |
nmattia/stutter | test/Main.hs | mit | parserTests :: TestTree
parserTests =
Tasty.testGroup "parser"
[ Tasty.testCase "parses a char range" $
(Right $ CharRange ('a', 'z')) @=?
(Atto.parseOnly Stutter.parseRange "a-z")
, Tasty.testCase "parses an int range" $
(Right $ IntRange (0, 3)) @=?
... | 2,754 | parserTests :: TestTree
parserTests =
Tasty.testGroup "parser"
[ Tasty.testCase "parses a char range" $
(Right $ CharRange ('a', 'z')) @=?
(Atto.parseOnly Stutter.parseRange "a-z")
, Tasty.testCase "parses an int range" $
(Right $ IntRange (0, 3)) @=?
... | 2,754 | parserTests =
Tasty.testGroup "parser"
[ Tasty.testCase "parses a char range" $
(Right $ CharRange ('a', 'z')) @=?
(Atto.parseOnly Stutter.parseRange "a-z")
, Tasty.testCase "parses an int range" $
(Right $ IntRange (0, 3)) @=?
(Atto.parseOnly Stutter... | 2,730 | false | true | 0 | 16 | 912 | 788 | 396 | 392 | null | null |
tcoenraad/functioneel-programmeren | practica/serie6/graphs.hs | mit | colorAllPathsOneByOne' (p:ps) n g c | n /= -1 && isColorOfPath p c /= True = colorAllPathsOneByOne' (ps++[p]) (n-1) g c
| otherwise = (graphToOutput g'', g'')
where
g' = colorEdgesInGraph p Black g
... | 384 | colorAllPathsOneByOne' (p:ps) n g c | n /= -1 && isColorOfPath p c /= True = colorAllPathsOneByOne' (ps++[p]) (n-1) g c
| otherwise = (graphToOutput g'', g'')
where
g' = colorEdgesInGraph p Black g
... | 384 | colorAllPathsOneByOne' (p:ps) n g c | n /= -1 && isColorOfPath p c /= True = colorAllPathsOneByOne' (ps++[p]) (n-1) g c
| otherwise = (graphToOutput g'', g'')
where
g' = colorEdgesInGraph p Black g
... | 384 | false | false | 0 | 11 | 188 | 123 | 61 | 62 | null | null |
ndmitchell/hoogle | src/Input/Haddock.hs | bsd-3-clause | parseLine x | Just x <- readItem x = case x of
TypeSig a bs c -> Right [EDecl (TypeSig a [b] c) | b <- bs]
x -> Right [EDecl x] | 135 | parseLine x | Just x <- readItem x = case x of
TypeSig a bs c -> Right [EDecl (TypeSig a [b] c) | b <- bs]
x -> Right [EDecl x] | 135 | parseLine x | Just x <- readItem x = case x of
TypeSig a bs c -> Right [EDecl (TypeSig a [b] c) | b <- bs]
x -> Right [EDecl x] | 135 | false | false | 3 | 10 | 39 | 76 | 39 | 37 | null | null |
egor-tensin/windows-env | app/ListPaths.hs | mit | shouldListPath MissingOnly = fmap not . doesDirectoryExist . pathExpanded | 74 | shouldListPath MissingOnly = fmap not . doesDirectoryExist . pathExpanded | 74 | shouldListPath MissingOnly = fmap not . doesDirectoryExist . pathExpanded | 74 | false | false | 0 | 7 | 9 | 20 | 9 | 11 | null | null |
ramirez7/configurator-applicative | src/Data/Configurator/Applicative/Parser.hs | bsd-3-clause | orThrowError :: (MonadError e m) => Maybe a -> e -> m a
orThrowError (Just a) _ = return a | 90 | orThrowError :: (MonadError e m) => Maybe a -> e -> m a
orThrowError (Just a) _ = return a | 90 | orThrowError (Just a) _ = return a | 34 | false | true | 0 | 8 | 19 | 56 | 25 | 31 | null | null |
laszlopandy/elm-package | src/Diff/Compare.hs | bsd-3-clause | computeChanges
:: [Docs.Documentation]
-> Package.Name
-> Package.Version
-> Manager.Manager PackageChanges
computeChanges newDocs name version =
do oldDocs <- Catalog.documentation name version
return (diffPackages oldDocs newDocs)
-- CHANGE MAGNITUDE | 279 | computeChanges
:: [Docs.Documentation]
-> Package.Name
-> Package.Version
-> Manager.Manager PackageChanges
computeChanges newDocs name version =
do oldDocs <- Catalog.documentation name version
return (diffPackages oldDocs newDocs)
-- CHANGE MAGNITUDE | 279 | computeChanges newDocs name version =
do oldDocs <- Catalog.documentation name version
return (diffPackages oldDocs newDocs)
-- CHANGE MAGNITUDE | 155 | false | true | 0 | 9 | 54 | 73 | 35 | 38 | null | null |
ganeti/ganeti | src/Ganeti/JQueue.hs | bsd-2-clause | extendInputOpCodeReasonTrail jid ts i (ValidOpCode vOp) =
let metaP = metaParams vOp
op = metaOpCode vOp
trail = opReason metaP
reasonSrc = opReasonSrcID op
reasonText = "job=" ++ show (fromJobId jid) ++ ";index=" ++ show i
reason = (reasonSrc, reasonText, reasonTrailTimestamp ts)
... | 414 | extendInputOpCodeReasonTrail jid ts i (ValidOpCode vOp) =
let metaP = metaParams vOp
op = metaOpCode vOp
trail = opReason metaP
reasonSrc = opReasonSrcID op
reasonText = "job=" ++ show (fromJobId jid) ++ ";index=" ++ show i
reason = (reasonSrc, reasonText, reasonTrailTimestamp ts)
... | 414 | extendInputOpCodeReasonTrail jid ts i (ValidOpCode vOp) =
let metaP = metaParams vOp
op = metaOpCode vOp
trail = opReason metaP
reasonSrc = opReasonSrcID op
reasonText = "job=" ++ show (fromJobId jid) ++ ";index=" ++ show i
reason = (reasonSrc, reasonText, reasonTrailTimestamp ts)
... | 414 | false | false | 0 | 14 | 100 | 137 | 71 | 66 | null | null |
rudymatela/leancheck | src/Test/LeanCheck/Utils/Operators.hs | bsd-3-clause | associative :: Eq a => (a -> a -> a) -> a -> a -> a -> Bool
associative = isAssociative | 89 | associative :: Eq a => (a -> a -> a) -> a -> a -> a -> Bool
associative = isAssociative | 89 | associative = isAssociative | 29 | false | true | 0 | 11 | 22 | 52 | 24 | 28 | null | null |
keithodulaigh/Hets | Comorphisms/HolLight2Isabelle.hs | gpl-2.0 | constMap :: Map.Map String IsaSign.VName
constMap = Map.fromList [("+", IsaConsts.plusV)
, ("-", IsaConsts.minusV)
, ("*", IsaConsts.timesV)
, ("!", IsaConsts.mkVName IsaConsts.allS)
, ("?", IsaConsts.mkVName IsaConsts.exS)
... | 844 | constMap :: Map.Map String IsaSign.VName
constMap = Map.fromList [("+", IsaConsts.plusV)
, ("-", IsaConsts.minusV)
, ("*", IsaConsts.timesV)
, ("!", IsaConsts.mkVName IsaConsts.allS)
, ("?", IsaConsts.mkVName IsaConsts.exS)
... | 844 | constMap = Map.fromList [("+", IsaConsts.plusV)
, ("-", IsaConsts.minusV)
, ("*", IsaConsts.timesV)
, ("!", IsaConsts.mkVName IsaConsts.allS)
, ("?", IsaConsts.mkVName IsaConsts.exS)
, ("?!", IsaConst... | 803 | false | true | 1 | 9 | 390 | 208 | 120 | 88 | null | null |
melted/idris-lua | src/IRTS/CodegenLua.hs | isc | cgOp (LSExt (ITFixed IT64) ITBig) [x] = x | 41 | cgOp (LSExt (ITFixed IT64) ITBig) [x] = x | 41 | cgOp (LSExt (ITFixed IT64) ITBig) [x] = x | 41 | false | false | 1 | 9 | 7 | 31 | 14 | 17 | null | null |
ribag/ganeti-experiments | test/hs/Test/Ganeti/Utils.hs | gpl-2.0 | -- | Test that functional if' behaves like the syntactic sugar if.
prop_if'if :: Bool -> Int -> Int -> Gen Prop
prop_if'if cnd a b =
if' cnd a b ==? if cnd then a else b | 171 | prop_if'if :: Bool -> Int -> Int -> Gen Prop
prop_if'if cnd a b =
if' cnd a b ==? if cnd then a else b | 104 | prop_if'if cnd a b =
if' cnd a b ==? if cnd then a else b | 59 | true | true | 1 | 9 | 39 | 57 | 26 | 31 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.