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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
gazay/faker | src/Faker/Lorem.hs | mit | sentences :: Int -> Faker [String]
sentences num = sequence $ replicate num sentence | 84 | sentences :: Int -> Faker [String]
sentences num = sequence $ replicate num sentence | 84 | sentences num = sequence $ replicate num sentence | 49 | false | true | 0 | 8 | 13 | 37 | 17 | 20 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F27.hs | bsd-3-clause | ptr_glTextureStorageMem1DEXT :: FunPtr (GLuint -> GLsizei -> GLenum -> GLsizei -> GLuint -> GLuint64 -> IO ())
ptr_glTextureStorageMem1DEXT = unsafePerformIO $ getCommand "glTextureStorageMem1DEXT" | 197 | ptr_glTextureStorageMem1DEXT :: FunPtr (GLuint -> GLsizei -> GLenum -> GLsizei -> GLuint -> GLuint64 -> IO ())
ptr_glTextureStorageMem1DEXT = unsafePerformIO $ getCommand "glTextureStorageMem1DEXT" | 197 | ptr_glTextureStorageMem1DEXT = unsafePerformIO $ getCommand "glTextureStorageMem1DEXT" | 86 | false | true | 0 | 14 | 22 | 53 | 26 | 27 | null | null |
abramhindle/haskell-sand-game | Sand4.hs | lgpl-3.0 | insertParticle (Room room) sand x y =
let rx = (x `div` spriteWidth)
ry = (y `div` spriteHeight )
xhelper xc [] = error "xhelper not found!"
xhelper xc (l:ls) =
if (xc == rx)
then sand : ls
else l : (xhelper (xc + 1) ls)
yhelper yc [] = error "xh... | 537 | insertParticle (Room room) sand x y =
let rx = (x `div` spriteWidth)
ry = (y `div` spriteHeight )
xhelper xc [] = error "xhelper not found!"
xhelper xc (l:ls) =
if (xc == rx)
then sand : ls
else l : (xhelper (xc + 1) ls)
yhelper yc [] = error "xh... | 537 | insertParticle (Room room) sand x y =
let rx = (x `div` spriteWidth)
ry = (y `div` spriteHeight )
xhelper xc [] = error "xhelper not found!"
xhelper xc (l:ls) =
if (xc == rx)
then sand : ls
else l : (xhelper (xc + 1) ls)
yhelper yc [] = error "xh... | 537 | false | false | 0 | 14 | 217 | 229 | 120 | 109 | null | null |
haskell/haddock | haddock-api/src/Haddock/Interface.hs | bsd-2-clause | processModules
:: Verbosity -- ^ Verbosity of logging to 'stdout'
-> [String] -- ^ A list of file or module names sorted by
-- module topology
-> [Flag] -- ^ Command-line flags
-> [InterfaceFile] -- ^ Interface fil... | 2,460 | processModules
:: Verbosity -- ^ Verbosity of logging to 'stdout'
-> [String] -- ^ A list of file or module names sorted by
-- module topology
-> [Flag] -- ^ Command-line flags
-> [InterfaceFile] -- ^ Interface fil... | 2,366 | processModules verbosity modules flags extIfaces = do
#if defined(mingw32_HOST_OS)
-- Avoid internal error: <stderr>: hPutChar: invalid argument (invalid character)' non UTF-8 Windows
liftIO $ hSetEncoding stdout $ mkLocaleEncoding TransliterateCodingFailure
liftIO $ hSetEncoding stderr $ mkLocaleEncoding Transli... | 1,987 | true | true | 0 | 16 | 607 | 472 | 237 | 235 | null | null |
yhoshino11/learning_haskell | ch3.hs | mit | bmiTell :: Double -> Double -> String
bmiTell weight height
| weight / height ^ 2 <= 18.5 = "You're underweight!"
| weight / height ^ 2 <= 25.0 = "You're supposedly normal."
| weight / height ^ 2 <= 30.0 = "You're overweight!"
| otherwise = "You're a whale, congratulations!" | 301 | bmiTell :: Double -> Double -> String
bmiTell weight height
| weight / height ^ 2 <= 18.5 = "You're underweight!"
| weight / height ^ 2 <= 25.0 = "You're supposedly normal."
| weight / height ^ 2 <= 30.0 = "You're overweight!"
| otherwise = "You're a whale, congratulations!" | 301 | bmiTell weight height
| weight / height ^ 2 <= 18.5 = "You're underweight!"
| weight / height ^ 2 <= 25.0 = "You're supposedly normal."
| weight / height ^ 2 <= 30.0 = "You're overweight!"
| otherwise = "You're a whale, congratulations!" | 263 | false | true | 1 | 10 | 76 | 96 | 46 | 50 | null | null |
elbrujohalcon/wxhnotepad | src/Step6.hs | bsd-3-clause | clearPast GUICtx{guiPast = past, guiFuture = future} =
do
varSet past []
varSet future [] | 109 | clearPast GUICtx{guiPast = past, guiFuture = future} =
do
varSet past []
varSet future [] | 109 | clearPast GUICtx{guiPast = past, guiFuture = future} =
do
varSet past []
varSet future [] | 109 | false | false | 0 | 8 | 34 | 44 | 21 | 23 | null | null |
trbauer/globexpr | Test/TestGlob.hs | mit | testSyntax :: (String,Either String GlobExpr) -> IO ()
testSyntax (str,eeg) = do
-- print (str,eeg)
putStr $ printf "%-36s " (show str++":")
let ind = unlines . map (" "++) . lines
s = case parseGlob str of
Left err ->
case eeg of
Left rerr
| r... | 1,134 | testSyntax :: (String,Either String GlobExpr) -> IO ()
testSyntax (str,eeg) = do
-- print (str,eeg)
putStr $ printf "%-36s " (show str++":")
let ind = unlines . map (" "++) . lines
s = case parseGlob str of
Left err ->
case eeg of
Left rerr
| r... | 1,134 | testSyntax (str,eeg) = do
-- print (str,eeg)
putStr $ printf "%-36s " (show str++":")
let ind = unlines . map (" "++) . lines
s = case parseGlob str of
Left err ->
case eeg of
Left rerr
| rerr `isInfixOf` err -> "ok (err good)"
... | 1,079 | false | true | 0 | 20 | 395 | 266 | 126 | 140 | null | null |
pskrz/Synthesis | src/Sound/Synthesis/Wave.hs | bsd-3-clause | sawW = sample sawtooth | 22 | sawW = sample sawtooth | 22 | sawW = sample sawtooth | 22 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
AlexBaranosky/QuickCheck | Test/QuickCheck/Text.hs | bsd-3-clause | postpone :: Terminal -> IO () -> IO ()
postpone (MkTerminal ref _ _) io' =
do io <- readIORef ref
writeIORef ref (io >> io') | 131 | postpone :: Terminal -> IO () -> IO ()
postpone (MkTerminal ref _ _) io' =
do io <- readIORef ref
writeIORef ref (io >> io') | 131 | postpone (MkTerminal ref _ _) io' =
do io <- readIORef ref
writeIORef ref (io >> io') | 92 | false | true | 0 | 9 | 32 | 69 | 32 | 37 | null | null |
danielbarter/Tableaux | app/Main.hs | bsd-3-clause | parseTransformation :: IO Int
parseTransformation = do putStr "transformation : "
text <- getLine
let x = (readMaybe text) :: Maybe Int
case x of Just m -> return m
Nothing -> putStrLn "sorry, I didn't catch t... | 397 | parseTransformation :: IO Int
parseTransformation = do putStr "transformation : "
text <- getLine
let x = (readMaybe text) :: Maybe Int
case x of Just m -> return m
Nothing -> putStrLn "sorry, I didn't catch t... | 397 | parseTransformation = do putStr "transformation : "
text <- getLine
let x = (readMaybe text) :: Maybe Int
case x of Just m -> return m
Nothing -> putStrLn "sorry, I didn't catch that" >> parseTransformation
-... | 367 | false | true | 0 | 11 | 160 | 81 | 37 | 44 | null | null |
dysinger/amazonka | amazonka-dynamodb/gen/Network/AWS/DynamoDB/ListTables.hs | mpl-2.0 | -- | The names of the tables associated with the current account at the current
-- endpoint. The maximum size of this array is 100.
--
-- If /LastEvaluatedTableName/ also appears in the output, you can use this value
-- as the /ExclusiveStartTableName/ parameter in a subsequent /ListTables/ request
-- and obtain the ne... | 467 | ltrTableNames :: Lens' ListTablesResponse [Text]
ltrTableNames = lens _ltrTableNames (\s a -> s { _ltrTableNames = a }) . _List | 127 | ltrTableNames = lens _ltrTableNames (\s a -> s { _ltrTableNames = a }) . _List | 78 | true | true | 0 | 10 | 76 | 52 | 31 | 21 | null | null |
sdiehl/ghc | compiler/nativeGen/PPC/CodeGen.hs | bsd-3-clause | coerceFP2Int :: Width -> Width -> CmmExpr -> NatM Register
coerceFP2Int fromRep toRep x = do
dflags <- getDynFlags
let arch = platformArch $ targetPlatform dflags
coerceFP2Int' arch fromRep toRep x | 210 | coerceFP2Int :: Width -> Width -> CmmExpr -> NatM Register
coerceFP2Int fromRep toRep x = do
dflags <- getDynFlags
let arch = platformArch $ targetPlatform dflags
coerceFP2Int' arch fromRep toRep x | 210 | coerceFP2Int fromRep toRep x = do
dflags <- getDynFlags
let arch = platformArch $ targetPlatform dflags
coerceFP2Int' arch fromRep toRep x | 151 | false | true | 0 | 11 | 43 | 68 | 31 | 37 | null | null |
mrshannon/lorenz | src/Lorenz/Events.hs | mit | -- Mouse wheel up.
handleMouseDown app _ _ ButtonWheelUp =
return $ modifyView app 0.0 0.0 0.9 | 98 | handleMouseDown app _ _ ButtonWheelUp =
return $ modifyView app 0.0 0.0 0.9 | 79 | handleMouseDown app _ _ ButtonWheelUp =
return $ modifyView app 0.0 0.0 0.9 | 79 | true | false | 0 | 6 | 20 | 29 | 14 | 15 | null | null |
mtesseract/silverratio-jeopardy | src/jeopardy.hs | gpl-2.0 | _GUIEnterGame :: IORef State -> IO ()
_GUIEnterGame state' = do
-- Reset card colors and player/points info.
_GUIResetGameBoard state'
state <- readIORef state'
let builder = stateBuilder state
writeIORef state' $ state { statePhase = PhasePreQuery }
-- Hide Player Init Window
playerInit <- _GUIWindow bui... | 627 | _GUIEnterGame :: IORef State -> IO ()
_GUIEnterGame state' = do
-- Reset card colors and player/points info.
_GUIResetGameBoard state'
state <- readIORef state'
let builder = stateBuilder state
writeIORef state' $ state { statePhase = PhasePreQuery }
-- Hide Player Init Window
playerInit <- _GUIWindow bui... | 627 | _GUIEnterGame state' = do
-- Reset card colors and player/points info.
_GUIResetGameBoard state'
state <- readIORef state'
let builder = stateBuilder state
writeIORef state' $ state { statePhase = PhasePreQuery }
-- Hide Player Init Window
playerInit <- _GUIWindow builder "window_player_init"
widgetHide... | 589 | false | true | 0 | 10 | 102 | 148 | 61 | 87 | null | null |
lboklin/CharacterGenerator | src/Preferences.hs | lgpl-3.0 | genRandElemFrom :: [String] -> Int -> String
genRandElemFrom xs seed = (!!) xs $ head $ randomRs (0, ln) $ mkStdGen seed
where
ln = length xs | 147 | genRandElemFrom :: [String] -> Int -> String
genRandElemFrom xs seed = (!!) xs $ head $ randomRs (0, ln) $ mkStdGen seed
where
ln = length xs | 147 | genRandElemFrom xs seed = (!!) xs $ head $ randomRs (0, ln) $ mkStdGen seed
where
ln = length xs | 102 | false | true | 0 | 8 | 32 | 67 | 34 | 33 | null | null |
ulricha/dsh | src/Database/DSH/CL/Opt/Auxiliary.hs | bsd-3-clause | flipRelOp :: BinRelOp -> BinRelOp
flipRelOp Eq = Eq | 52 | flipRelOp :: BinRelOp -> BinRelOp
flipRelOp Eq = Eq | 52 | flipRelOp Eq = Eq | 18 | false | true | 0 | 7 | 9 | 24 | 10 | 14 | null | null |
randen/cabal | cabal-install/Distribution/Client/Config.hs | bsd-3-clause | liftUserInstallDirs :: FieldDescr (InstallDirs (Flag PathTemplate))
-> FieldDescr SavedConfig
liftUserInstallDirs = liftField
savedUserInstallDirs (\flags conf -> conf { savedUserInstallDirs = flags }) | 223 | liftUserInstallDirs :: FieldDescr (InstallDirs (Flag PathTemplate))
-> FieldDescr SavedConfig
liftUserInstallDirs = liftField
savedUserInstallDirs (\flags conf -> conf { savedUserInstallDirs = flags }) | 223 | liftUserInstallDirs = liftField
savedUserInstallDirs (\flags conf -> conf { savedUserInstallDirs = flags }) | 109 | false | true | 0 | 10 | 43 | 57 | 29 | 28 | null | null |
pjones/xmonad-test | vendor/xmonad-contrib/XMonad/Util/Image.hs | bsd-2-clause | -- | Displaces a list of points along a vector 'x', 'y'
movePoints :: Position -> Position -> [Point] -> [Point]
movePoints x y points = map (movePoint x y) points | 163 | movePoints :: Position -> Position -> [Point] -> [Point]
movePoints x y points = map (movePoint x y) points | 107 | movePoints x y points = map (movePoint x y) points | 50 | true | true | 0 | 8 | 30 | 50 | 26 | 24 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 1860 = 6101 | 31 | getValueFromProduct 1860 = 6101 | 31 | getValueFromProduct 1860 = 6101 | 31 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
wavewave/coroutine-object | src/Control/Monad/Trans/Crtn/Driver.hs | bsd-3-clause | singleDispatch (Left act) (logobj,worldobj,evacc) = do
Arg Dispatch ev <- request (Res Dispatch (Just act))
return (logobj,worldobj,evacc++[Right ev])
-- | a single feedback step of multiple event dispatch | 218 | singleDispatch (Left act) (logobj,worldobj,evacc) = do
Arg Dispatch ev <- request (Res Dispatch (Just act))
return (logobj,worldobj,evacc++[Right ev])
-- | a single feedback step of multiple event dispatch | 218 | singleDispatch (Left act) (logobj,worldobj,evacc) = do
Arg Dispatch ev <- request (Res Dispatch (Just act))
return (logobj,worldobj,evacc++[Right ev])
-- | a single feedback step of multiple event dispatch | 218 | false | false | 0 | 12 | 40 | 81 | 41 | 40 | null | null |
jozefg/folds-common | src/Data/Fold/Common/M.hs | mit | -- | Check whether all elements are 'True'.
--
-- >>> run (repeat False) and
-- False
--
-- >>> run (repeat True) and
-- ... diverges ...
and :: M Bool Bool
and = all id | 169 | and :: M Bool Bool
and = all id | 31 | and = all id | 12 | true | true | 0 | 6 | 36 | 32 | 17 | 15 | null | null |
haskellweekly/haskellweekly.github.io | executables/haskell-weekly.hs | mit | prettyDay :: Time.Day -> Text
prettyDay = formatDay "%Y-%m-%d" | 62 | prettyDay :: Time.Day -> Text
prettyDay = formatDay "%Y-%m-%d" | 62 | prettyDay = formatDay "%Y-%m-%d" | 32 | false | true | 0 | 6 | 8 | 20 | 10 | 10 | null | null |
fffej/Yahtzee | src/Game/Yahtzee/Yahtzee.hs | bsd-2-clause | scoreRoll r FiveOfAKind
| maxEqualDie r == 5 = 50
| otherwise = 0 | 78 | scoreRoll r FiveOfAKind
| maxEqualDie r == 5 = 50
| otherwise = 0 | 78 | scoreRoll r FiveOfAKind
| maxEqualDie r == 5 = 50
| otherwise = 0 | 78 | false | false | 1 | 9 | 26 | 32 | 14 | 18 | null | null |
bgamari/GGen | GGen/Geometry/PolygonCSG.hs | gpl-3.0 | invertTaggedEdge :: (Edge, Tag) -> (Edge, Tag)
invertTaggedEdge = id | 68 | invertTaggedEdge :: (Edge, Tag) -> (Edge, Tag)
invertTaggedEdge = id | 68 | invertTaggedEdge = id | 21 | false | true | 0 | 6 | 9 | 27 | 16 | 11 | null | null |
Javran/misc | maze-gen/src/Main.hs | mit | pickOneFromSet :: Ord a => S.Set a -> State TFGen (a, S.Set a)
pickOneFromSet s = do
ind <- genNext (0, S.size s - 1)
let x = S.toAscList s !! ind
pure (x, S.delete x s)
-- cellSet: set of nodes contained in the maze
-- curPathRev: current path in reversed order. | 270 | pickOneFromSet :: Ord a => S.Set a -> State TFGen (a, S.Set a)
pickOneFromSet s = do
ind <- genNext (0, S.size s - 1)
let x = S.toAscList s !! ind
pure (x, S.delete x s)
-- cellSet: set of nodes contained in the maze
-- curPathRev: current path in reversed order. | 270 | pickOneFromSet s = do
ind <- genNext (0, S.size s - 1)
let x = S.toAscList s !! ind
pure (x, S.delete x s)
-- cellSet: set of nodes contained in the maze
-- curPathRev: current path in reversed order. | 207 | false | true | 0 | 12 | 59 | 110 | 53 | 57 | null | null |
ekmett/ghclive | prototypes/jqueryconsole/HintAjax.hs | bsd-3-clause | performHint :: Hint -> InterpreterT IO a -> IO (Either InterpreterError a)
performHint hint act = perform hint $ do
(Right `liftM` act) `catchError` (return . Left) -- can no longer do C-c !
{-
loadFile :: Hint -> FilePath -> IO ()
loadFile w filepath = perform w $ do
evaluate :: Hint -> Strin... | 475 | performHint :: Hint -> InterpreterT IO a -> IO (Either InterpreterError a)
performHint hint act = perform hint $ do
(Right `liftM` act) `catchError` (return . Left) -- can no longer do C-c !
{-
loadFile :: Hint -> FilePath -> IO ()
loadFile w filepath = perform w $ do
evaluate :: Hint -> Strin... | 475 | performHint hint act = perform hint $ do
(Right `liftM` act) `catchError` (return . Left) -- can no longer do C-c !
{-
loadFile :: Hint -> FilePath -> IO ()
loadFile w filepath = perform w $ do
evaluate :: Hint -> String -> IO String
evaluate w expr = perform w $ do
-- stopInterpreter :: ... | 400 | false | true | 0 | 11 | 119 | 80 | 41 | 39 | null | null |
willprice/camle-compiler | src/Language/Camle/JouetteBackend.hs | mit | modifyRegisterTable :: (RegisterTable -> RegisterTable) -> ASMGen ()
modifyRegisterTable fn = modify $ \s -> s { registerTable = fn $ registerTable s } | 151 | modifyRegisterTable :: (RegisterTable -> RegisterTable) -> ASMGen ()
modifyRegisterTable fn = modify $ \s -> s { registerTable = fn $ registerTable s } | 151 | modifyRegisterTable fn = modify $ \s -> s { registerTable = fn $ registerTable s } | 82 | false | true | 0 | 10 | 23 | 54 | 28 | 26 | null | null |
Fuuzetsu/yi-emacs-colours | src/Yi/Style/EmacsColours.hs | gpl-2.0 | -- | Names: @["LightYellow4"]@
--
-- R139 G139 B122, 0x8b8b7a
lightYellow4 :: Color
lightYellow4 = RGB 139 139 122 | 114 | lightYellow4 :: Color
lightYellow4 = RGB 139 139 122 | 52 | lightYellow4 = RGB 139 139 122 | 30 | true | true | 0 | 5 | 18 | 21 | 12 | 9 | null | null |
verement/etamoo | src/MOO/Compiler.hs | bsd-3-clause | expand [] = return [] | 21 | expand [] = return [] | 21 | expand [] = return [] | 21 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
mcschroeder/ghc | compiler/hsSyn/HsDecls.hs | bsd-3-clause | -- | Does this family declaration have a complete, user-supplied kind signature?
famDeclHasCusk :: Maybe Bool
-- ^ if associated, does the enclosing class have a CUSK?
-> FamilyDecl name -> Bool
famDeclHasCusk _ (FamilyDecl { fdInfo = ClosedTypeFamily _
... | 468 | famDeclHasCusk :: Maybe Bool
-- ^ if associated, does the enclosing class have a CUSK?
-> FamilyDecl name -> Bool
famDeclHasCusk _ (FamilyDecl { fdInfo = ClosedTypeFamily _
, fdTyVars = tyvars
, fdResultSig = L _ resultS... | 387 | famDeclHasCusk _ (FamilyDecl { fdInfo = ClosedTypeFamily _
, fdTyVars = tyvars
, fdResultSig = L _ resultSig })
= hsTvbAllKinded tyvars && hasReturnKindSignature resultSig | 239 | true | true | 0 | 10 | 158 | 74 | 38 | 36 | null | null |
rueshyna/gogol | gogol-compute/gen/Network/Google/Compute/Types/Product.hs | mpl-2.0 | -- | [Output Only] The fingerprint of the named ports. The system uses this
-- fingerprint to detect conflicts when multiple users change the named
-- ports concurrently.
iiFingerprint :: Lens' InstanceGroup (Maybe ByteString)
iiFingerprint
= lens _iiFingerprint
(\ s a -> s{_iiFingerprint = a})
. mapping ... | 326 | iiFingerprint :: Lens' InstanceGroup (Maybe ByteString)
iiFingerprint
= lens _iiFingerprint
(\ s a -> s{_iiFingerprint = a})
. mapping _Bytes | 155 | iiFingerprint
= lens _iiFingerprint
(\ s a -> s{_iiFingerprint = a})
. mapping _Bytes | 99 | true | true | 3 | 8 | 61 | 65 | 30 | 35 | null | null |
SkemaPlatform/skema-common | src/Skema/DataValue.hs | agpl-3.0 | dvToFloat (DVuchar v) = fromIntegral v | 38 | dvToFloat (DVuchar v) = fromIntegral v | 38 | dvToFloat (DVuchar v) = fromIntegral v | 38 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
cocreature/leksah | src/IDE/TextEditor/CodeMirror.hs | gpl-2.0 | isClean = js0 "isClean" | 33 | isClean = js0 "isClean" | 33 | isClean = js0 "isClean" | 33 | false | false | 0 | 5 | 13 | 9 | 4 | 5 | null | null |
hausdorff/pyli | src/Parser.hs | mit | emitElseClause :: (String,(String,String)) -> String
emitElseClause (_, (_, body)) = joinStrs [header, body, footer]
where header = "(else ("
footer = "))" | 165 | emitElseClause :: (String,(String,String)) -> String
emitElseClause (_, (_, body)) = joinStrs [header, body, footer]
where header = "(else ("
footer = "))" | 165 | emitElseClause (_, (_, body)) = joinStrs [header, body, footer]
where header = "(else ("
footer = "))" | 112 | false | true | 2 | 7 | 31 | 78 | 40 | 38 | null | null |
nicuveo/HCM | src/Card.hs | mit | isLegendary :: Card -> Bool
isLegendary c = cardRarity c == Legendary | 69 | isLegendary :: Card -> Bool
isLegendary c = cardRarity c == Legendary | 69 | isLegendary c = cardRarity c == Legendary | 41 | false | true | 0 | 6 | 11 | 25 | 12 | 13 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_RGBA32F_EXT :: GLenum
gl_RGBA32F_EXT = 0x8814 | 48 | gl_RGBA32F_EXT :: GLenum
gl_RGBA32F_EXT = 0x8814 | 48 | gl_RGBA32F_EXT = 0x8814 | 23 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
avieth/Algebraic | Data/Algebraic/Index.hs | bsd-3-clause | three :: Index 3
three = Index | 30 | three :: Index 3
three = Index | 30 | three = Index | 13 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
haskell-infra/arc-lite | src/Main.hs | gpl-3.0 | arcOpts :: Parser ArcOpts
arcOpts = ArcOpts
<$> switch (long "verbose" <> help "Whether to be verbose")
<*> optional (txtOption (long "conduit-token" <> metavar "TOKEN" <>
help "Ignore configured credentials and use an explicit API token instead"))
<*> optional (txtOption (l... | 1,031 | arcOpts :: Parser ArcOpts
arcOpts = ArcOpts
<$> switch (long "verbose" <> help "Whether to be verbose")
<*> optional (txtOption (long "conduit-token" <> metavar "TOKEN" <>
help "Ignore configured credentials and use an explicit API token instead"))
<*> optional (txtOption (l... | 1,031 | arcOpts = ArcOpts
<$> switch (long "verbose" <> help "Whether to be verbose")
<*> optional (txtOption (long "conduit-token" <> metavar "TOKEN" <>
help "Ignore configured credentials and use an explicit API token instead"))
<*> optional (txtOption (long "conduit-uri" <> metav... | 1,005 | false | true | 11 | 18 | 307 | 243 | 118 | 125 | null | null |
green-haskell/ghc | compiler/prelude/ForeignCall.hs | bsd-3-clause | playSafe PlayInterruptible = True | 33 | playSafe PlayInterruptible = True | 33 | playSafe PlayInterruptible = True | 33 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
futufeld/eclogues | eclogues-impl/gen-hs/ReadOnlyScheduler.hs | bsd-3-clause | write_GetPendingReason_args :: (T.Protocol p, T.Transport t) => p t -> GetPendingReason_args -> P.IO ()
write_GetPendingReason_args oprot record = T.writeVal oprot $ from_GetPendingReason_args record | 199 | write_GetPendingReason_args :: (T.Protocol p, T.Transport t) => p t -> GetPendingReason_args -> P.IO ()
write_GetPendingReason_args oprot record = T.writeVal oprot $ from_GetPendingReason_args record | 199 | write_GetPendingReason_args oprot record = T.writeVal oprot $ from_GetPendingReason_args record | 95 | false | true | 0 | 9 | 22 | 65 | 31 | 34 | null | null |
edsko/hackage-server | Distribution/Server/Features/Search/ExtractDescriptionTerms.hs | bsd-3-clause | splitTok :: String -> [String]
splitTok tok =
case go tok of
toks@(_:_:_) -> tok:toks
toks -> toks
where
go remaining =
case break (\c -> c == ')' || c == '-' || c == '/') remaining of
([], _:trailing) -> go trailing
(leading, _:trailing) -> leading : go trailing... | 402 | splitTok :: String -> [String]
splitTok tok =
case go tok of
toks@(_:_:_) -> tok:toks
toks -> toks
where
go remaining =
case break (\c -> c == ')' || c == '-' || c == '/') remaining of
([], _:trailing) -> go trailing
(leading, _:trailing) -> leading : go trailing... | 402 | splitTok tok =
case go tok of
toks@(_:_:_) -> tok:toks
toks -> toks
where
go remaining =
case break (\c -> c == ')' || c == '-' || c == '/') remaining of
([], _:trailing) -> go trailing
(leading, _:trailing) -> leading : go trailing
([], []) ... | 371 | false | true | 0 | 13 | 154 | 187 | 98 | 89 | null | null |
worksap-ate/aws-sdk | Cloud/AWS/EC2/RouteTable.hs | bsd-3-clause | associateRouteTable
:: (MonadResource m, MonadBaseControl IO m)
=> Text -- ^ RouteTableId
-> Text -- ^ SubnetId
-> EC2 m Text -- ^ associationId
associateRouteTable rtid sid =
ec2Query "AssociateRouteTable" params (.< "associationId")
where
params = [ "RouteTableId" |= rtid
, "Sub... | 497 | associateRouteTable
:: (MonadResource m, MonadBaseControl IO m)
=> Text -- ^ RouteTableId
-> Text -- ^ SubnetId
-> EC2 m Text
associateRouteTable rtid sid =
ec2Query "AssociateRouteTable" params (.< "associationId")
where
params = [ "RouteTableId" |= rtid
, "SubnetId" |= sid
... | 478 | associateRouteTable rtid sid =
ec2Query "AssociateRouteTable" params (.< "associationId")
where
params = [ "RouteTableId" |= rtid
, "SubnetId" |= sid
]
------------------------------------------------------------
-- disassociateRouteTable
--------------------------------------------... | 336 | true | true | 0 | 8 | 101 | 85 | 47 | 38 | null | null |
specify/TreeMap | Squarify.hs | gpl-2.0 | treeSize :: TreeMapTree -> Double
treeSize (Node (s, _) _) = fromIntegral s | 75 | treeSize :: TreeMapTree -> Double
treeSize (Node (s, _) _) = fromIntegral s | 75 | treeSize (Node (s, _) _) = fromIntegral s | 41 | false | true | 0 | 7 | 12 | 39 | 19 | 20 | null | null |
MichaeGon/stone | src/Eval.hs | bsd-3-clause | getLocalEnv _ = empty | 21 | getLocalEnv _ = empty | 21 | getLocalEnv _ = empty | 21 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
jtojnar/haste-compiler | libraries/ghc-7.10/base/GHC/List.hs | bsd-3-clause | foldr1 f (x:xs) = f x (foldr1 f xs) | 44 | foldr1 f (x:xs) = f x (foldr1 f xs) | 44 | foldr1 f (x:xs) = f x (foldr1 f xs) | 44 | false | false | 0 | 7 | 17 | 33 | 15 | 18 | null | null |
rvion/ride | jetpack/src/Data/Set/AsSet.hs | bsd-3-clause | -- set_difference :: forall a. Ord a => Set a -> Set a -> Set a
set_difference = I.difference | 93 | set_difference = I.difference | 29 | set_difference = I.difference | 29 | true | false | 0 | 5 | 18 | 9 | 5 | 4 | null | null |
spl/emgm | src/Generics/EMGM/Functions/Compare.hs | bsd-3-clause | rprodCompare :: Compare a -> Compare b -> a :*: b -> a :*: b -> Ordering
rprodCompare ra rb (a1 :*: b1) (a2 :*: b2) =
case selCompare ra a1 a2 of
EQ -> selCompare rb b1 b2
other -> other | 199 | rprodCompare :: Compare a -> Compare b -> a :*: b -> a :*: b -> Ordering
rprodCompare ra rb (a1 :*: b1) (a2 :*: b2) =
case selCompare ra a1 a2 of
EQ -> selCompare rb b1 b2
other -> other | 199 | rprodCompare ra rb (a1 :*: b1) (a2 :*: b2) =
case selCompare ra a1 a2 of
EQ -> selCompare rb b1 b2
other -> other | 126 | false | true | 0 | 9 | 54 | 94 | 46 | 48 | null | null |
pbrisbin/google-drive | test/Network/Google/Drive/UploadSpec.hs | mit | main :: IO ()
main = hspec spec | 31 | main :: IO ()
main = hspec spec | 31 | main = hspec spec | 17 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
mino2357/Hello_Haskell | digit.hsproj/Main.hs | mit | digitList :: Integer -> [Integer]
digitList n = toIntList $ show n
where
toIntList :: [Char] -> [Integer]
toIntList (n:ns)
| null ns = (toInteger $ digitToInt n):[]
| otherwise = (toInteger $ digitToInt n):toIntList ns | 240 | digitList :: Integer -> [Integer]
digitList n = toIntList $ show n
where
toIntList :: [Char] -> [Integer]
toIntList (n:ns)
| null ns = (toInteger $ digitToInt n):[]
| otherwise = (toInteger $ digitToInt n):toIntList ns | 240 | digitList n = toIntList $ show n
where
toIntList :: [Char] -> [Integer]
toIntList (n:ns)
| null ns = (toInteger $ digitToInt n):[]
| otherwise = (toInteger $ digitToInt n):toIntList ns | 206 | false | true | 1 | 9 | 57 | 110 | 55 | 55 | null | null |
tonymorris/geo-osm | src/Data/Geo/OSM/BoundOption.hs | bsd-3-clause | foldBoundOption ::
(Bound -> x)
-> (Bounds -> x)
-> x
-> BoundOption
-> x
foldBoundOption f _ _ (OptionBound b) =
f b | 129 | foldBoundOption ::
(Bound -> x)
-> (Bounds -> x)
-> x
-> BoundOption
-> x
foldBoundOption f _ _ (OptionBound b) =
f b | 129 | foldBoundOption f _ _ (OptionBound b) =
f b | 45 | false | true | 0 | 12 | 35 | 61 | 30 | 31 | null | null |
Alllex/stm-data-collection | src/Data/STM/PriorityQueue/Internal/THeapPQ.hs | bsd-3-clause | mk :: Ord k => k -> v -> TVar (Heap k v) -> TVar (Heap k v) -> STM (Heap k v)
mk k v vh1 vh2 = do
h1 <- readTVar vh1
h2 <- readTVar vh2
let (r1, r2) = both ((+1).rank) (h1, h2)
let ss = size h1 + size h2 + 1
return $ if r1 > r2
then Node r1 ss k v vh1 vh2
else Node r2 ss k v vh2 vh1
where
both f... | 340 | mk :: Ord k => k -> v -> TVar (Heap k v) -> TVar (Heap k v) -> STM (Heap k v)
mk k v vh1 vh2 = do
h1 <- readTVar vh1
h2 <- readTVar vh2
let (r1, r2) = both ((+1).rank) (h1, h2)
let ss = size h1 + size h2 + 1
return $ if r1 > r2
then Node r1 ss k v vh1 vh2
else Node r2 ss k v vh2 vh1
where
both f... | 340 | mk k v vh1 vh2 = do
h1 <- readTVar vh1
h2 <- readTVar vh2
let (r1, r2) = both ((+1).rank) (h1, h2)
let ss = size h1 + size h2 + 1
return $ if r1 > r2
then Node r1 ss k v vh1 vh2
else Node r2 ss k v vh2 vh1
where
both f (a, b) = (f a, f b) | 262 | false | true | 0 | 13 | 111 | 237 | 113 | 124 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/FileReader.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/FileReader.onloadstart Mozilla FileReader.onloadstart documentation>
loadStart :: EventName FileReader ProgressEvent
loadStart = unsafeEventNameAsync (toJSString "loadstart") | 230 | loadStart :: EventName FileReader ProgressEvent
loadStart = unsafeEventNameAsync (toJSString "loadstart") | 105 | loadStart = unsafeEventNameAsync (toJSString "loadstart") | 57 | true | true | 1 | 7 | 16 | 30 | 13 | 17 | null | null |
coghex/abridgefaraway | src/GLUtil/Font.hs | bsd-3-clause | findLetter KFFONT 'C' = (34, 14) | 33 | findLetter KFFONT 'C' = (34, 14) | 33 | findLetter KFFONT 'C' = (34, 14) | 33 | false | false | 0 | 5 | 6 | 19 | 9 | 10 | null | null |
dpzmick/io2js | test/Language/ParserSpec.hs | mit | spec :: Spec
spec = do
describe "parser" $ do
context "BinOp" $ do
it "should parse binary addition" $ do
let input = [NumberTok "12", AddTok, NumberTok "12"]
expr input `shouldBe` ProgEnd (BinOp Add (Number "12") (Number "12"))
it "should parse addit... | 1,471 | spec :: Spec
spec = do
describe "parser" $ do
context "BinOp" $ do
it "should parse binary addition" $ do
let input = [NumberTok "12", AddTok, NumberTok "12"]
expr input `shouldBe` ProgEnd (BinOp Add (Number "12") (Number "12"))
it "should parse addit... | 1,471 | spec = do
describe "parser" $ do
context "BinOp" $ do
it "should parse binary addition" $ do
let input = [NumberTok "12", AddTok, NumberTok "12"]
expr input `shouldBe` ProgEnd (BinOp Add (Number "12") (Number "12"))
it "should parse addition of more t... | 1,458 | false | true | 0 | 23 | 470 | 497 | 241 | 256 | null | null |
UCSD-PL/nano-js | Language/Nano/Errors.hs | bsd-3-clause | errorWrongType m e t t' = printf "%s -- unexpected type for %s :: %s expected %s" m (ppshow e) (ppshow t) (ppshow t') | 117 | errorWrongType m e t t' = printf "%s -- unexpected type for %s :: %s expected %s" m (ppshow e) (ppshow t) (ppshow t') | 117 | errorWrongType m e t t' = printf "%s -- unexpected type for %s :: %s expected %s" m (ppshow e) (ppshow t) (ppshow t') | 117 | false | false | 0 | 7 | 23 | 47 | 21 | 26 | null | null |
yliu120/K3 | src/Language/K3/Utils/Pretty/Syntax.hs | apache-2.0 | declS :: K3 Declaration -> Either String String
declS d = show C.<$> runSyntaxPrinter (decl d) | 94 | declS :: K3 Declaration -> Either String String
declS d = show C.<$> runSyntaxPrinter (decl d) | 94 | declS d = show C.<$> runSyntaxPrinter (decl d) | 46 | false | true | 0 | 8 | 15 | 41 | 19 | 22 | null | null |
Lainepress/hledger | hledger-chart/Hledger/Chart/Options.hs | gpl-3.0 | -- instance Default CliOpts where def = defcliopts
toChartOpts :: RawOpts -> IO ChartOpts
toChartOpts rawopts = do
cliopts <- toCliOpts rawopts
return defchartopts {
chart_output_ = fromMaybe defchartoutput $ maybestringopt "debug-chart" rawopts
,chart_items_ = fromMaybe defchartitems $ ... | 492 | toChartOpts :: RawOpts -> IO ChartOpts
toChartOpts rawopts = do
cliopts <- toCliOpts rawopts
return defchartopts {
chart_output_ = fromMaybe defchartoutput $ maybestringopt "debug-chart" rawopts
,chart_items_ = fromMaybe defchartitems $ maybeintopt "debug-items" rawopts
,char... | 440 | toChartOpts rawopts = do
cliopts <- toCliOpts rawopts
return defchartopts {
chart_output_ = fromMaybe defchartoutput $ maybestringopt "debug-chart" rawopts
,chart_items_ = fromMaybe defchartitems $ maybeintopt "debug-items" rawopts
,chart_size_ = fromMaybe defchartsize $ mayb... | 401 | true | true | 0 | 11 | 125 | 100 | 49 | 51 | null | null |
andreagenso/java2scala | src/J2s/Scanner.hs | apache-2.0 | takeHexaFloatLiteral2 (c1:c2:[]) = error ("Invalid Hexadecimal Floating Literal Number - 2.3") | 102 | takeHexaFloatLiteral2 (c1:c2:[]) = error ("Invalid Hexadecimal Floating Literal Number - 2.3") | 102 | takeHexaFloatLiteral2 (c1:c2:[]) = error ("Invalid Hexadecimal Floating Literal Number - 2.3") | 102 | false | false | 0 | 8 | 18 | 29 | 14 | 15 | null | null |
markus1189/xmonad-contrib-710 | XMonad/Hooks/DebugEvents.hs | bsd-3-clause | mwmState :: [String]
mwmState = ["tearoff window"
] | 64 | mwmState :: [String]
mwmState = ["tearoff window"
] | 64 | mwmState = ["tearoff window"
] | 43 | false | true | 0 | 5 | 20 | 17 | 10 | 7 | null | null |
christiannolte/tip-toi-reveng | src/GMEWriter.hs | mit | putCommand (Neg r) = do
putWord16 r
mapM_ putWord8 [0xF8, 0xFF]
putTVal (Const 0) | 93 | putCommand (Neg r) = do
putWord16 r
mapM_ putWord8 [0xF8, 0xFF]
putTVal (Const 0) | 93 | putCommand (Neg r) = do
putWord16 r
mapM_ putWord8 [0xF8, 0xFF]
putTVal (Const 0) | 93 | false | false | 0 | 9 | 25 | 47 | 21 | 26 | null | null |
edsko/cabal | cabal-install/Distribution/Client/Setup.hs | bsd-3-clause | configureOptions :: ShowOrParseArgs -> [OptionField ConfigFlags]
configureOptions = commandOptions configureCommand | 116 | configureOptions :: ShowOrParseArgs -> [OptionField ConfigFlags]
configureOptions = commandOptions configureCommand | 116 | configureOptions = commandOptions configureCommand | 50 | false | true | 0 | 7 | 10 | 24 | 12 | 12 | null | null |
apyrgio/ganeti | src/Ganeti/Query/Server.hs | bsd-2-clause | withLockedWconfdConfig
:: (MonadBase IO m, MonadError GanetiException m)
=> ClientId
-> (ConfigData -> RpcClientMonad a)
-> m a
withLockedWconfdConfig cid f = do
wconfdClient <- liftBase $ getWConfdClient =<< Path.defaultWConfdSocket
runRpcClient (withLockedConfig cid False f) wconfdClient
-- | Helper for ... | 336 | withLockedWconfdConfig
:: (MonadBase IO m, MonadError GanetiException m)
=> ClientId
-> (ConfigData -> RpcClientMonad a)
-> m a
withLockedWconfdConfig cid f = do
wconfdClient <- liftBase $ getWConfdClient =<< Path.defaultWConfdSocket
runRpcClient (withLockedConfig cid False f) wconfdClient
-- | Helper for ... | 336 | withLockedWconfdConfig cid f = do
wconfdClient <- liftBase $ getWConfdClient =<< Path.defaultWConfdSocket
runRpcClient (withLockedConfig cid False f) wconfdClient
-- | Helper for classic queries. | 200 | false | true | 0 | 11 | 54 | 97 | 46 | 51 | null | null |
mettekou/ghc | compiler/main/TidyPgm.hs | bsd-3-clause | tidyTopPair :: DynFlags
-> Bool -- show unfolding
-> TidyEnv -- The TidyEnv is used to tidy the IdInfo
-- It is knot-tied: don't look at it!
-> CafInfo
-> Name -- New name
-> (Id, CoreExpr) -- Binder and RHS before tidyi... | 1,696 | tidyTopPair :: DynFlags
-> Bool -- show unfolding
-> TidyEnv -- The TidyEnv is used to tidy the IdInfo
-- It is knot-tied: don't look at it!
-> CafInfo
-> Name -- New name
-> (Id, CoreExpr) -- Binder and RHS before tidyi... | 1,398 | tidyTopPair dflags show_unfold rhs_tidy_env caf_info name' (bndr, rhs)
= (bndr1, rhs1)
where
bndr1 = mkGlobalId details name' ty' idinfo'
details = idDetails bndr -- Preserve the IdDetails
ty' = tidyTopType (idType bndr)
rhs1 = tidyExpr rhs_tidy_env rhs
idinfo' = tidyTopIdInfo df... | 1,045 | true | true | 4 | 13 | 509 | 196 | 102 | 94 | null | null |
cwlmyjm/haskell | Learning/WriterTest.hs | mpl-2.0 | appendArray :: Array a -> Array a -> Array a
appendArray (Array a) (Array b) = Array (a ++ b) | 93 | appendArray :: Array a -> Array a -> Array a
appendArray (Array a) (Array b) = Array (a ++ b) | 93 | appendArray (Array a) (Array b) = Array (a ++ b) | 48 | false | true | 0 | 10 | 19 | 59 | 27 | 32 | null | null |
shlevy/ghc | compiler/simplCore/OccurAnal.hs | bsd-3-clause | wrapAltRHS _ _ alt_usg _ alt_rhs
= (alt_usg, alt_rhs) | 55 | wrapAltRHS _ _ alt_usg _ alt_rhs
= (alt_usg, alt_rhs) | 55 | wrapAltRHS _ _ alt_usg _ alt_rhs
= (alt_usg, alt_rhs) | 55 | false | false | 0 | 5 | 10 | 23 | 12 | 11 | null | null |
GaloisInc/saw-script | intTests/IntegrationTest.hs | bsd-3-clause | envVarAssocList :: [EnvVarSpec] -> [(String, String)]
envVarAssocList = map envVarAssoc
where
envVarAssoc (EV n v) = (n, v)
envVarAssoc (EVp n s vs) = (n, intercalate [s] vs)
-- ----------------------------------------------------------------------
-- * Test Parameters
--
-- Determine all Environment Va... | 1,404 | envVarAssocList :: [EnvVarSpec] -> [(String, String)]
envVarAssocList = map envVarAssoc
where
envVarAssoc (EV n v) = (n, v)
envVarAssoc (EVp n s vs) = (n, intercalate [s] vs)
-- ----------------------------------------------------------------------
-- * Test Parameters
--
-- Determine all Environment Va... | 1,404 | envVarAssocList = map envVarAssoc
where
envVarAssoc (EV n v) = (n, v)
envVarAssoc (EVp n s vs) = (n, intercalate [s] vs)
-- ----------------------------------------------------------------------
-- * Test Parameters
--
-- Determine all Environment Variables that should be set for the
-- tests, using th... | 1,350 | false | true | 1 | 8 | 286 | 114 | 74 | 40 | null | null |
boundedvariation/Freecell | solver.hs | mit | suitChar :: Suit -> Char
suitChar s = case s of
Heart -> 'H'
Club -> 'C'
Diamond -> 'D'
Spade -> 'S'
-- |Returns a string for each card. | 160 | suitChar :: Suit -> Char
suitChar s = case s of
Heart -> 'H'
Club -> 'C'
Diamond -> 'D'
Spade -> 'S'
-- |Returns a string for each card. | 160 | suitChar s = case s of
Heart -> 'H'
Club -> 'C'
Diamond -> 'D'
Spade -> 'S'
-- |Returns a string for each card. | 135 | false | true | 4 | 5 | 53 | 54 | 24 | 30 | null | null |
gridaphobe/target | examples/XMonad/Properties.hs | mit | screenElts :: Ord a => Screen i l a sid sd -> Set.Set a
screenElts s = workspaceElts (workspace s) | 98 | screenElts :: Ord a => Screen i l a sid sd -> Set.Set a
screenElts s = workspaceElts (workspace s) | 98 | screenElts s = workspaceElts (workspace s) | 42 | false | true | 0 | 8 | 19 | 50 | 23 | 27 | null | null |
snoyberg/ghc | compiler/main/HscMain.hs | bsd-3-clause | {- **********************************************************************
%* *
Initialisation
%* *
%******************************************************************... | 1,176 | newHscEnv :: DynFlags -> IO HscEnv
newHscEnv dflags = do
eps_var <- newIORef initExternalPackageState
us <- mkSplitUniqSupply 'r'
nc_var <- newIORef (initNameCache us allKnownKeyNames)
fc_var <- newIORef emptyInstalledModuleEnv
#ifdef GHCI
iserv_mvar <- newMVar Nothing
#endif
return HscEn... | 848 | newHscEnv dflags = do
eps_var <- newIORef initExternalPackageState
us <- mkSplitUniqSupply 'r'
nc_var <- newIORef (initNameCache us allKnownKeyNames)
fc_var <- newIORef emptyInstalledModuleEnv
#ifdef GHCI
iserv_mvar <- newMVar Nothing
#endif
return HscEnv { hsc_dflags = dflags
... | 813 | true | true | 0 | 10 | 534 | 159 | 85 | 74 | null | null |
pbl64k/HackerRank-Contests | 2014-10-10-FP/CaptainPrime/cp.accepted.hs | bsd-2-clause | mergePh x EmptyPh = x | 21 | mergePh x EmptyPh = x | 21 | mergePh x EmptyPh = x | 21 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
gridaphobe/ghc | compiler/deSugar/DsArrows.hs | bsd-3-clause | trimInput
:: ([Id] -> DsM (CoreExpr, IdSet))
-> DsM (CoreExpr, -- desugared expression
IdSet, -- subset of local vars that occur free
[Id]) -- same local vars as a list, fed back to
-- the inner function to form the... | 555 | trimInput
:: ([Id] -> DsM (CoreExpr, IdSet))
-> DsM (CoreExpr, -- desugared expression
IdSet, -- subset of local vars that occur free
[Id])
trimInput build_arrow
= fixDs (\ ~(_,_,env_ids) -> do
(core_cmd, free_vars) <- build_arrow env_ids
... | 372 | trimInput build_arrow
= fixDs (\ ~(_,_,env_ids) -> do
(core_cmd, free_vars) <- build_arrow env_ids
return (core_cmd, free_vars, varSetElems free_vars)) | 169 | true | true | 0 | 12 | 219 | 112 | 63 | 49 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-example/Drasil/NoPCM/Changes.hs | bsd-2-clause | unlikelyChgs :: [ConceptInstance]
unlikelyChgs = [unlikeChgWFS, unlikeChgNIHG] | 78 | unlikelyChgs :: [ConceptInstance]
unlikelyChgs = [unlikeChgWFS, unlikeChgNIHG] | 78 | unlikelyChgs = [unlikeChgWFS, unlikeChgNIHG] | 44 | false | true | 0 | 7 | 6 | 27 | 13 | 14 | null | null |
kevintvh/sodium | haskell/src/FRP/Sodium/Plain.hs | bsd-3-clause | newNode :: IO (MVar Node)
newNode = do
nodeID <- readIORef (paNextNodeID partition)
modifyIORef (paNextNodeID partition) succ
newMVar (Node nodeID 0 M.empty) | 169 | newNode :: IO (MVar Node)
newNode = do
nodeID <- readIORef (paNextNodeID partition)
modifyIORef (paNextNodeID partition) succ
newMVar (Node nodeID 0 M.empty) | 169 | newNode = do
nodeID <- readIORef (paNextNodeID partition)
modifyIORef (paNextNodeID partition) succ
newMVar (Node nodeID 0 M.empty) | 143 | false | true | 0 | 10 | 33 | 68 | 31 | 37 | null | null |
grsmv/sllar-client | src/Common.hs | mit | color :: Color -> String -> IO ()
color color' msg = do
setSGR [ SetConsoleIntensity BoldIntensity
, SetColor Foreground Vivid color' ]
putStr msg
setSGR [Reset]
--
-- Bunch of public colorizing helpers
-- Input: text to colorize
-- Output: IO action
-- | 278 | color :: Color -> String -> IO ()
color color' msg = do
setSGR [ SetConsoleIntensity BoldIntensity
, SetColor Foreground Vivid color' ]
putStr msg
setSGR [Reset]
--
-- Bunch of public colorizing helpers
-- Input: text to colorize
-- Output: IO action
-- | 278 | color color' msg = do
setSGR [ SetConsoleIntensity BoldIntensity
, SetColor Foreground Vivid color' ]
putStr msg
setSGR [Reset]
--
-- Bunch of public colorizing helpers
-- Input: text to colorize
-- Output: IO action
-- | 244 | false | true | 0 | 10 | 68 | 76 | 36 | 40 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | action_422 (107#) = happyGoto action_528 | 40 | action_422 (107#) = happyGoto action_528 | 40 | action_422 (107#) = happyGoto action_528 | 40 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Atomic/HandleAtomicWrite.hs | bsd-3-clause | discoverKind :: MonadStateWrite m => ItemKindIx -> ContentId ItemKind -> m ()
discoverKind ix kindId = do
let f Nothing = Just kindId
f Just{} = error $ "already discovered" `showFailure` (ix, kindId)
modifyState $ updateDiscoKind $ \discoKind1 ->
EM.alter f ix discoKind1 | 286 | discoverKind :: MonadStateWrite m => ItemKindIx -> ContentId ItemKind -> m ()
discoverKind ix kindId = do
let f Nothing = Just kindId
f Just{} = error $ "already discovered" `showFailure` (ix, kindId)
modifyState $ updateDiscoKind $ \discoKind1 ->
EM.alter f ix discoKind1 | 286 | discoverKind ix kindId = do
let f Nothing = Just kindId
f Just{} = error $ "already discovered" `showFailure` (ix, kindId)
modifyState $ updateDiscoKind $ \discoKind1 ->
EM.alter f ix discoKind1 | 208 | false | true | 0 | 11 | 56 | 107 | 52 | 55 | null | null |
chadbrewbaker/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_checkCharRangeGlob1 = verify checkCharRangeGlob "ls *[:digit:].jpg" | 72 | prop_checkCharRangeGlob1 = verify checkCharRangeGlob "ls *[:digit:].jpg" | 72 | prop_checkCharRangeGlob1 = verify checkCharRangeGlob "ls *[:digit:].jpg" | 72 | false | false | 0 | 5 | 5 | 11 | 5 | 6 | null | null |
bens/hurtle | src/System/Hurtle/Log.hs | apache-2.0 | nextId :: Id -> Id
nextId (Id x) = Id (1+x) | 43 | nextId :: Id -> Id
nextId (Id x) = Id (1+x) | 43 | nextId (Id x) = Id (1+x) | 24 | false | true | 0 | 7 | 10 | 34 | 17 | 17 | null | null |
diagrams/diagrams-bench | examples/Poster.hs | bsd-3-clause | -- Put it all together
recursion =
hsep 3
[ vsep 2
[ abstract 3
, abstract 5
]
# centerXY
, build 60 # scale 2 # centerXY
]
# centerXY | 161 | recursion =
hsep 3
[ vsep 2
[ abstract 3
, abstract 5
]
# centerXY
, build 60 # scale 2 # centerXY
]
# centerXY | 137 | recursion =
hsep 3
[ vsep 2
[ abstract 3
, abstract 5
]
# centerXY
, build 60 # scale 2 # centerXY
]
# centerXY | 137 | true | false | 2 | 9 | 58 | 60 | 28 | 32 | null | null |
kolmodin/cabal | cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs | bsd-3-clause | -- | Show that we can skip some decisions
dbBJ1b :: ExampleDb
dbBJ1b = [
Right $ exAv "A" 1 [ExFix "B" 1]
, Right $ exAv "A" 2 [ExFix "B" 2, ExAny "C"]
, Right $ exAv "B" 1 []
, Right $ exAv "C" 1 []
, Right $ exAv "C" 2 []
] | 239 | dbBJ1b :: ExampleDb
dbBJ1b = [
Right $ exAv "A" 1 [ExFix "B" 1]
, Right $ exAv "A" 2 [ExFix "B" 2, ExAny "C"]
, Right $ exAv "B" 1 []
, Right $ exAv "C" 1 []
, Right $ exAv "C" 2 []
] | 197 | dbBJ1b = [
Right $ exAv "A" 1 [ExFix "B" 1]
, Right $ exAv "A" 2 [ExFix "B" 2, ExAny "C"]
, Right $ exAv "B" 1 []
, Right $ exAv "C" 1 []
, Right $ exAv "C" 2 []
] | 177 | true | true | 0 | 9 | 69 | 110 | 56 | 54 | null | null |
xenog/json-rpc | src/Network/JSONRPC/Data.hs | unlicense | fromError (ErrorVal v) = valueAsString v | 40 | fromError (ErrorVal v) = valueAsString v | 40 | fromError (ErrorVal v) = valueAsString v | 40 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
GaloisInc/halvm-ghc | compiler/main/ErrUtils.hs | bsd-3-clause | fatalErrorMsg' :: LogAction -> DynFlags -> MsgDoc -> IO ()
fatalErrorMsg' la dflags msg =
la dflags NoReason SevFatal noSrcSpan (defaultErrStyle dflags) msg | 160 | fatalErrorMsg' :: LogAction -> DynFlags -> MsgDoc -> IO ()
fatalErrorMsg' la dflags msg =
la dflags NoReason SevFatal noSrcSpan (defaultErrStyle dflags) msg | 160 | fatalErrorMsg' la dflags msg =
la dflags NoReason SevFatal noSrcSpan (defaultErrStyle dflags) msg | 101 | false | true | 0 | 9 | 26 | 55 | 26 | 29 | null | null |
TikhonJelvis/TPL | test/TPL/Test/Parse.hs | gpl-3.0 | nullStr = return "null" | 28 | nullStr = return "null" | 28 | nullStr = return "null" | 28 | false | false | 0 | 5 | 8 | 9 | 4 | 5 | null | null |
dcreager/cabal | Distribution/ParseUtils.hs | bsd-3-clause | braces _ _ (OpenBracket n:_) = syntaxError n "unexpected '{'" | 63 | braces _ _ (OpenBracket n:_) = syntaxError n "unexpected '{'" | 63 | braces _ _ (OpenBracket n:_) = syntaxError n "unexpected '{'" | 63 | false | false | 0 | 8 | 11 | 28 | 13 | 15 | null | null |
luigy/stack | src/Stack/Build/Source.hs | bsd-3-clause | loadLocalPackage
:: forall m env.
(MonadReader env m, HasEnvConfig env, MonadCatch m, MonadLogger m, MonadIO m)
=> BuildOpts
-> Map PackageName SimpleTarget
-> (PackageName, (LocalPackageView, GenericPackageDescription))
-> m LocalPackage
loadLocalPackage bopts targets (name, (lpv, gpkg)) = d... | 3,746 | loadLocalPackage
:: forall m env.
(MonadReader env m, HasEnvConfig env, MonadCatch m, MonadLogger m, MonadIO m)
=> BuildOpts
-> Map PackageName SimpleTarget
-> (PackageName, (LocalPackageView, GenericPackageDescription))
-> m LocalPackage
loadLocalPackage bopts targets (name, (lpv, gpkg)) = d... | 3,746 | loadLocalPackage bopts targets (name, (lpv, gpkg)) = do
config <- getPackageConfig bopts name
let pkg = resolvePackage config gpkg
mtarget = Map.lookup name targets
(exes, tests, benches) =
case mtarget of
Just (STLocalComps comps) -> splitComponents $ Set.toList c... | 3,480 | false | true | 0 | 21 | 1,299 | 830 | 431 | 399 | null | null |
lucasbraun/mt-rewrite | src/MtUtils.hs | bsd-3-clause | reduceIdentifiers [] = [] | 25 | reduceIdentifiers [] = [] | 25 | reduceIdentifiers [] = [] | 25 | false | false | 0 | 6 | 3 | 13 | 6 | 7 | null | null |
srhb/quickcheck | examples/Heap_ProgramAlgebraic.hs | bsd-3-clause | h1@(Node x h11 h12) `merge` h2@(Node y h21 h22)
| x <= y = Node x (h12 `merge` h2) h11
| otherwise = Node y (h22 `merge` h1) h21 | 135 | h1@(Node x h11 h12) `merge` h2@(Node y h21 h22)
| x <= y = Node x (h12 `merge` h2) h11
| otherwise = Node y (h22 `merge` h1) h21 | 135 | h1@(Node x h11 h12) `merge` h2@(Node y h21 h22)
| x <= y = Node x (h12 `merge` h2) h11
| otherwise = Node y (h22 `merge` h1) h21 | 135 | false | false | 2 | 9 | 35 | 92 | 47 | 45 | null | null |
gspindles/rftg-cards | src/Game/RftG/Cards/Base.hs | mit | pilgrimageWorld :: Card
pilgrimageWorld = Card
(World Grey)
"PILGRIMAGE WORLD"
(Cost 0)
(VP 2)
Nothing
[]
[Consume] | 129 | pilgrimageWorld :: Card
pilgrimageWorld = Card
(World Grey)
"PILGRIMAGE WORLD"
(Cost 0)
(VP 2)
Nothing
[]
[Consume] | 129 | pilgrimageWorld = Card
(World Grey)
"PILGRIMAGE WORLD"
(Cost 0)
(VP 2)
Nothing
[]
[Consume] | 105 | false | true | 0 | 6 | 30 | 55 | 25 | 30 | null | null |
copton/ocram | ocram/src/Ocram/Intermediate/DesugarControlStructures.hs | gpl-2.0 | tStmt x = return [fmap node_start x] | 36 | tStmt x = return [fmap node_start x] | 36 | tStmt x = return [fmap node_start x] | 36 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
mettekou/ghc | compiler/coreSyn/CoreUtils.hs | bsd-3-clause | altsAreExhaustive :: [Alt b] -> Bool
-- True <=> the case alternatives are definiely exhaustive
-- False <=> they may or may not be
altsAreExhaustive []
= False | 163 | altsAreExhaustive :: [Alt b] -> Bool
altsAreExhaustive []
= False | 67 | altsAreExhaustive []
= False | 30 | true | true | 0 | 7 | 30 | 28 | 15 | 13 | null | null |
csrhodes/pandoc | src/Text/Pandoc/Writers/DokuWiki.hs | gpl-2.0 | blockToDokuWiki _ (RawBlock f str)
| f == Format "dokuwiki" = return str
-- See https://www.dokuwiki.org/wiki:syntax
-- use uppercase HTML tag for block-level content:
| f == Format "html" = return $ "<HTML>\n" ++ str ++ "\n</HTML>"
| otherwise = return "" | 283 | blockToDokuWiki _ (RawBlock f str)
| f == Format "dokuwiki" = return str
-- See https://www.dokuwiki.org/wiki:syntax
-- use uppercase HTML tag for block-level content:
| f == Format "html" = return $ "<HTML>\n" ++ str ++ "\n</HTML>"
| otherwise = return "" | 283 | blockToDokuWiki _ (RawBlock f str)
| f == Format "dokuwiki" = return str
-- See https://www.dokuwiki.org/wiki:syntax
-- use uppercase HTML tag for block-level content:
| f == Format "html" = return $ "<HTML>\n" ++ str ++ "\n</HTML>"
| otherwise = return "" | 283 | false | false | 2 | 9 | 68 | 75 | 35 | 40 | null | null |
OpenXT/idl | rpcgen/Backend/Haskell.hs | gpl-2.0 | -- | dbus type mapping
haskellType :: D.Type -> HaskellType
haskellType D.DBusBoolean = HaskellType "Bool" | 109 | haskellType :: D.Type -> HaskellType
haskellType D.DBusBoolean = HaskellType "Bool" | 86 | haskellType D.DBusBoolean = HaskellType "Bool" | 49 | true | true | 0 | 6 | 17 | 26 | 13 | 13 | null | null |
Heather/Idris-dev | src/Idris/IdrisDoc.hs | bsd-3-clause | extractPTermNames (PPi _ n _ p1 p2) = n : concatMap extract [p1, p2] | 69 | extractPTermNames (PPi _ n _ p1 p2) = n : concatMap extract [p1, p2] | 69 | extractPTermNames (PPi _ n _ p1 p2) = n : concatMap extract [p1, p2] | 69 | false | false | 0 | 7 | 14 | 39 | 19 | 20 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2018/M11/D23/Solution.hs | mit | ha4 f (x:xs) (ans:anss) =
ha4 f xs (if x == f ans then anss else (ans:ha4' f x anss)) | 88 | ha4 f (x:xs) (ans:anss) =
ha4 f xs (if x == f ans then anss else (ans:ha4' f x anss)) | 88 | ha4 f (x:xs) (ans:anss) =
ha4 f xs (if x == f ans then anss else (ans:ha4' f x anss)) | 88 | false | false | 0 | 10 | 22 | 66 | 34 | 32 | null | null |
wangbj/haskell | div2.hs | bsd-2-clause | roundup lo p = let !r = (lo+p-1)`div`p * p in r | 47 | roundup lo p = let !r = (lo+p-1)`div`p * p in r | 47 | roundup lo p = let !r = (lo+p-1)`div`p * p in r | 47 | false | false | 1 | 13 | 11 | 50 | 22 | 28 | null | null |
albertov/hs-mapnik | pure/src/Mapnik/QuickCheck.hs | bsd-3-clause | arbitraryLinePatternSym = do
file <- arbitrary
opacity <- arbitrary
offset <- arbitrary
imageTransform <- arbitrary
simplifyTolerance <- arbitrary
smooth <- arbitrary
clip <- arbitrary
compOp <- arbitrary
geometryTransform <- arbitrar... | 387 | arbitraryLinePatternSym = do
file <- arbitrary
opacity <- arbitrary
offset <- arbitrary
imageTransform <- arbitrary
simplifyTolerance <- arbitrary
smooth <- arbitrary
clip <- arbitrary
compOp <- arbitrary
geometryTransform <- arbitrar... | 387 | arbitraryLinePatternSym = do
file <- arbitrary
opacity <- arbitrary
offset <- arbitrary
imageTransform <- arbitrary
simplifyTolerance <- arbitrary
smooth <- arbitrary
clip <- arbitrary
compOp <- arbitrary
geometryTransform <- arbitrar... | 387 | false | false | 0 | 8 | 124 | 87 | 38 | 49 | null | null |
kohabi/rxquiz | src/Drugs.hs | unlicense | brandQuiz = mapMaybe brandPrompt drugs | 38 | brandQuiz = mapMaybe brandPrompt drugs | 38 | brandQuiz = mapMaybe brandPrompt drugs | 38 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
cgo/jalla | Numeric/Jalla/Matrix.hs | gpl-3.0 | columnsRef m = map (columnRef m) [0..(colCount m)-1] | 52 | columnsRef m = map (columnRef m) [0..(colCount m)-1] | 52 | columnsRef m = map (columnRef m) [0..(colCount m)-1] | 52 | false | false | 1 | 9 | 7 | 39 | 17 | 22 | null | null |
dicomgrid/dicom-haskell-library | src/Data/DICOM/Object.hs | gpl-3.0 | -- Date/time value representations
da :: Tag -> UTCTime -> Element
da t = element DA t . BC.pack . formatTime defaultTimeLocale "%Y%m%d" | 137 | da :: Tag -> UTCTime -> Element
da t = element DA t . BC.pack . formatTime defaultTimeLocale "%Y%m%d" | 101 | da t = element DA t . BC.pack . formatTime defaultTimeLocale "%Y%m%d" | 69 | true | true | 0 | 7 | 23 | 43 | 21 | 22 | null | null |
infotroph/pandoc | src/Text/Pandoc/Readers/Org/Blocks.hs | gpl-2.0 | tableHline :: OrgParser OrgTableRow
tableHline = try $
OrgHlineRow <$ (tableStart *> char '-' *> anyLine) | 107 | tableHline :: OrgParser OrgTableRow
tableHline = try $
OrgHlineRow <$ (tableStart *> char '-' *> anyLine) | 107 | tableHline = try $
OrgHlineRow <$ (tableStart *> char '-' *> anyLine) | 71 | false | true | 0 | 9 | 17 | 36 | 18 | 18 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.