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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nevrenato/Hets_Fork
|
Static/FromXml.hs
|
gpl-2.0
|
generateNodeLab :: HetcatsOpts -> LogicGraph -> Maybe G_theory -> XNode
-> (DGraph, LibEnv) -> ResultT IO (DGNodeLab, LibEnv)
generateNodeLab opts lg mGt xNd (dg, lv) = case xNd of
-- Case #1: Reference Node
XRef nm rfNd rfLb spc -> do
(dg', lv') <- case Map.lookup (emptyLibName rfLb) lv of
Just dg' -> return (dg', lv)
Nothing -> loadRefLib opts rfLb lv
(i, gt) <- case lookupUniqueNodeByName rfNd dg' of
Just (i, lbl) -> case signOf $ dgn_theory lbl of
G_sign lid sign sId -> return (i, noSensGTheory lid sign sId)
Nothing -> fail $ "reference node " ++ rfNd ++ " was not found"
(gt', _) <- parseSpecs gt nm dg spc
let nInf = newRefInfo (emptyLibName rfLb) i
return (newInfoNodeLab nm nInf gt', lv')
-- Case #2: Regular Node
XNode nm lN (hid, syb) spc cc -> do
-- StartOff-Theory. Taken from LogicGraph for initial Nodes
gt0 <- case mGt of
Nothing -> fmap emptyTheory $ lookupLogic "generateNodeLab " lN lg
Just gt -> return gt
-- hidden symbols use a different parser
gt1 <- if hid then parseHidden gt0 syb
else fmap fst $ parseSpecs gt0 nm dg syb
(gt2, syb') <- parseSpecs gt1 nm dg spc
-- the DGOrigin is also different for nodes with hidden symbols
lOrig <- if hid then let
syms = Set.difference (symsOfGsign $ signOf gt0)
$ symsOfGsign $ signOf gt2
in return $ DGRestriction NoRestriction syms
else do
diffSig <- liftR $ homGsigDiff (signOf gt2) $ signOf gt0
return $ DGBasicSpec Nothing diffSig syb'
return (newInfoNodeLab nm (newConsNodeInfo lOrig cc) gt2, lv)
| 1,783 |
generateNodeLab :: HetcatsOpts -> LogicGraph -> Maybe G_theory -> XNode
-> (DGraph, LibEnv) -> ResultT IO (DGNodeLab, LibEnv)
generateNodeLab opts lg mGt xNd (dg, lv) = case xNd of
-- Case #1: Reference Node
XRef nm rfNd rfLb spc -> do
(dg', lv') <- case Map.lookup (emptyLibName rfLb) lv of
Just dg' -> return (dg', lv)
Nothing -> loadRefLib opts rfLb lv
(i, gt) <- case lookupUniqueNodeByName rfNd dg' of
Just (i, lbl) -> case signOf $ dgn_theory lbl of
G_sign lid sign sId -> return (i, noSensGTheory lid sign sId)
Nothing -> fail $ "reference node " ++ rfNd ++ " was not found"
(gt', _) <- parseSpecs gt nm dg spc
let nInf = newRefInfo (emptyLibName rfLb) i
return (newInfoNodeLab nm nInf gt', lv')
-- Case #2: Regular Node
XNode nm lN (hid, syb) spc cc -> do
-- StartOff-Theory. Taken from LogicGraph for initial Nodes
gt0 <- case mGt of
Nothing -> fmap emptyTheory $ lookupLogic "generateNodeLab " lN lg
Just gt -> return gt
-- hidden symbols use a different parser
gt1 <- if hid then parseHidden gt0 syb
else fmap fst $ parseSpecs gt0 nm dg syb
(gt2, syb') <- parseSpecs gt1 nm dg spc
-- the DGOrigin is also different for nodes with hidden symbols
lOrig <- if hid then let
syms = Set.difference (symsOfGsign $ signOf gt0)
$ symsOfGsign $ signOf gt2
in return $ DGRestriction NoRestriction syms
else do
diffSig <- liftR $ homGsigDiff (signOf gt2) $ signOf gt0
return $ DGBasicSpec Nothing diffSig syb'
return (newInfoNodeLab nm (newConsNodeInfo lOrig cc) gt2, lv)
| 1,783 |
generateNodeLab opts lg mGt xNd (dg, lv) = case xNd of
-- Case #1: Reference Node
XRef nm rfNd rfLb spc -> do
(dg', lv') <- case Map.lookup (emptyLibName rfLb) lv of
Just dg' -> return (dg', lv)
Nothing -> loadRefLib opts rfLb lv
(i, gt) <- case lookupUniqueNodeByName rfNd dg' of
Just (i, lbl) -> case signOf $ dgn_theory lbl of
G_sign lid sign sId -> return (i, noSensGTheory lid sign sId)
Nothing -> fail $ "reference node " ++ rfNd ++ " was not found"
(gt', _) <- parseSpecs gt nm dg spc
let nInf = newRefInfo (emptyLibName rfLb) i
return (newInfoNodeLab nm nInf gt', lv')
-- Case #2: Regular Node
XNode nm lN (hid, syb) spc cc -> do
-- StartOff-Theory. Taken from LogicGraph for initial Nodes
gt0 <- case mGt of
Nothing -> fmap emptyTheory $ lookupLogic "generateNodeLab " lN lg
Just gt -> return gt
-- hidden symbols use a different parser
gt1 <- if hid then parseHidden gt0 syb
else fmap fst $ parseSpecs gt0 nm dg syb
(gt2, syb') <- parseSpecs gt1 nm dg spc
-- the DGOrigin is also different for nodes with hidden symbols
lOrig <- if hid then let
syms = Set.difference (symsOfGsign $ signOf gt0)
$ symsOfGsign $ signOf gt2
in return $ DGRestriction NoRestriction syms
else do
diffSig <- liftR $ homGsigDiff (signOf gt2) $ signOf gt0
return $ DGBasicSpec Nothing diffSig syb'
return (newInfoNodeLab nm (newConsNodeInfo lOrig cc) gt2, lv)
| 1,655 | false | true | 0 | 21 | 573 | 563 | 275 | 288 | null | null |
DamienCassou/HYahtzee
|
Game/HYahtzee/Engine/Logic.hs
|
bsd-3-clause
|
chSelection :: Choice YLabel YData
chSelection = Choice selectionIsOk trRethrow trSelectDices
| 94 |
chSelection :: Choice YLabel YData
chSelection = Choice selectionIsOk trRethrow trSelectDices
| 94 |
chSelection = Choice selectionIsOk trRethrow trSelectDices
| 59 | false | true | 1 | 5 | 11 | 26 | 11 | 15 | null | null |
zaxtax/hakaru
|
haskell/Language/Hakaru/Parser/Maple.hs
|
bsd-3-clause
|
maple2AST (InertArgs Func
[ InertName "BucketIE"
, InertArgs ExpSeq
[ f
, InertArgs Equal
[ InertName x
, InertArgs Range [lo, hi]]]]) =
Bucket x (maple2AST lo) (maple2AST hi) (maple2ReducerAST f)
| 264 |
maple2AST (InertArgs Func
[ InertName "BucketIE"
, InertArgs ExpSeq
[ f
, InertArgs Equal
[ InertName x
, InertArgs Range [lo, hi]]]]) =
Bucket x (maple2AST lo) (maple2AST hi) (maple2ReducerAST f)
| 264 |
maple2AST (InertArgs Func
[ InertName "BucketIE"
, InertArgs ExpSeq
[ f
, InertArgs Equal
[ InertName x
, InertArgs Range [lo, hi]]]]) =
Bucket x (maple2AST lo) (maple2AST hi) (maple2ReducerAST f)
| 264 | false | false | 0 | 13 | 98 | 92 | 45 | 47 | null | null |
jaspervdj/patat
|
lib/Patat/Presentation/Instruction.hs
|
gpl-2.0
|
isPause :: Instruction a -> Bool
isPause Pause = True
| 53 |
isPause :: Instruction a -> Bool
isPause Pause = True
| 53 |
isPause Pause = True
| 20 | false | true | 0 | 7 | 9 | 27 | 11 | 16 | null | null |
jean-edouard/idl
|
rpcgen/Tools.hs
|
gpl-2.0
|
join :: String -> [String] -> String
join sep = concat . intersperse sep
| 72 |
join :: String -> [String] -> String
join sep = concat . intersperse sep
| 72 |
join sep = concat . intersperse sep
| 35 | false | true | 1 | 8 | 13 | 39 | 17 | 22 | null | null |
brendanhay/gogol
|
gogol-play-moviespartner/gen/Network/Google/Resource/PlayMoviesPartner/Accounts/Avails/List.hs
|
mpl-2.0
|
-- | Filter Avails that match (case-insensitive) any of the given country
-- codes, using the \"ISO 3166-1 alpha-2\" format (examples: \"US\",
-- \"us\", \"Us\").
aalTerritories :: Lens' AccountsAvailsList [Text]
aalTerritories
= lens _aalTerritories
(\ s a -> s{_aalTerritories = a})
. _Default
. _Coerce
| 325 |
aalTerritories :: Lens' AccountsAvailsList [Text]
aalTerritories
= lens _aalTerritories
(\ s a -> s{_aalTerritories = a})
. _Default
. _Coerce
| 162 |
aalTerritories
= lens _aalTerritories
(\ s a -> s{_aalTerritories = a})
. _Default
. _Coerce
| 112 | true | true | 3 | 8 | 64 | 61 | 30 | 31 | null | null |
alanz/annotations-play
|
src/ch6boundstoks.hs
|
unlicense
|
z1 :: FixZipper Tuples (K Bounds :*: PFTuples) Expr
z1 = zenter Expr expr1
| 74 |
z1 :: FixZipper Tuples (K Bounds :*: PFTuples) Expr
z1 = zenter Expr expr1
| 74 |
z1 = zenter Expr expr1
| 22 | false | true | 1 | 8 | 13 | 36 | 16 | 20 | null | null |
fmapfmapfmap/amazonka
|
amazonka-ec2/test/Test/AWS/Gen/EC2.hs
|
mpl-2.0
|
testDescribeFlowLogs :: DescribeFlowLogs -> TestTree
testDescribeFlowLogs = req
"DescribeFlowLogs"
"fixture/DescribeFlowLogs.yaml"
| 138 |
testDescribeFlowLogs :: DescribeFlowLogs -> TestTree
testDescribeFlowLogs = req
"DescribeFlowLogs"
"fixture/DescribeFlowLogs.yaml"
| 138 |
testDescribeFlowLogs = req
"DescribeFlowLogs"
"fixture/DescribeFlowLogs.yaml"
| 85 | false | true | 0 | 5 | 17 | 20 | 10 | 10 | null | null |
ghorn/dynobud
|
dynobud/tests/Qps/Lp.hs
|
lgpl-3.0
|
absnl :: Num a => Coef a -> Coef a
absnl (Nonlinear x) = Nonlinear (abs x)
| 74 |
absnl :: Num a => Coef a -> Coef a
absnl (Nonlinear x) = Nonlinear (abs x)
| 74 |
absnl (Nonlinear x) = Nonlinear (abs x)
| 39 | false | true | 0 | 10 | 16 | 51 | 22 | 29 | null | null |
qpliu/esolang
|
beets/hs/Tree.hs
|
gpl-3.0
|
cond :: Tree -> Tree -> Tree -> Tree
cond (Tree v _ _) f t | v = t | otherwise = f
| 82 |
cond :: Tree -> Tree -> Tree -> Tree
cond (Tree v _ _) f t | v = t | otherwise = f
| 82 |
cond (Tree v _ _) f t | v = t | otherwise = f
| 45 | false | true | 1 | 11 | 23 | 59 | 27 | 32 | null | null |
copumpkin/charm
|
src/Architecture/ARM/Decoder/Common.hs
|
bsd-3-clause
|
choose :: Bits a => Int -> b -> b -> a -> b
choose b t f i = if bool b i then t else f
| 86 |
choose :: Bits a => Int -> b -> b -> a -> b
choose b t f i = if bool b i then t else f
| 86 |
choose b t f i = if bool b i then t else f
| 42 | false | true | 0 | 11 | 27 | 62 | 29 | 33 | null | null |
Engil/Integ
|
haskell/Calcul.hs
|
mit
|
calcul_integ :: (Double -> Double) -> Integer -> String
calcul_integ f n =
let a = 0.0
b = 1.0
h = (b - a) / (fromIntegral n) in
(Printf.printf "%.1E" (rectangles f n a h)) ++ "\t\t" ++
(Printf.printf "%.1E" (trapezes f n a b h)) ++ "\t\t" ++
(Printf.printf "%.1E" (simpson f n a b h)) ++ "\t\t" ++ "\n"
| 336 |
calcul_integ :: (Double -> Double) -> Integer -> String
calcul_integ f n =
let a = 0.0
b = 1.0
h = (b - a) / (fromIntegral n) in
(Printf.printf "%.1E" (rectangles f n a h)) ++ "\t\t" ++
(Printf.printf "%.1E" (trapezes f n a b h)) ++ "\t\t" ++
(Printf.printf "%.1E" (simpson f n a b h)) ++ "\t\t" ++ "\n"
| 336 |
calcul_integ f n =
let a = 0.0
b = 1.0
h = (b - a) / (fromIntegral n) in
(Printf.printf "%.1E" (rectangles f n a h)) ++ "\t\t" ++
(Printf.printf "%.1E" (trapezes f n a b h)) ++ "\t\t" ++
(Printf.printf "%.1E" (simpson f n a b h)) ++ "\t\t" ++ "\n"
| 280 | false | true | 0 | 16 | 94 | 163 | 83 | 80 | null | null |
iu-parfunc/containers
|
tests/map-properties.hs
|
bsd-3-clause
|
test_lookup :: Assertion
test_lookup = do
employeeCurrency "John" @?= Just "Euro"
employeeCurrency "Pete" @?= Nothing
where
employeeDept = fromList([("John","Sales"), ("Bob","IT")])
deptCountry = fromList([("IT","USA"), ("Sales","France")])
countryCurrency = fromList([("USA", "Dollar"), ("France", "Euro")])
employeeCurrency :: String -> Maybe String
employeeCurrency name = do
dept <- lookup name employeeDept
country <- lookup dept deptCountry
lookup country countryCurrency
| 531 |
test_lookup :: Assertion
test_lookup = do
employeeCurrency "John" @?= Just "Euro"
employeeCurrency "Pete" @?= Nothing
where
employeeDept = fromList([("John","Sales"), ("Bob","IT")])
deptCountry = fromList([("IT","USA"), ("Sales","France")])
countryCurrency = fromList([("USA", "Dollar"), ("France", "Euro")])
employeeCurrency :: String -> Maybe String
employeeCurrency name = do
dept <- lookup name employeeDept
country <- lookup dept deptCountry
lookup country countryCurrency
| 531 |
test_lookup = do
employeeCurrency "John" @?= Just "Euro"
employeeCurrency "Pete" @?= Nothing
where
employeeDept = fromList([("John","Sales"), ("Bob","IT")])
deptCountry = fromList([("IT","USA"), ("Sales","France")])
countryCurrency = fromList([("USA", "Dollar"), ("France", "Euro")])
employeeCurrency :: String -> Maybe String
employeeCurrency name = do
dept <- lookup name employeeDept
country <- lookup dept deptCountry
lookup country countryCurrency
| 506 | false | true | 2 | 9 | 106 | 188 | 94 | 94 | null | null |
forked-upstream-packages-for-ghcjs/ghc
|
compiler/nativeGen/X86/Ppr.hs
|
bsd-3-clause
|
pprInstr (DIV sz op) = pprSizeOp (sLit "div") sz op
| 55 |
pprInstr (DIV sz op) = pprSizeOp (sLit "div") sz op
| 55 |
pprInstr (DIV sz op) = pprSizeOp (sLit "div") sz op
| 55 | false | false | 0 | 7 | 13 | 30 | 14 | 16 | null | null |
markus1189/xmonad-contrib-710
|
XMonad/Hooks/DebugEvents.hs
|
bsd-3-clause
|
debugEventsHook' (PropertyEvent {ev_window = w
,ev_atom = a
,ev_propstate = s
}) = do
a' <- atomName a
-- too many of these, and they're not real useful
if a' `elem` ["_NET_WM_USER_TIME"
-- ,"_NET_WM_WINDOW_OPACITY"
] then return () else do
windowEvent "Property on" w
s' <- case s of
1 -> return "deleted"
0 -> dumpProperty a a' w (7 + length a')
_ -> error "Illegal propState; Xlib corrupted?"
say " atom" $ a' ++ s'
| 626 |
debugEventsHook' (PropertyEvent {ev_window = w
,ev_atom = a
,ev_propstate = s
}) = do
a' <- atomName a
-- too many of these, and they're not real useful
if a' `elem` ["_NET_WM_USER_TIME"
-- ,"_NET_WM_WINDOW_OPACITY"
] then return () else do
windowEvent "Property on" w
s' <- case s of
1 -> return "deleted"
0 -> dumpProperty a a' w (7 + length a')
_ -> error "Illegal propState; Xlib corrupted?"
say " atom" $ a' ++ s'
| 626 |
debugEventsHook' (PropertyEvent {ev_window = w
,ev_atom = a
,ev_propstate = s
}) = do
a' <- atomName a
-- too many of these, and they're not real useful
if a' `elem` ["_NET_WM_USER_TIME"
-- ,"_NET_WM_WINDOW_OPACITY"
] then return () else do
windowEvent "Property on" w
s' <- case s of
1 -> return "deleted"
0 -> dumpProperty a a' w (7 + length a')
_ -> error "Illegal propState; Xlib corrupted?"
say " atom" $ a' ++ s'
| 626 | false | false | 0 | 17 | 284 | 146 | 73 | 73 | null | null |
elbrujohalcon/eprocess
|
src/Control/Concurrent/Process.hs
|
bsd-3-clause
|
-- | /makeProcess/ builds a process from a code that generates an IO action. Usage:
-- @
-- process <- makeProcess evalFunction receiver
-- @
makeProcess :: (m t -> IO s) -> ReceiverT r m t -> Process r s
makeProcess f (RT a) = RT (mapReaderT f a)
| 254 |
makeProcess :: (m t -> IO s) -> ReceiverT r m t -> Process r s
makeProcess f (RT a) = RT (mapReaderT f a)
| 105 |
makeProcess f (RT a) = RT (mapReaderT f a)
| 42 | true | true | 0 | 8 | 56 | 75 | 36 | 39 | null | null |
urbanslug/ghc
|
compiler/rename/RnTypes.hs
|
bsd-3-clause
|
badKindBndrs :: HsDocContext -> [RdrName] -> SDoc
badKindBndrs doc kvs
= vcat [ hang (ptext (sLit "Unexpected kind variable") <> plural kvs
<+> pprQuotedList kvs)
2 (ptext (sLit "Perhaps you intended to use PolyKinds"))
, docOfHsDocContext doc ]
| 287 |
badKindBndrs :: HsDocContext -> [RdrName] -> SDoc
badKindBndrs doc kvs
= vcat [ hang (ptext (sLit "Unexpected kind variable") <> plural kvs
<+> pprQuotedList kvs)
2 (ptext (sLit "Perhaps you intended to use PolyKinds"))
, docOfHsDocContext doc ]
| 287 |
badKindBndrs doc kvs
= vcat [ hang (ptext (sLit "Unexpected kind variable") <> plural kvs
<+> pprQuotedList kvs)
2 (ptext (sLit "Perhaps you intended to use PolyKinds"))
, docOfHsDocContext doc ]
| 237 | false | true | 0 | 13 | 79 | 84 | 41 | 43 | null | null |
kristoff3r/importify
|
HLint.hs
|
mit
|
warn "Use 'readIORef' from Universum" =
Data.IORef.readIORef ==> Universum.readIORef
| 88 |
warn "Use 'readIORef' from Universum" =
Data.IORef.readIORef ==> Universum.readIORef
| 88 |
warn "Use 'readIORef' from Universum" =
Data.IORef.readIORef ==> Universum.readIORef
| 88 | false | false | 0 | 6 | 12 | 18 | 9 | 9 | null | null |
caneroj1/HaskellDocs
|
Utils/Helpers.hs
|
mit
|
pairsToStrings :: (Show a, Show b) => [(a, b)] -> [String]
pairsToStrings = map (\(x, y) -> removeQuotes $ show x ++ show y)
| 124 |
pairsToStrings :: (Show a, Show b) => [(a, b)] -> [String]
pairsToStrings = map (\(x, y) -> removeQuotes $ show x ++ show y)
| 124 |
pairsToStrings = map (\(x, y) -> removeQuotes $ show x ++ show y)
| 65 | false | true | 0 | 10 | 23 | 73 | 40 | 33 | null | null |
BartAdv/Idris-dev
|
src/Idris/ElabDecls.hs
|
bsd-3-clause
|
elabDecl' what info (PRecord doc rsyn fc opts name nfc ps pdocs fs cname cdoc csyn)
| what /= ETypes
= do iLOG $ "Elaborating record " ++ show name
elabRecord info doc rsyn fc opts name nfc ps pdocs fs cname cdoc csyn
{-
| otherwise
= do iLOG $ "Elaborating [type of] " ++ show tyn
elabData info s doc [] f [] (PLaterdecl tyn ty)
-}
| 362 |
elabDecl' what info (PRecord doc rsyn fc opts name nfc ps pdocs fs cname cdoc csyn)
| what /= ETypes
= do iLOG $ "Elaborating record " ++ show name
elabRecord info doc rsyn fc opts name nfc ps pdocs fs cname cdoc csyn
{-
| otherwise
= do iLOG $ "Elaborating [type of] " ++ show tyn
elabData info s doc [] f [] (PLaterdecl tyn ty)
-}
| 362 |
elabDecl' what info (PRecord doc rsyn fc opts name nfc ps pdocs fs cname cdoc csyn)
| what /= ETypes
= do iLOG $ "Elaborating record " ++ show name
elabRecord info doc rsyn fc opts name nfc ps pdocs fs cname cdoc csyn
{-
| otherwise
= do iLOG $ "Elaborating [type of] " ++ show tyn
elabData info s doc [] f [] (PLaterdecl tyn ty)
-}
| 362 | false | false | 0 | 9 | 98 | 96 | 45 | 51 | null | null |
bramgg/99haskell
|
Views.hs
|
mit
|
renderTests :: Problem -> Html
renderTests p = mapM_
(\t -> div ! class_ "test" $ do
div ! class_ "success neutral" $ mempty
div ! class_ "overview" $ toHtml $ (fst t) ++ " -> " ++ (snd t))
(tests p)
| 223 |
renderTests :: Problem -> Html
renderTests p = mapM_
(\t -> div ! class_ "test" $ do
div ! class_ "success neutral" $ mempty
div ! class_ "overview" $ toHtml $ (fst t) ++ " -> " ++ (snd t))
(tests p)
| 223 |
renderTests p = mapM_
(\t -> div ! class_ "test" $ do
div ! class_ "success neutral" $ mempty
div ! class_ "overview" $ toHtml $ (fst t) ++ " -> " ++ (snd t))
(tests p)
| 192 | false | true | 0 | 15 | 65 | 101 | 48 | 53 | null | null |
MarcusVoelker/MuCurse
|
Function.hs
|
mit
|
resolveFunctionDefs :: [FunctionDef] -> [FunctionDef]
resolveFunctionDefs defs = map (\(FunctionDef n f) -> FunctionDef n $ resolveFunction defs f) defs
| 152 |
resolveFunctionDefs :: [FunctionDef] -> [FunctionDef]
resolveFunctionDefs defs = map (\(FunctionDef n f) -> FunctionDef n $ resolveFunction defs f) defs
| 152 |
resolveFunctionDefs defs = map (\(FunctionDef n f) -> FunctionDef n $ resolveFunction defs f) defs
| 98 | false | true | 0 | 9 | 19 | 57 | 29 | 28 | null | null |
isomorphism/csound-expression
|
src/Csound/Air/Wav.hs
|
bsd-3-clause
|
- | Loads the sample in the table. The sample should be short. The size of the table is limited.
-- It's up to 3 minutes for 44100 sample rate (sr), 2.9 minutes for 48000 sr, 1.4 minutes for 96000 sr.
ramSnd :: LoopMode -> Sig -> String -> Sig2
ramSnd loopMode speed file = loscil3 1 speed t `withDs` [1, int $ fromEnum loopMode]
where t
| isMp3 file = mp3s file 0 def
| otherwise = wavs file 0 def
-- | Loads the sample in the table. The sample should be short. The size of the table is limited.
-- It's up to 6 minutes for 44100 sample rate (sr), 5.9 minutes for 48000 sr, 2.8 minutes for 96000 sr.
| 632 |
ramSnd :: LoopMode -> Sig -> String -> Sig2
ramSnd loopMode speed file = loscil3 1 speed t `withDs` [1, int $ fromEnum loopMode]
where t
| isMp3 file = mp3s file 0 def
| otherwise = wavs file 0 def
-- | Loads the sample in the table. The sample should be short. The size of the table is limited.
-- It's up to 6 minutes for 44100 sample rate (sr), 5.9 minutes for 48000 sr, 2.8 minutes for 96000 sr.
| 430 |
ramSnd loopMode speed file = loscil3 1 speed t `withDs` [1, int $ fromEnum loopMode]
where t
| isMp3 file = mp3s file 0 def
| otherwise = wavs file 0 def
-- | Loads the sample in the table. The sample should be short. The size of the table is limited.
-- It's up to 6 minutes for 44100 sample rate (sr), 5.9 minutes for 48000 sr, 2.8 minutes for 96000 sr.
| 386 | true | true | 3 | 8 | 154 | 152 | 73 | 79 | null | null |
brendanhay/gogol
|
gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types/Product.hs
|
mpl-2.0
|
-- | Description of the calendar. Optional.
calDescription :: Lens' Calendar (Maybe Text)
calDescription
= lens _calDescription
(\ s a -> s{_calDescription = a})
| 169 |
calDescription :: Lens' Calendar (Maybe Text)
calDescription
= lens _calDescription
(\ s a -> s{_calDescription = a})
| 125 |
calDescription
= lens _calDescription
(\ s a -> s{_calDescription = a})
| 79 | true | true | 1 | 9 | 31 | 51 | 25 | 26 | null | null |
dambaev/hepsyslog
|
src/Control/Concurrent/HEP/Syslog.hs
|
gpl-3.0
|
_intSyslogInfo:: String-> Priority-> String-> HEP HEPProcState
_intSyslogInfo ident prio s = do
liftIO $! S.withSyslog ident [PID] USER $! syslog prio s
procFinished
| 173 |
_intSyslogInfo:: String-> Priority-> String-> HEP HEPProcState
_intSyslogInfo ident prio s = do
liftIO $! S.withSyslog ident [PID] USER $! syslog prio s
procFinished
| 173 |
_intSyslogInfo ident prio s = do
liftIO $! S.withSyslog ident [PID] USER $! syslog prio s
procFinished
| 110 | false | true | 0 | 10 | 30 | 64 | 30 | 34 | null | null |
kallisti-dev/hs-webdriver
|
src/Test/WebDriver/Commands.hs
|
bsd-3-clause
|
-- |Get the dimensions of the current window.
getWindowSize :: (HasCallStack, WebDriver wd) => wd (Word, Word)
getWindowSize = doWinCommand methodGet currentWindow "/size" Null
>>= parsePair "width" "height" "getWindowSize"
| 239 |
getWindowSize :: (HasCallStack, WebDriver wd) => wd (Word, Word)
getWindowSize = doWinCommand methodGet currentWindow "/size" Null
>>= parsePair "width" "height" "getWindowSize"
| 193 |
getWindowSize = doWinCommand methodGet currentWindow "/size" Null
>>= parsePair "width" "height" "getWindowSize"
| 128 | true | true | 0 | 7 | 44 | 54 | 28 | 26 | null | null |
siddhanathan/ghc
|
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
|
bsd-3-clause
|
pprPat i (InfixP p1 n p2)
= parensIf (i >= opPrec) (pprPat opPrec p1 <+>
pprName' Infix n <+>
pprPat opPrec p2)
| 229 |
pprPat i (InfixP p1 n p2)
= parensIf (i >= opPrec) (pprPat opPrec p1 <+>
pprName' Infix n <+>
pprPat opPrec p2)
| 229 |
pprPat i (InfixP p1 n p2)
= parensIf (i >= opPrec) (pprPat opPrec p1 <+>
pprName' Infix n <+>
pprPat opPrec p2)
| 229 | false | false | 0 | 9 | 139 | 62 | 28 | 34 | null | null |
mstksg/tensor-ops
|
src/TensorOps/Learn/NeuralNet/FeedForward.hs
|
bsd-3-clause
|
trainNetwork
:: forall i o t. (Tensor t, RealFloat (ElemT t))
=> TOp '[ '[o], '[o] ] '[ '[] ]
-> ElemT t
-> t '[i]
-> t '[o]
-> Network t i o
-> Network t i o
trainNetwork loss r x y = \case
N s o p ->
let p' = map1 (\(!(s1 :&: o1 :&: g1)) -> TT.zip stepFunc o1 g1 \\ s1)
$ zipProd3 (singProd s) p (tail' $ netGrad loss x y s o p)
in N s o p'
where
stepFunc :: ElemT t -> ElemT t -> ElemT t
stepFunc !o' !g' = o' - r * g'
{-# INLINE stepFunc #-}
| 518 |
trainNetwork
:: forall i o t. (Tensor t, RealFloat (ElemT t))
=> TOp '[ '[o], '[o] ] '[ '[] ]
-> ElemT t
-> t '[i]
-> t '[o]
-> Network t i o
-> Network t i o
trainNetwork loss r x y = \case
N s o p ->
let p' = map1 (\(!(s1 :&: o1 :&: g1)) -> TT.zip stepFunc o1 g1 \\ s1)
$ zipProd3 (singProd s) p (tail' $ netGrad loss x y s o p)
in N s o p'
where
stepFunc :: ElemT t -> ElemT t -> ElemT t
stepFunc !o' !g' = o' - r * g'
{-# INLINE stepFunc #-}
| 518 |
trainNetwork loss r x y = \case
N s o p ->
let p' = map1 (\(!(s1 :&: o1 :&: g1)) -> TT.zip stepFunc o1 g1 \\ s1)
$ zipProd3 (singProd s) p (tail' $ netGrad loss x y s o p)
in N s o p'
where
stepFunc :: ElemT t -> ElemT t -> ElemT t
stepFunc !o' !g' = o' - r * g'
{-# INLINE stepFunc #-}
| 331 | false | true | 0 | 20 | 182 | 292 | 144 | 148 | null | null |
google/codeworld
|
funblocks-client/src/Blocks/Types.hs
|
apache-2.0
|
colorText = Color 45
| 20 |
colorText = Color 45
| 20 |
colorText = Color 45
| 20 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
thomie/vector
|
Data/Vector/Storable.hs
|
bsd-3-clause
|
mapM = G.mapM
| 13 |
mapM = G.mapM
| 13 |
mapM = G.mapM
| 13 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
well-typed/generics-sop
|
sop-core/src/Data/SOP/Sing.hs
|
bsd-3-clause
|
-- | Paramorphism for a type-level list.
--
-- @since 0.4.0.0
--
para_SList ::
SListI xs
=> r '[]
-> (forall y ys . (SListI ys) => r ys -> r (y ': ys))
-> r xs
para_SList nil cons =
cpara_SList (Proxy :: Proxy Top) nil cons
| 236 |
para_SList ::
SListI xs
=> r '[]
-> (forall y ys . (SListI ys) => r ys -> r (y ': ys))
-> r xs
para_SList nil cons =
cpara_SList (Proxy :: Proxy Top) nil cons
| 171 |
para_SList nil cons =
cpara_SList (Proxy :: Proxy Top) nil cons
| 65 | true | true | 0 | 15 | 60 | 99 | 51 | 48 | null | null |
erochest/york-scripts
|
lib/Utils.hs
|
apache-2.0
|
info True msg x = trace (msg ++ ": " ++ show x) x
| 50 |
info True msg x = trace (msg ++ ": " ++ show x) x
| 50 |
info True msg x = trace (msg ++ ": " ++ show x) x
| 50 | false | false | 1 | 8 | 14 | 37 | 15 | 22 | null | null |
dolio/vector
|
Data/Vector/Fusion/Stream/Monadic.hs
|
bsd-3-clause
|
enumFromTo_big_int x y = x `seq` y `seq` Stream step x
where
{-# INLINE_INNER step #-}
step z | z <= y = return $ Yield z (z+1)
| otherwise = return $ Done
| 181 |
enumFromTo_big_int x y = x `seq` y `seq` Stream step x
where
{-# INLINE_INNER step #-}
step z | z <= y = return $ Yield z (z+1)
| otherwise = return $ Done
| 181 |
enumFromTo_big_int x y = x `seq` y `seq` Stream step x
where
{-# INLINE_INNER step #-}
step z | z <= y = return $ Yield z (z+1)
| otherwise = return $ Done
| 181 | false | false | 0 | 9 | 59 | 79 | 39 | 40 | null | null |
anton-k/sharc-timbre
|
src/Sharc/Instruments/Violin.hs
|
bsd-3-clause
|
note11 :: Note
note11 = Note
(Pitch 369.994 54 "f#4")
12
(Range
(NoteRange
(NoteRangeAmplitude 9989.83 27 1.62)
(NoteRangeHarmonicFreq 1 369.99))
(NoteRange
(NoteRangeAmplitude 369.99 1 3875.0)
(NoteRangeHarmonicFreq 27 9989.83)))
[Harmonic 1 1.189 3875.0
,Harmonic 2 2.044 1901.39
,Harmonic 3 (-1.899) 564.83
,Harmonic 4 (-0.968) 2137.27
,Harmonic 5 1.993 1508.35
,Harmonic 6 2.066 547.83
,Harmonic 7 1.245 572.91
,Harmonic 8 0.509 429.26
,Harmonic 9 1.259 846.08
,Harmonic 10 0.317 391.64
,Harmonic 11 3.0 466.42
,Harmonic 12 (-0.968) 69.51
,Harmonic 13 (-1.915) 38.94
,Harmonic 14 (-1.933) 7.89
,Harmonic 15 (-2.84) 29.43
,Harmonic 16 0.85 18.02
,Harmonic 17 (-1.793) 46.6
,Harmonic 18 0.816 23.98
,Harmonic 19 3.002 35.04
,Harmonic 20 1.74 11.72
,Harmonic 21 (-0.602) 10.41
,Harmonic 22 1.08 6.71
,Harmonic 23 (-2.672) 5.14
,Harmonic 24 1.268 4.73
,Harmonic 25 1.974 5.66
,Harmonic 26 (-2.33) 18.76
,Harmonic 27 1.807 1.62]
| 1,111 |
note11 :: Note
note11 = Note
(Pitch 369.994 54 "f#4")
12
(Range
(NoteRange
(NoteRangeAmplitude 9989.83 27 1.62)
(NoteRangeHarmonicFreq 1 369.99))
(NoteRange
(NoteRangeAmplitude 369.99 1 3875.0)
(NoteRangeHarmonicFreq 27 9989.83)))
[Harmonic 1 1.189 3875.0
,Harmonic 2 2.044 1901.39
,Harmonic 3 (-1.899) 564.83
,Harmonic 4 (-0.968) 2137.27
,Harmonic 5 1.993 1508.35
,Harmonic 6 2.066 547.83
,Harmonic 7 1.245 572.91
,Harmonic 8 0.509 429.26
,Harmonic 9 1.259 846.08
,Harmonic 10 0.317 391.64
,Harmonic 11 3.0 466.42
,Harmonic 12 (-0.968) 69.51
,Harmonic 13 (-1.915) 38.94
,Harmonic 14 (-1.933) 7.89
,Harmonic 15 (-2.84) 29.43
,Harmonic 16 0.85 18.02
,Harmonic 17 (-1.793) 46.6
,Harmonic 18 0.816 23.98
,Harmonic 19 3.002 35.04
,Harmonic 20 1.74 11.72
,Harmonic 21 (-0.602) 10.41
,Harmonic 22 1.08 6.71
,Harmonic 23 (-2.672) 5.14
,Harmonic 24 1.268 4.73
,Harmonic 25 1.974 5.66
,Harmonic 26 (-2.33) 18.76
,Harmonic 27 1.807 1.62]
| 1,111 |
note11 = Note
(Pitch 369.994 54 "f#4")
12
(Range
(NoteRange
(NoteRangeAmplitude 9989.83 27 1.62)
(NoteRangeHarmonicFreq 1 369.99))
(NoteRange
(NoteRangeAmplitude 369.99 1 3875.0)
(NoteRangeHarmonicFreq 27 9989.83)))
[Harmonic 1 1.189 3875.0
,Harmonic 2 2.044 1901.39
,Harmonic 3 (-1.899) 564.83
,Harmonic 4 (-0.968) 2137.27
,Harmonic 5 1.993 1508.35
,Harmonic 6 2.066 547.83
,Harmonic 7 1.245 572.91
,Harmonic 8 0.509 429.26
,Harmonic 9 1.259 846.08
,Harmonic 10 0.317 391.64
,Harmonic 11 3.0 466.42
,Harmonic 12 (-0.968) 69.51
,Harmonic 13 (-1.915) 38.94
,Harmonic 14 (-1.933) 7.89
,Harmonic 15 (-2.84) 29.43
,Harmonic 16 0.85 18.02
,Harmonic 17 (-1.793) 46.6
,Harmonic 18 0.816 23.98
,Harmonic 19 3.002 35.04
,Harmonic 20 1.74 11.72
,Harmonic 21 (-0.602) 10.41
,Harmonic 22 1.08 6.71
,Harmonic 23 (-2.672) 5.14
,Harmonic 24 1.268 4.73
,Harmonic 25 1.974 5.66
,Harmonic 26 (-2.33) 18.76
,Harmonic 27 1.807 1.62]
| 1,096 | false | true | 0 | 10 | 319 | 419 | 211 | 208 | null | null |
kawu/skladnica-with-walenty
|
src/NLP/Skladnica/Walenty/Search2.hs
|
bsd-2-clause
|
markTree
:: forall n i. Ord i
=> (n -> i) -- ^ Function to get ID of a node
-> Expr n 'Tree -- ^ Expression to evaluate
-> R.Tree n -- ^ Tree on which to run the evaluation
-> Mark i Bool
markTree getID expr =
mark expr
where
mark :: Expr n 'Tree -> R.Tree n -> Mark i Bool
mark (B x) _ = return x
mark (And x y) t = markAnd mark x y t
mark (Or x y) t = markOr mark x y t
mark (SatisfyTree p) t = return (p t)
mark (Current e) t = markNode getID e (R.rootLabel t)
mark (Child p e) t =
or <$> sequence
[ mark e child
| child <- R.subForest t
, p (R.rootLabel child) ]
mark NonBranching t = case R.subForest t of
[] -> return True
[x] -> mark NonBranching x
_ -> return False
-- | Evaluate the query over the given Skladnica node.
| 832 |
markTree
:: forall n i. Ord i
=> (n -> i) -- ^ Function to get ID of a node
-> Expr n 'Tree -- ^ Expression to evaluate
-> R.Tree n -- ^ Tree on which to run the evaluation
-> Mark i Bool
markTree getID expr =
mark expr
where
mark :: Expr n 'Tree -> R.Tree n -> Mark i Bool
mark (B x) _ = return x
mark (And x y) t = markAnd mark x y t
mark (Or x y) t = markOr mark x y t
mark (SatisfyTree p) t = return (p t)
mark (Current e) t = markNode getID e (R.rootLabel t)
mark (Child p e) t =
or <$> sequence
[ mark e child
| child <- R.subForest t
, p (R.rootLabel child) ]
mark NonBranching t = case R.subForest t of
[] -> return True
[x] -> mark NonBranching x
_ -> return False
-- | Evaluate the query over the given Skladnica node.
| 832 |
markTree getID expr =
mark expr
where
mark :: Expr n 'Tree -> R.Tree n -> Mark i Bool
mark (B x) _ = return x
mark (And x y) t = markAnd mark x y t
mark (Or x y) t = markOr mark x y t
mark (SatisfyTree p) t = return (p t)
mark (Current e) t = markNode getID e (R.rootLabel t)
mark (Child p e) t =
or <$> sequence
[ mark e child
| child <- R.subForest t
, p (R.rootLabel child) ]
mark NonBranching t = case R.subForest t of
[] -> return True
[x] -> mark NonBranching x
_ -> return False
-- | Evaluate the query over the given Skladnica node.
| 626 | false | true | 10 | 12 | 268 | 345 | 169 | 176 | null | null |
geophf/1HaskellADay
|
exercises/HAD/Y2017/M04/D07/Solution.hs
|
mit
|
threeTiles = ntiles 3
| 21 |
threeTiles = ntiles 3
| 21 |
threeTiles = ntiles 3
| 21 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
beni55/cryptol
|
src/Cryptol/TypeCheck/AST.hs
|
bsd-3-clause
|
tLenFromThenTo :: Type -> Type -> Type -> Type
tLenFromThenTo t1 t2 t3 = TCon (TF TCLenFromThenTo) [t1,t2,t3]
| 109 |
tLenFromThenTo :: Type -> Type -> Type -> Type
tLenFromThenTo t1 t2 t3 = TCon (TF TCLenFromThenTo) [t1,t2,t3]
| 109 |
tLenFromThenTo t1 t2 t3 = TCon (TF TCLenFromThenTo) [t1,t2,t3]
| 62 | false | true | 0 | 7 | 17 | 54 | 27 | 27 | null | null |
nobsun/icfpc2017
|
hs/src/GraphUtils.hs
|
bsd-3-clause
|
updateLocalMap :: P.Move -> LocalMap () -> LocalMap ()
updateLocalMap (P.MvClaim _ s t) mp
= case (G.lab mp s, G.lab mp t) of
(Just Normal, Just Normal) -> mp1
(Just Normal, Just (Mine xs))
-> case G.bfs s mp of
ns -> G.gmap (\ ctx@(p,v,_,q) -> if v `L.notElem` (s:ns) then ctx else (p,v,Pseudo xs,q)) mp1
(Just Normal, Just (Pseudo xs))
-> case G.bfs s mp of
ns -> G.gmap (\ ctx@(p,v,_,q) -> if v `L.notElem` (s:ns) then ctx else (p,v,Pseudo xs,q)) mp1
(Just (Mine xs), Just Normal)
-> case G.bfs t mp of
ns -> G.gmap (\ ctx@(p,v,_,q) -> if v `L.notElem` (t:ns) then ctx else (p,v,Pseudo xs,q)) mp1
(Just (Mine xs), Just (Mine ys))
-> if xs == ys then mp1
else case G.bfs s mp ++ G.bfs t mp of
ns -> G.gmap (\ ctx@(p,v,l,q) -> if v `L.notElem` (s:t:ns) then ctx
else case l of
Mine _ -> (p,v,Mine (IntSet.union xs ys),q)
Pseudo _ -> (p,v,Pseudo (IntSet.union xs ys),q)
_ -> error $ "updateLocalMap: unexpected label: " ++ show l) mp1
(Just (Mine xs), Just (Pseudo ys))
-> if xs == ys then mp1
else case G.bfs s mp ++ G.bfs t mp of
ns -> G.gmap (\ ctx@(p,v,l,q) -> if v `L.notElem` (s:t:ns) then ctx
else case l of
Mine _ -> (p,v,Mine (IntSet.union xs ys),q)
Pseudo _ -> (p,v,Pseudo (IntSet.union xs ys),q)
_ -> error $ "updateLocalMap: unexpected label: " ++ show l) mp1
(Just (Pseudo xs), Just Normal)
-> case G.bfs t mp of
ns -> G.gmap (\ ctx@(p,v,_,q) -> if v `L.notElem` (t:ns) then ctx else (p,v,Pseudo xs,q)) mp1
(Just (Pseudo xs), Just (Mine ys))
-> if xs == ys then mp1
else case G.bfs s mp ++ G.bfs t mp of
ns -> G.gmap (\ ctx@(p,v,l,q) -> if v `L.notElem` (s:t:ns) then ctx
else case l of
Mine _ -> (p,v,Mine (IntSet.union xs ys),q)
Pseudo _ -> (p,v,Pseudo (IntSet.union xs ys),q)
_ -> error $ "updateLocalMap: unexpected label: " ++ show l) mp1
(Just (Pseudo xs), Just (Pseudo ys))
-> if xs == ys then mp1
else case G.bfs s mp ++ G.bfs t mp of
ns -> G.gmap (\ ctx@(p,v,l,q) -> if v `L.notElem` (s:t:ns) then ctx
else case l of
Mine _ -> (p,v,Mine (IntSet.union xs ys),q)
Pseudo _ -> (p,v,Pseudo (IntSet.union xs ys),q)
_ -> error $ "updateLocalMap: unexpected label: " ++ show l) mp1
_ -> error "updateLocalMap: Site is not in Map"
where
mp1 = G.insEdges [(s,t,()),(t,s,())] mp
| 2,983 |
updateLocalMap :: P.Move -> LocalMap () -> LocalMap ()
updateLocalMap (P.MvClaim _ s t) mp
= case (G.lab mp s, G.lab mp t) of
(Just Normal, Just Normal) -> mp1
(Just Normal, Just (Mine xs))
-> case G.bfs s mp of
ns -> G.gmap (\ ctx@(p,v,_,q) -> if v `L.notElem` (s:ns) then ctx else (p,v,Pseudo xs,q)) mp1
(Just Normal, Just (Pseudo xs))
-> case G.bfs s mp of
ns -> G.gmap (\ ctx@(p,v,_,q) -> if v `L.notElem` (s:ns) then ctx else (p,v,Pseudo xs,q)) mp1
(Just (Mine xs), Just Normal)
-> case G.bfs t mp of
ns -> G.gmap (\ ctx@(p,v,_,q) -> if v `L.notElem` (t:ns) then ctx else (p,v,Pseudo xs,q)) mp1
(Just (Mine xs), Just (Mine ys))
-> if xs == ys then mp1
else case G.bfs s mp ++ G.bfs t mp of
ns -> G.gmap (\ ctx@(p,v,l,q) -> if v `L.notElem` (s:t:ns) then ctx
else case l of
Mine _ -> (p,v,Mine (IntSet.union xs ys),q)
Pseudo _ -> (p,v,Pseudo (IntSet.union xs ys),q)
_ -> error $ "updateLocalMap: unexpected label: " ++ show l) mp1
(Just (Mine xs), Just (Pseudo ys))
-> if xs == ys then mp1
else case G.bfs s mp ++ G.bfs t mp of
ns -> G.gmap (\ ctx@(p,v,l,q) -> if v `L.notElem` (s:t:ns) then ctx
else case l of
Mine _ -> (p,v,Mine (IntSet.union xs ys),q)
Pseudo _ -> (p,v,Pseudo (IntSet.union xs ys),q)
_ -> error $ "updateLocalMap: unexpected label: " ++ show l) mp1
(Just (Pseudo xs), Just Normal)
-> case G.bfs t mp of
ns -> G.gmap (\ ctx@(p,v,_,q) -> if v `L.notElem` (t:ns) then ctx else (p,v,Pseudo xs,q)) mp1
(Just (Pseudo xs), Just (Mine ys))
-> if xs == ys then mp1
else case G.bfs s mp ++ G.bfs t mp of
ns -> G.gmap (\ ctx@(p,v,l,q) -> if v `L.notElem` (s:t:ns) then ctx
else case l of
Mine _ -> (p,v,Mine (IntSet.union xs ys),q)
Pseudo _ -> (p,v,Pseudo (IntSet.union xs ys),q)
_ -> error $ "updateLocalMap: unexpected label: " ++ show l) mp1
(Just (Pseudo xs), Just (Pseudo ys))
-> if xs == ys then mp1
else case G.bfs s mp ++ G.bfs t mp of
ns -> G.gmap (\ ctx@(p,v,l,q) -> if v `L.notElem` (s:t:ns) then ctx
else case l of
Mine _ -> (p,v,Mine (IntSet.union xs ys),q)
Pseudo _ -> (p,v,Pseudo (IntSet.union xs ys),q)
_ -> error $ "updateLocalMap: unexpected label: " ++ show l) mp1
_ -> error "updateLocalMap: Site is not in Map"
where
mp1 = G.insEdges [(s,t,()),(t,s,())] mp
| 2,983 |
updateLocalMap (P.MvClaim _ s t) mp
= case (G.lab mp s, G.lab mp t) of
(Just Normal, Just Normal) -> mp1
(Just Normal, Just (Mine xs))
-> case G.bfs s mp of
ns -> G.gmap (\ ctx@(p,v,_,q) -> if v `L.notElem` (s:ns) then ctx else (p,v,Pseudo xs,q)) mp1
(Just Normal, Just (Pseudo xs))
-> case G.bfs s mp of
ns -> G.gmap (\ ctx@(p,v,_,q) -> if v `L.notElem` (s:ns) then ctx else (p,v,Pseudo xs,q)) mp1
(Just (Mine xs), Just Normal)
-> case G.bfs t mp of
ns -> G.gmap (\ ctx@(p,v,_,q) -> if v `L.notElem` (t:ns) then ctx else (p,v,Pseudo xs,q)) mp1
(Just (Mine xs), Just (Mine ys))
-> if xs == ys then mp1
else case G.bfs s mp ++ G.bfs t mp of
ns -> G.gmap (\ ctx@(p,v,l,q) -> if v `L.notElem` (s:t:ns) then ctx
else case l of
Mine _ -> (p,v,Mine (IntSet.union xs ys),q)
Pseudo _ -> (p,v,Pseudo (IntSet.union xs ys),q)
_ -> error $ "updateLocalMap: unexpected label: " ++ show l) mp1
(Just (Mine xs), Just (Pseudo ys))
-> if xs == ys then mp1
else case G.bfs s mp ++ G.bfs t mp of
ns -> G.gmap (\ ctx@(p,v,l,q) -> if v `L.notElem` (s:t:ns) then ctx
else case l of
Mine _ -> (p,v,Mine (IntSet.union xs ys),q)
Pseudo _ -> (p,v,Pseudo (IntSet.union xs ys),q)
_ -> error $ "updateLocalMap: unexpected label: " ++ show l) mp1
(Just (Pseudo xs), Just Normal)
-> case G.bfs t mp of
ns -> G.gmap (\ ctx@(p,v,_,q) -> if v `L.notElem` (t:ns) then ctx else (p,v,Pseudo xs,q)) mp1
(Just (Pseudo xs), Just (Mine ys))
-> if xs == ys then mp1
else case G.bfs s mp ++ G.bfs t mp of
ns -> G.gmap (\ ctx@(p,v,l,q) -> if v `L.notElem` (s:t:ns) then ctx
else case l of
Mine _ -> (p,v,Mine (IntSet.union xs ys),q)
Pseudo _ -> (p,v,Pseudo (IntSet.union xs ys),q)
_ -> error $ "updateLocalMap: unexpected label: " ++ show l) mp1
(Just (Pseudo xs), Just (Pseudo ys))
-> if xs == ys then mp1
else case G.bfs s mp ++ G.bfs t mp of
ns -> G.gmap (\ ctx@(p,v,l,q) -> if v `L.notElem` (s:t:ns) then ctx
else case l of
Mine _ -> (p,v,Mine (IntSet.union xs ys),q)
Pseudo _ -> (p,v,Pseudo (IntSet.union xs ys),q)
_ -> error $ "updateLocalMap: unexpected label: " ++ show l) mp1
_ -> error "updateLocalMap: Site is not in Map"
where
mp1 = G.insEdges [(s,t,()),(t,s,())] mp
| 2,928 | false | true | 1 | 23 | 1,206 | 1,450 | 778 | 672 | null | null |
seckcoder/vector
|
Data/Vector/Unboxed.hs
|
bsd-3-clause
|
izipWith4 = G.izipWith4
| 23 |
izipWith4 = G.izipWith4
| 23 |
izipWith4 = G.izipWith4
| 23 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
ssaavedra/liquidhaskell
|
benchmarks/esop2013-submission/Base.hs
|
bsd-3-clause
|
insertMin kx x t
= case t of
Tip -> singleton kx x
Bin _ ky y l r
-> balanceL ky y (insertMin kx x l) r
{--------------------------------------------------------------------
[merge l r]: merges two trees.
--------------------------------------------------------------------}
{-@ merge :: kcut:k -> OMap {v:k | v < kcut} a -> OMap {v:k| v > kcut} a -> OMap k a @-}
| 390 |
insertMin kx x t
= case t of
Tip -> singleton kx x
Bin _ ky y l r
-> balanceL ky y (insertMin kx x l) r
{--------------------------------------------------------------------
[merge l r]: merges two trees.
--------------------------------------------------------------------}
{-@ merge :: kcut:k -> OMap {v:k | v < kcut} a -> OMap {v:k| v > kcut} a -> OMap k a @-}
| 390 |
insertMin kx x t
= case t of
Tip -> singleton kx x
Bin _ ky y l r
-> balanceL ky y (insertMin kx x l) r
{--------------------------------------------------------------------
[merge l r]: merges two trees.
--------------------------------------------------------------------}
{-@ merge :: kcut:k -> OMap {v:k | v < kcut} a -> OMap {v:k| v > kcut} a -> OMap k a @-}
| 390 | false | false | 0 | 10 | 86 | 66 | 32 | 34 | null | null |
jtdaugherty/mathblog
|
src/MB/Processors/Tikz.hs
|
bsd-3-clause
|
imgDimensions (ImageYCbCr8 img) = (imageWidth img, imageHeight img)
| 67 |
imgDimensions (ImageYCbCr8 img) = (imageWidth img, imageHeight img)
| 67 |
imgDimensions (ImageYCbCr8 img) = (imageWidth img, imageHeight img)
| 67 | false | false | 0 | 7 | 7 | 27 | 13 | 14 | null | null |
razvan9310/barrelfish
|
hake/ARMv7.hs
|
mit
|
archFamily = "arm"
| 18 |
archFamily = "arm"
| 18 |
archFamily = "arm"
| 18 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
pikajude/explain
|
src/Main.hs
|
mit
|
explain (RightArrHighApp e1 e2) = parens $ fillSep [explain e1, ">>-", explain e2]
| 82 |
explain (RightArrHighApp e1 e2) = parens $ fillSep [explain e1, ">>-", explain e2]
| 82 |
explain (RightArrHighApp e1 e2) = parens $ fillSep [explain e1, ">>-", explain e2]
| 82 | false | false | 0 | 8 | 12 | 39 | 19 | 20 | null | null |
shlevy/ghc
|
compiler/utils/ListSetOps.hs
|
bsd-3-clause
|
minusList :: Ord a => [a] -> [a] -> [a]
-- There's no point building a set to perform just one lookup, so we handle
-- extremely short lists specially. It might actually be better to use
-- an O(m*n) algorithm when m is a little longer (perhaps up to 4 or even 5).
-- The tipping point will be somewhere in the area of where /m/ and /log n/
-- become comparable, but we probably don't want to work too hard on this.
minusList [] _ = []
| 435 |
minusList :: Ord a => [a] -> [a] -> [a]
minusList [] _ = []
| 59 |
minusList [] _ = []
| 19 | true | true | 0 | 8 | 88 | 49 | 28 | 21 | null | null |
Loveice/PFAD
|
ch6/ch6.hs
|
mit
|
-- fatest; shortest
-- foldr fusion works like a pruning dfs
good2 c (k,f,t,e) = f*t+e == c
| 91 |
good2 c (k,f,t,e) = f*t+e == c
| 30 |
good2 c (k,f,t,e) = f*t+e == c
| 30 | true | false | 0 | 7 | 17 | 37 | 21 | 16 | null | null |
loadimpact/http2-test
|
hs-src/Rede/SpdyProtocol/Session.hs
|
bsd-3-clause
|
iDropThisFrame :: AnyControlFrame -> Bool
-- iDropThisFrame (SettingsFrame_ACF _ ) = True
-- iDropThisFrame (WindowUpdateFrame_ACF _ ) = True
iDropThisFrame _ = False
| 208 |
iDropThisFrame :: AnyControlFrame -> Bool
iDropThisFrame _ = False
| 95 |
iDropThisFrame _ = False
| 53 | true | true | 0 | 5 | 64 | 20 | 11 | 9 | null | null |
UCSD-PL/RefScript
|
src/Language/Rsc/Typecheck/Checker.hs
|
bsd-3-clause
|
tcStmt γ (ReturnStmt l (Just e)) =
do (e', _) <- tcWrap check >>= tcEW γ e
return (ReturnStmt l (Just e'), Nothing)
where
rt = tcEnvFindReturn γ
check = do
(e', t) <- tcExpr γ (enableUnique e) (Just rt)
θ <- unifyTypeM (srcPos l) γ t rt
(t', rt') <- pure (apply θ t, apply θ rt)
e'' <- castM γ e' True t' rt'
return (e'', rt')
| 422 |
tcStmt γ (ReturnStmt l (Just e)) =
do (e', _) <- tcWrap check >>= tcEW γ e
return (ReturnStmt l (Just e'), Nothing)
where
rt = tcEnvFindReturn γ
check = do
(e', t) <- tcExpr γ (enableUnique e) (Just rt)
θ <- unifyTypeM (srcPos l) γ t rt
(t', rt') <- pure (apply θ t, apply θ rt)
e'' <- castM γ e' True t' rt'
return (e'', rt')
| 422 |
tcStmt γ (ReturnStmt l (Just e)) =
do (e', _) <- tcWrap check >>= tcEW γ e
return (ReturnStmt l (Just e'), Nothing)
where
rt = tcEnvFindReturn γ
check = do
(e', t) <- tcExpr γ (enableUnique e) (Just rt)
θ <- unifyTypeM (srcPos l) γ t rt
(t', rt') <- pure (apply θ t, apply θ rt)
e'' <- castM γ e' True t' rt'
return (e'', rt')
| 422 | false | false | 1 | 11 | 164 | 210 | 99 | 111 | null | null |
fjarri/wigner
|
src/Wigner/ExpressionHelpers.hs
|
bsd-3-clause
|
mapOpFactors :: (OpFactor -> Expr) -> Expr -> Expr
mapOpFactors f = mapTerms processTerm where
processTerm (Term Nothing fs) = makeExpr fs
processTerm (Term (Just opf) fs) = makeExpr fs * f opf
| 201 |
mapOpFactors :: (OpFactor -> Expr) -> Expr -> Expr
mapOpFactors f = mapTerms processTerm where
processTerm (Term Nothing fs) = makeExpr fs
processTerm (Term (Just opf) fs) = makeExpr fs * f opf
| 201 |
mapOpFactors f = mapTerms processTerm where
processTerm (Term Nothing fs) = makeExpr fs
processTerm (Term (Just opf) fs) = makeExpr fs * f opf
| 150 | false | true | 0 | 11 | 40 | 85 | 41 | 44 | null | null |
spacekitteh/compdata
|
benchmark/Functions/Standard/Inference.hs
|
bsd-3-clause
|
typeSugar :: PExpr -> Err VType
typeSugar (PInt _) = return VTInt
| 65 |
typeSugar :: PExpr -> Err VType
typeSugar (PInt _) = return VTInt
| 65 |
typeSugar (PInt _) = return VTInt
| 33 | false | true | 0 | 7 | 11 | 30 | 14 | 16 | null | null |
gibiansky/nvim-hs
|
library/Neovim/API/Parser.hs
|
apache-2.0
|
oMap :: Object -> Either String (Map Object Object)
oMap = \case
ObjectMap m ->
return m
o ->
throwError $ "Object is not a map: " ++ show o
| 165 |
oMap :: Object -> Either String (Map Object Object)
oMap = \case
ObjectMap m ->
return m
o ->
throwError $ "Object is not a map: " ++ show o
| 165 |
oMap = \case
ObjectMap m ->
return m
o ->
throwError $ "Object is not a map: " ++ show o
| 113 | false | true | 0 | 9 | 54 | 59 | 28 | 31 | null | null |
formrre/yi
|
yi-core/src/Yi/Buffer/Misc.hs
|
gpl-2.0
|
withMode0 :: (forall syntax. Mode syntax -> a) -> FBuffer -> a
withMode0 f FBuffer {bmode = m} = f m
| 100 |
withMode0 :: (forall syntax. Mode syntax -> a) -> FBuffer -> a
withMode0 f FBuffer {bmode = m} = f m
| 100 |
withMode0 f FBuffer {bmode = m} = f m
| 37 | false | true | 0 | 9 | 20 | 51 | 26 | 25 | null | null |
jwaldmann/satchmo-solver
|
test/Ramsey.hs
|
gpl-3.0
|
assertM this = do x <- this ; assert [x]
| 40 |
assertM this = do x <- this ; assert [x]
| 40 |
assertM this = do x <- this ; assert [x]
| 40 | false | false | 0 | 8 | 9 | 26 | 12 | 14 | null | null |
rueshyna/gogol
|
gogol-datastore/gen/Network/Google/Datastore/Types.hs
|
mpl-2.0
|
-- | View and manage your data across Google Cloud Platform services
cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"]
cloudPlatformScope = Proxy
| 175 |
cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"]
cloudPlatformScope = Proxy
| 106 |
cloudPlatformScope = Proxy
| 26 | true | true | 0 | 7 | 18 | 20 | 11 | 9 | null | null |
rueshyna/gogol
|
gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Settings/SendAs/List.hs
|
mpl-2.0
|
-- | Creates a value of 'UsersSettingsSendAsList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ussalUserId'
usersSettingsSendAsList
:: UsersSettingsSendAsList
usersSettingsSendAsList =
UsersSettingsSendAsList'
{ _ussalUserId = "me"
}
| 338 |
usersSettingsSendAsList
:: UsersSettingsSendAsList
usersSettingsSendAsList =
UsersSettingsSendAsList'
{ _ussalUserId = "me"
}
| 141 |
usersSettingsSendAsList =
UsersSettingsSendAsList'
{ _ussalUserId = "me"
}
| 86 | true | true | 0 | 7 | 60 | 34 | 18 | 16 | null | null |
zjhmale/Ntha
|
src/Ntha/Type/Infer.hs
|
bsd-3-clause
|
definePattern :: Pattern -> Type -> TypeScope -> Infer TypeScope
definePattern pattern t scope = do
tP <- prune t
case pattern of
IdPattern name -> return $ insert name tP scope
TuplePattern items -> case tP of
TOper _ types -> do
newScope <- foldM (\env (pat, patT) -> do
newEnv <- definePattern pat patT env
return newEnv)
scope $ zip items types
return newScope
_ -> error $ "Invalid type " ++ show tP ++ " for pattern " ++ show pattern
TConPattern _ patterns -> case tP of
-- t is always functionT for now so a little non-sense for this case.
TCon _ types _ -> do
newScope <- foldM (\env (pat, patT) -> do
newEnv <- definePattern pat patT env
return newEnv)
scope $ zip patterns types
return newScope
TOper _ types -> do
newScope <- foldM (\env (pat, patT) -> do
newEnv <- definePattern pat patT env
return newEnv)
scope $ zip patterns types
return newScope
_ -> error $ "Invalid type " ++ show tP ++ " for pattern " ++ show pattern
_ -> return scope
| 1,301 |
definePattern :: Pattern -> Type -> TypeScope -> Infer TypeScope
definePattern pattern t scope = do
tP <- prune t
case pattern of
IdPattern name -> return $ insert name tP scope
TuplePattern items -> case tP of
TOper _ types -> do
newScope <- foldM (\env (pat, patT) -> do
newEnv <- definePattern pat patT env
return newEnv)
scope $ zip items types
return newScope
_ -> error $ "Invalid type " ++ show tP ++ " for pattern " ++ show pattern
TConPattern _ patterns -> case tP of
-- t is always functionT for now so a little non-sense for this case.
TCon _ types _ -> do
newScope <- foldM (\env (pat, patT) -> do
newEnv <- definePattern pat patT env
return newEnv)
scope $ zip patterns types
return newScope
TOper _ types -> do
newScope <- foldM (\env (pat, patT) -> do
newEnv <- definePattern pat patT env
return newEnv)
scope $ zip patterns types
return newScope
_ -> error $ "Invalid type " ++ show tP ++ " for pattern " ++ show pattern
_ -> return scope
| 1,301 |
definePattern pattern t scope = do
tP <- prune t
case pattern of
IdPattern name -> return $ insert name tP scope
TuplePattern items -> case tP of
TOper _ types -> do
newScope <- foldM (\env (pat, patT) -> do
newEnv <- definePattern pat patT env
return newEnv)
scope $ zip items types
return newScope
_ -> error $ "Invalid type " ++ show tP ++ " for pattern " ++ show pattern
TConPattern _ patterns -> case tP of
-- t is always functionT for now so a little non-sense for this case.
TCon _ types _ -> do
newScope <- foldM (\env (pat, patT) -> do
newEnv <- definePattern pat patT env
return newEnv)
scope $ zip patterns types
return newScope
TOper _ types -> do
newScope <- foldM (\env (pat, patT) -> do
newEnv <- definePattern pat patT env
return newEnv)
scope $ zip patterns types
return newScope
_ -> error $ "Invalid type " ++ show tP ++ " for pattern " ++ show pattern
_ -> return scope
| 1,236 | false | true | 0 | 23 | 530 | 388 | 179 | 209 | null | null |
msakai/ersatz-toysat
|
examples/regexp-grid/RegexpGrid/Regexp.hs
|
bsd-3-clause
|
parseRegexp :: SourceName -> String -> Either ParseError Regexp
parseRegexp = runParser (regexp <* eof) 0
| 105 |
parseRegexp :: SourceName -> String -> Either ParseError Regexp
parseRegexp = runParser (regexp <* eof) 0
| 105 |
parseRegexp = runParser (regexp <* eof) 0
| 41 | false | true | 0 | 7 | 15 | 36 | 18 | 18 | null | null |
osa1/sequent-core
|
src/Language/SequentCore/Simpl/Env.hs
|
bsd-3-clause
|
active_unfolding_gentle :: Id -> Bool
-- Anything that is early-active
-- See Note [Gentle mode]
active_unfolding_gentle id
= isInlinePragma prag
&& isEarlyActive (inlinePragmaActivation prag)
-- NB: wrappers are not early-active
where
prag = idInlinePragma id
| 278 |
active_unfolding_gentle :: Id -> Bool
active_unfolding_gentle id
= isInlinePragma prag
&& isEarlyActive (inlinePragmaActivation prag)
-- NB: wrappers are not early-active
where
prag = idInlinePragma id
| 219 |
active_unfolding_gentle id
= isInlinePragma prag
&& isEarlyActive (inlinePragmaActivation prag)
-- NB: wrappers are not early-active
where
prag = idInlinePragma id
| 181 | true | true | 2 | 7 | 52 | 49 | 24 | 25 | null | null |
ulricha/dsh
|
src/Database/DSH/CL/Opt/Normalize.hs
|
bsd-3-clause
|
simpleExpr Var{} = True
| 41 |
simpleExpr Var{} = True
| 41 |
simpleExpr Var{} = True
| 41 | false | false | 1 | 5 | 21 | 16 | 6 | 10 | null | null |
bgwines/horse-control
|
src/Horse/Filesystem.hs
|
bsd-3-clause
|
dropPrefix (a:as) (b:bs) =
if a == b
then dropPrefix as bs
else Nothing
| 91 |
dropPrefix (a:as) (b:bs) =
if a == b
then dropPrefix as bs
else Nothing
| 91 |
dropPrefix (a:as) (b:bs) =
if a == b
then dropPrefix as bs
else Nothing
| 91 | false | false | 0 | 7 | 33 | 42 | 22 | 20 | null | null |
brendanhay/gogol
|
gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/DicomStores/Studies/StoreInstances.hs
|
mpl-2.0
|
-- | V1 error format.
pldsdsssiXgafv :: Lens' ProjectsLocationsDataSetsDicomStoresStudiesStoreInstances (Maybe Xgafv)
pldsdsssiXgafv
= lens _pldsdsssiXgafv
(\ s a -> s{_pldsdsssiXgafv = a})
| 197 |
pldsdsssiXgafv :: Lens' ProjectsLocationsDataSetsDicomStoresStudiesStoreInstances (Maybe Xgafv)
pldsdsssiXgafv
= lens _pldsdsssiXgafv
(\ s a -> s{_pldsdsssiXgafv = a})
| 175 |
pldsdsssiXgafv
= lens _pldsdsssiXgafv
(\ s a -> s{_pldsdsssiXgafv = a})
| 79 | true | true | 0 | 9 | 29 | 48 | 25 | 23 | null | null |
vasili-v/themis
|
vendor/github.com/apache/thrift/test/hs/TestClient.hs
|
apache-2.0
|
getProtocol p = error $ "Unsupported Protocol: " ++ p
| 53 |
getProtocol p = error $ "Unsupported Protocol: " ++ p
| 53 |
getProtocol p = error $ "Unsupported Protocol: " ++ p
| 53 | false | false | 5 | 5 | 9 | 23 | 8 | 15 | null | null |
scottgw/demonL
|
Language/DemonL/Yices.hs
|
bsd-3-clause
|
relYices Lt = (:<)
| 19 |
relYices Lt = (:<)
| 19 |
relYices Lt = (:<)
| 19 | false | false | 0 | 5 | 4 | 11 | 6 | 5 | null | null |
nevrenato/HetsAlloy
|
Common/Lib/MapSet.hs
|
gpl-2.0
|
-- | submap test
isSubmapOf :: (Ord a, Ord b) => MapSet a b -> MapSet a b -> Bool
isSubmapOf (MapSet m) = Map.isSubmapOfBy Set.isSubsetOf m . toMap
| 147 |
isSubmapOf :: (Ord a, Ord b) => MapSet a b -> MapSet a b -> Bool
isSubmapOf (MapSet m) = Map.isSubmapOfBy Set.isSubsetOf m . toMap
| 130 |
isSubmapOf (MapSet m) = Map.isSubmapOfBy Set.isSubsetOf m . toMap
| 65 | true | true | 0 | 8 | 28 | 67 | 33 | 34 | null | null |
zhiyuanshi/fcore
|
frontend/SymbolicEvaluator.hs
|
bsd-2-clause
|
merge (_, EQ) (Exp (SInt a)) (Exp (SInt b)) = Exp $ SBool (a==b)
| 64 |
merge (_, EQ) (Exp (SInt a)) (Exp (SInt b)) = Exp $ SBool (a==b)
| 64 |
merge (_, EQ) (Exp (SInt a)) (Exp (SInt b)) = Exp $ SBool (a==b)
| 64 | false | false | 2 | 10 | 13 | 61 | 29 | 32 | null | null |
nedervold/context-free-grammar
|
src/Data/Cfg/Cfg.hs
|
bsd-3-clause
|
-- | Returns the vocabulary symbols of the grammar: elements of
-- 'terminals' and 'nonterminals'.
vocabulary :: (Cfg cfg t nt, Ord nt, Ord t) => cfg t nt -> S.Set (V t nt)
vocabulary cfg = S.map T (terminals cfg)
`S.union` S.map NT (nonterminals cfg)
| 272 |
vocabulary :: (Cfg cfg t nt, Ord nt, Ord t) => cfg t nt -> S.Set (V t nt)
vocabulary cfg = S.map T (terminals cfg)
`S.union` S.map NT (nonterminals cfg)
| 173 |
vocabulary cfg = S.map T (terminals cfg)
`S.union` S.map NT (nonterminals cfg)
| 99 | true | true | 0 | 9 | 66 | 97 | 49 | 48 | null | null |
gromakovsky/Orchid
|
src/Orchid/Compiler.hs
|
mit
|
orchidPrelude :: Input
orchidPrelude =
either (error "Fatal error: failed to parse prelude") id $
parseInput "prelude" orchidPreludeStr
| 143 |
orchidPrelude :: Input
orchidPrelude =
either (error "Fatal error: failed to parse prelude") id $
parseInput "prelude" orchidPreludeStr
| 143 |
orchidPrelude =
either (error "Fatal error: failed to parse prelude") id $
parseInput "prelude" orchidPreludeStr
| 120 | false | true | 0 | 8 | 25 | 40 | 16 | 24 | null | null |
ComputationWithBoundedResources/tct-trs
|
src/Tct/Trs/Processor/Matrix/NaturalMI.hs
|
bsd-3-clause
|
matrixCPDeclaration :: CD.Declaration (
'[ CD.Argument 'CD.Optional Int
, CD.Argument 'CD.Optional Int
, CD.Argument 'CD.Optional NaturalMIKind
, CD.Argument 'CD.Optional Arg.UsableArgs
, CD.Argument 'CD.Optional Arg.UsableRules ]
CD.:-> CP.ComplexityPair )
matrixCPDeclaration = CD.declare "matrixCP" description argsCP matrixComplexityPair
where
argsCP =
( dimArg `CD.optional` 1
, degArg `CD.optional` 1
, nmiKindArg `CD.optional` Algebraic
, Arg.usableArgs `CD.optional` Arg.UArgs
, Arg.usableRules `CD.optional` Arg.URules )
| 605 |
matrixCPDeclaration :: CD.Declaration (
'[ CD.Argument 'CD.Optional Int
, CD.Argument 'CD.Optional Int
, CD.Argument 'CD.Optional NaturalMIKind
, CD.Argument 'CD.Optional Arg.UsableArgs
, CD.Argument 'CD.Optional Arg.UsableRules ]
CD.:-> CP.ComplexityPair )
matrixCPDeclaration = CD.declare "matrixCP" description argsCP matrixComplexityPair
where
argsCP =
( dimArg `CD.optional` 1
, degArg `CD.optional` 1
, nmiKindArg `CD.optional` Algebraic
, Arg.usableArgs `CD.optional` Arg.UArgs
, Arg.usableRules `CD.optional` Arg.URules )
| 605 |
matrixCPDeclaration = CD.declare "matrixCP" description argsCP matrixComplexityPair
where
argsCP =
( dimArg `CD.optional` 1
, degArg `CD.optional` 1
, nmiKindArg `CD.optional` Algebraic
, Arg.usableArgs `CD.optional` Arg.UArgs
, Arg.usableRules `CD.optional` Arg.URules )
| 331 | false | true | 0 | 12 | 134 | 185 | 100 | 85 | null | null |
Mahdi89/eTeak
|
src/Print.hs
|
bsd-3-clause
|
printPostPos :: PostShow Pos
printPostPos _ (_, node) = ([showParen True $ showString $ show node], node)
| 109 |
printPostPos :: PostShow Pos
printPostPos _ (_, node) = ([showParen True $ showString $ show node], node)
| 105 |
printPostPos _ (_, node) = ([showParen True $ showString $ show node], node)
| 76 | false | true | 0 | 9 | 20 | 48 | 25 | 23 | null | null |
olsner/ghc
|
compiler/basicTypes/BasicTypes.hs
|
bsd-3-clause
|
-- | Add two 'IntWithInf's
plusWithInf :: IntWithInf -> IntWithInf -> IntWithInf
plusWithInf Infinity _ = Infinity
| 121 |
plusWithInf :: IntWithInf -> IntWithInf -> IntWithInf
plusWithInf Infinity _ = Infinity
| 94 |
plusWithInf Infinity _ = Infinity
| 40 | true | true | 0 | 6 | 23 | 30 | 14 | 16 | null | null |
philopon/hbrew
|
src/Distribution/HBrew/Ghc.hs
|
bsd-3-clause
|
showGhcVersion :: (CompilerFlavor, Version, Arch) -> String
showGhcVersion (f, v, a) = showText f ++ '-': showText v ++ '-': showText a
| 135 |
showGhcVersion :: (CompilerFlavor, Version, Arch) -> String
showGhcVersion (f, v, a) = showText f ++ '-': showText v ++ '-': showText a
| 135 |
showGhcVersion (f, v, a) = showText f ++ '-': showText v ++ '-': showText a
| 75 | false | true | 0 | 9 | 21 | 61 | 32 | 29 | null | null |
tjakway/ghcjvm
|
compiler/types/Type.hs
|
bsd-3-clause
|
mkReprPrimEqPred :: Type -> Type -> Type
mkReprPrimEqPred ty1 ty2
= TyConApp eqReprPrimTyCon [k1, k2, ty1, ty2]
where
k1 = typeKind ty1
k2 = typeKind ty2
| 166 |
mkReprPrimEqPred :: Type -> Type -> Type
mkReprPrimEqPred ty1 ty2
= TyConApp eqReprPrimTyCon [k1, k2, ty1, ty2]
where
k1 = typeKind ty1
k2 = typeKind ty2
| 166 |
mkReprPrimEqPred ty1 ty2
= TyConApp eqReprPrimTyCon [k1, k2, ty1, ty2]
where
k1 = typeKind ty1
k2 = typeKind ty2
| 125 | false | true | 1 | 8 | 38 | 68 | 32 | 36 | null | null |
erantapaa/haskell-platform
|
hptool/src/Paths.hs
|
bsd-3-clause
|
-- | Template expanded copies of any os-extras are build here
extrasDir :: FilePath
extrasDir = buildRoot </> "extras"
| 118 |
extrasDir :: FilePath
extrasDir = buildRoot </> "extras"
| 56 |
extrasDir = buildRoot </> "extras"
| 34 | true | true | 0 | 5 | 18 | 16 | 9 | 7 | null | null |
ezyang/ghc
|
compiler/hsSyn/HsPat.hs
|
bsd-3-clause
|
hsPatNeedsParens (TuplePat {}) = False
| 44 |
hsPatNeedsParens (TuplePat {}) = False
| 44 |
hsPatNeedsParens (TuplePat {}) = False
| 44 | false | false | 0 | 7 | 10 | 16 | 8 | 8 | null | null |
chriseidhof/formlets
|
Text/Formlets/MassInput.hs
|
bsd-3-clause
|
wrapperDiv = X.thediv ! [X.theclass "massInput"]
| 48 |
wrapperDiv = X.thediv ! [X.theclass "massInput"]
| 48 |
wrapperDiv = X.thediv ! [X.theclass "massInput"]
| 48 | false | false | 3 | 8 | 5 | 25 | 10 | 15 | null | null |
ghc-android/ghc
|
compiler/simplCore/SetLevels.hs
|
bsd-3-clause
|
newLvlVar :: LevelledExpr -- The RHS of the new binding
-> Bool -- Whether it is bottom
-> LvlM Id
newLvlVar lvld_rhs is_bot
= do { uniq <- getUniqueM
; return (add_bot_info (mkLocalId (mk_name uniq) rhs_ty)) }
where
add_bot_info var -- We could call annotateBotStr always, but the is_bot
-- flag just tells us when we don't need to do so
| is_bot = annotateBotStr var (exprBotStrictness_maybe de_tagged_rhs)
| otherwise = var
de_tagged_rhs = deTagExpr lvld_rhs
rhs_ty = exprType de_tagged_rhs
mk_name uniq = mkSystemVarName uniq (mkFastString "lvl")
| 659 |
newLvlVar :: LevelledExpr -- The RHS of the new binding
-> Bool -- Whether it is bottom
-> LvlM Id
newLvlVar lvld_rhs is_bot
= do { uniq <- getUniqueM
; return (add_bot_info (mkLocalId (mk_name uniq) rhs_ty)) }
where
add_bot_info var -- We could call annotateBotStr always, but the is_bot
-- flag just tells us when we don't need to do so
| is_bot = annotateBotStr var (exprBotStrictness_maybe de_tagged_rhs)
| otherwise = var
de_tagged_rhs = deTagExpr lvld_rhs
rhs_ty = exprType de_tagged_rhs
mk_name uniq = mkSystemVarName uniq (mkFastString "lvl")
| 659 |
newLvlVar lvld_rhs is_bot
= do { uniq <- getUniqueM
; return (add_bot_info (mkLocalId (mk_name uniq) rhs_ty)) }
where
add_bot_info var -- We could call annotateBotStr always, but the is_bot
-- flag just tells us when we don't need to do so
| is_bot = annotateBotStr var (exprBotStrictness_maybe de_tagged_rhs)
| otherwise = var
de_tagged_rhs = deTagExpr lvld_rhs
rhs_ty = exprType de_tagged_rhs
mk_name uniq = mkSystemVarName uniq (mkFastString "lvl")
| 518 | false | true | 2 | 13 | 195 | 153 | 71 | 82 | null | null |
HIPERFIT/futhark
|
src/Futhark/Util.hs
|
isc
|
-- | The Unix environment when the Futhark compiler started.
unixEnvironment :: [(String, String)]
unixEnvironment = unsafePerformIO getEnvironment
| 147 |
unixEnvironment :: [(String, String)]
unixEnvironment = unsafePerformIO getEnvironment
| 86 |
unixEnvironment = unsafePerformIO getEnvironment
| 48 | true | true | 0 | 6 | 17 | 24 | 14 | 10 | null | null |
mkut/libmtg
|
Magic/MWDeck.hs
|
bsd-3-clause
|
writeAsMWDeck :: FilePath -> [Card] -> IO ()
writeAsMWDeck path cards = do
h <- openFile path WriteMode
forM_ card' $ \c -> do
putStrLn $ " " ++ show (length c) ++ " [RTR] " ++ cardName (head c)
hPutStrLn h $ " " ++ show (length c) ++ " [RTR] " ++ cardName (head c)
hClose h
where
card' = group $ sort cards
-- vim: set expandtab:
| 367 |
writeAsMWDeck :: FilePath -> [Card] -> IO ()
writeAsMWDeck path cards = do
h <- openFile path WriteMode
forM_ card' $ \c -> do
putStrLn $ " " ++ show (length c) ++ " [RTR] " ++ cardName (head c)
hPutStrLn h $ " " ++ show (length c) ++ " [RTR] " ++ cardName (head c)
hClose h
where
card' = group $ sort cards
-- vim: set expandtab:
| 367 |
writeAsMWDeck path cards = do
h <- openFile path WriteMode
forM_ card' $ \c -> do
putStrLn $ " " ++ show (length c) ++ " [RTR] " ++ cardName (head c)
hPutStrLn h $ " " ++ show (length c) ++ " [RTR] " ++ cardName (head c)
hClose h
where
card' = group $ sort cards
-- vim: set expandtab:
| 322 | false | true | 0 | 16 | 106 | 158 | 73 | 85 | null | null |
danoctavian/helligator
|
src/Crypto/Curve25519.hs
|
mit
|
pubFromWord256 :: Word256 -> PublicKey
pubFromWord256 = PublicKey . BSL.toStrict . Bin.encode
| 93 |
pubFromWord256 :: Word256 -> PublicKey
pubFromWord256 = PublicKey . BSL.toStrict . Bin.encode
| 93 |
pubFromWord256 = PublicKey . BSL.toStrict . Bin.encode
| 54 | false | true | 1 | 7 | 11 | 35 | 15 | 20 | null | null |
siddhanathan/ghc
|
compiler/utils/Outputable.hs
|
bsd-3-clause
|
userStyle :: PprStyle -> Bool
userStyle (PprUser _ _) = True
| 61 |
userStyle :: PprStyle -> Bool
userStyle (PprUser _ _) = True
| 61 |
userStyle (PprUser _ _) = True
| 30 | false | true | 0 | 7 | 11 | 26 | 13 | 13 | null | null |
tjakway/ghcjvm
|
compiler/hsSyn/HsBinds.hs
|
bsd-3-clause
|
ppr_monobind (PatSynBind psb) = ppr psb
| 39 |
ppr_monobind (PatSynBind psb) = ppr psb
| 39 |
ppr_monobind (PatSynBind psb) = ppr psb
| 39 | false | false | 0 | 6 | 5 | 19 | 8 | 11 | null | null |
andygill/plist-buddy
|
src/Database/PlistBuddy.hs
|
bsd-3-clause
|
revert :: PlistBuddy ()
revert = do
plist <- ask
res <- liftIO $ command plist "Revert"
case res of
"Reverting to last saved state..." -> do
liftIO $ plist_trail plist Revert
dirty False
return ()
_ -> error $ "revert failed: " ++ show res
-- | Clear Type - Clears out all existing entries, and creates root of a value,
-- where the value is an empty Dict or Array.
| 446 |
revert :: PlistBuddy ()
revert = do
plist <- ask
res <- liftIO $ command plist "Revert"
case res of
"Reverting to last saved state..." -> do
liftIO $ plist_trail plist Revert
dirty False
return ()
_ -> error $ "revert failed: " ++ show res
-- | Clear Type - Clears out all existing entries, and creates root of a value,
-- where the value is an empty Dict or Array.
| 446 |
revert = do
plist <- ask
res <- liftIO $ command plist "Revert"
case res of
"Reverting to last saved state..." -> do
liftIO $ plist_trail plist Revert
dirty False
return ()
_ -> error $ "revert failed: " ++ show res
-- | Clear Type - Clears out all existing entries, and creates root of a value,
-- where the value is an empty Dict or Array.
| 422 | false | true | 1 | 14 | 152 | 101 | 44 | 57 | null | null |
bamboo/idris-cil
|
src/IRTS/CodegenCil.hs
|
bsd-3-clause
|
emitCustomExternalOp "prim__singleShow" [x] = emitPrimitiveToString x
| 69 |
emitCustomExternalOp "prim__singleShow" [x] = emitPrimitiveToString x
| 69 |
emitCustomExternalOp "prim__singleShow" [x] = emitPrimitiveToString x
| 69 | false | false | 0 | 6 | 5 | 17 | 8 | 9 | null | null |
rueshyna/gogol
|
gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Purchases/Subscriptions/Get.hs
|
mpl-2.0
|
-- | The purchased subscription ID (for example, \'monthly001\').
psgSubscriptionId :: Lens' PurchasesSubscriptionsGet Text
psgSubscriptionId
= lens _psgSubscriptionId
(\ s a -> s{_psgSubscriptionId = a})
| 212 |
psgSubscriptionId :: Lens' PurchasesSubscriptionsGet Text
psgSubscriptionId
= lens _psgSubscriptionId
(\ s a -> s{_psgSubscriptionId = a})
| 146 |
psgSubscriptionId
= lens _psgSubscriptionId
(\ s a -> s{_psgSubscriptionId = a})
| 88 | true | true | 0 | 9 | 32 | 42 | 22 | 20 | null | null |
dphilipson/word_guesser_web
|
Game/Lexicon.hs
|
mit
|
canonicalLines :: FilePath -> IO [Text]
canonicalLines = ((map canonicalize . T.lines) <$>) . TIO.readFile
| 106 |
canonicalLines :: FilePath -> IO [Text]
canonicalLines = ((map canonicalize . T.lines) <$>) . TIO.readFile
| 106 |
canonicalLines = ((map canonicalize . T.lines) <$>) . TIO.readFile
| 66 | false | true | 0 | 9 | 14 | 49 | 24 | 25 | null | null |
joachifm/mpdfs
|
Main.hs
|
gpl-2.0
|
stat chan p = do
putStrLn $ "STAT DIRECTORY: " ++ p
cs <- getDirectoryContents chan (takeDirectory p)
case lookup (takeBaseName p) cs of
Just s -> return $ Right s
Nothing -> return $ Left F.eNOENT
--
-- File system description.
--
| 261 |
stat chan p = do
putStrLn $ "STAT DIRECTORY: " ++ p
cs <- getDirectoryContents chan (takeDirectory p)
case lookup (takeBaseName p) cs of
Just s -> return $ Right s
Nothing -> return $ Left F.eNOENT
--
-- File system description.
--
| 261 |
stat chan p = do
putStrLn $ "STAT DIRECTORY: " ++ p
cs <- getDirectoryContents chan (takeDirectory p)
case lookup (takeBaseName p) cs of
Just s -> return $ Right s
Nothing -> return $ Left F.eNOENT
--
-- File system description.
--
| 261 | false | false | 1 | 13 | 72 | 97 | 43 | 54 | null | null |
ezyang/ghc
|
libraries/base/Data/OldList.hs
|
bsd-3-clause
|
-- | The 'deleteBy' function behaves like 'delete', but takes a
-- user-supplied equality predicate.
--
-- >>> deleteBy (<=) 4 [1..10]
-- [1,2,3,5,6,7,8,9,10]
deleteBy :: (a -> a -> Bool) -> a -> [a] -> [a]
deleteBy _ _ [] = []
| 250 |
deleteBy :: (a -> a -> Bool) -> a -> [a] -> [a]
deleteBy _ _ [] = []
| 91 |
deleteBy _ _ [] = []
| 28 | true | true | 0 | 8 | 65 | 56 | 32 | 24 | null | null |
olsner/ghc
|
utils/check-ppr/Main.hs
|
bsd-3-clause
|
-- | Type extension of queries for type constructors
ext2Q :: (Data d, Typeable t)
=> (d -> q)
-> (forall d1 d2. (Data d1, Data d2) => t d1 d2 -> q)
-> d -> q
ext2Q def ext = unQ ((Q def) `ext2` (Q ext))
| 221 |
ext2Q :: (Data d, Typeable t)
=> (d -> q)
-> (forall d1 d2. (Data d1, Data d2) => t d1 d2 -> q)
-> d -> q
ext2Q def ext = unQ ((Q def) `ext2` (Q ext))
| 168 |
ext2Q def ext = unQ ((Q def) `ext2` (Q ext))
| 44 | true | true | 0 | 12 | 64 | 108 | 58 | 50 | null | null |
suhailshergill/hakaru
|
Tests/Syntax.hs
|
bsd-3-clause
|
pair3fst, pair3snd, pair3trd
:: (Mochastic repr)
=> repr HProb
-> [repr HBool]
-> repr (HMeasure HUnit)
pair3fst bias [b1,b2,b3] =
factor (if_ b1 bias (1-bias)) `bind_`
factor (if_ b2 bias (1-bias)) `bind_`
factor (if_ b3 bias (1-bias))
| 258 |
pair3fst, pair3snd, pair3trd
:: (Mochastic repr)
=> repr HProb
-> [repr HBool]
-> repr (HMeasure HUnit)
pair3fst bias [b1,b2,b3] =
factor (if_ b1 bias (1-bias)) `bind_`
factor (if_ b2 bias (1-bias)) `bind_`
factor (if_ b3 bias (1-bias))
| 258 |
pair3fst bias [b1,b2,b3] =
factor (if_ b1 bias (1-bias)) `bind_`
factor (if_ b2 bias (1-bias)) `bind_`
factor (if_ b3 bias (1-bias))
| 138 | false | true | 0 | 11 | 58 | 136 | 73 | 63 | null | null |
ryantm/ghc
|
libraries/base/Data/Data.hs
|
bsd-3-clause
|
tuple2Constr :: Constr
tuple2Constr = mkConstr tuple2DataType "(,)" [] Infix
| 76 |
tuple2Constr :: Constr
tuple2Constr = mkConstr tuple2DataType "(,)" [] Infix
| 76 |
tuple2Constr = mkConstr tuple2DataType "(,)" [] Infix
| 53 | false | true | 0 | 6 | 9 | 29 | 12 | 17 | null | null |
sinelaw/infernu
|
docs/semantics.hs
|
gpl-2.0
|
smean (While expr body) = while
where
while =
\k env rw ->
case (emean expr) env rw of
(rw', VBool False) -> k env rw'
(rw', VBool True) -> smean body (while k) env rw'
_ -> error "Expected boolean"
--Note: Recursive let using in the meaning here. It should be the same as using `fix`.
-- | If statement
| 394 |
smean (While expr body) = while
where
while =
\k env rw ->
case (emean expr) env rw of
(rw', VBool False) -> k env rw'
(rw', VBool True) -> smean body (while k) env rw'
_ -> error "Expected boolean"
--Note: Recursive let using in the meaning here. It should be the same as using `fix`.
-- | If statement
| 394 |
smean (While expr body) = while
where
while =
\k env rw ->
case (emean expr) env rw of
(rw', VBool False) -> k env rw'
(rw', VBool True) -> smean body (while k) env rw'
_ -> error "Expected boolean"
--Note: Recursive let using in the meaning here. It should be the same as using `fix`.
-- | If statement
| 394 | false | false | 1 | 11 | 151 | 114 | 55 | 59 | null | null |
sopvop/cabal
|
Cabal/Distribution/Simple/Setup.hs
|
bsd-3-clause
|
isRelaxDeps RelaxDepsAll = True
| 36 |
isRelaxDeps RelaxDepsAll = True
| 36 |
isRelaxDeps RelaxDepsAll = True
| 36 | false | false | 0 | 5 | 8 | 9 | 4 | 5 | null | null |
mbakke/ganeti
|
src/Ganeti/WConfd/TempRes.hs
|
bsd-2-clause
|
-- * DRBD functions
-- | Compute the map of used DRBD minor/nodes, including possible
-- duplicates.
-- An error is returned if the configuration isn't consistent
-- (for example if a referenced disk is missing etc.).
computeDRBDMap' :: (MonadError GanetiException m)
=> ConfigData -> TempResState -> m DRBDMap'
computeDRBDMap' cfg trs =
flip execStateT (fmap (fmap (: [])) (trsDRBD trs))
$ F.forM_ (configDisks cfg) addMinors
where
-- | Creates a lens for modifying the list of instances
nodeMinor :: NodeUUID -> DRBDMinor -> Lens' DRBDMap' [DiskUUID]
nodeMinor node minor = maybeLens (at node) . maybeLens (at minor)
-- | Adds minors of a disk within the state monad
addMinors disk = do
let minors = getDrbdMinorsForDisk disk
forM_ minors $ \(minor, node) ->
nodeMinor (UTF8.fromString node) minor %=
(UTF8.fromString (uuidOf disk) :)
-- | Compute the map of used DRBD minor/nodes.
-- Report any duplicate entries as an error.
--
-- Unlike 'computeDRBDMap'', includes entries for all nodes, even if empty.
| 1,087 |
computeDRBDMap' :: (MonadError GanetiException m)
=> ConfigData -> TempResState -> m DRBDMap'
computeDRBDMap' cfg trs =
flip execStateT (fmap (fmap (: [])) (trsDRBD trs))
$ F.forM_ (configDisks cfg) addMinors
where
-- | Creates a lens for modifying the list of instances
nodeMinor :: NodeUUID -> DRBDMinor -> Lens' DRBDMap' [DiskUUID]
nodeMinor node minor = maybeLens (at node) . maybeLens (at minor)
-- | Adds minors of a disk within the state monad
addMinors disk = do
let minors = getDrbdMinorsForDisk disk
forM_ minors $ \(minor, node) ->
nodeMinor (UTF8.fromString node) minor %=
(UTF8.fromString (uuidOf disk) :)
-- | Compute the map of used DRBD minor/nodes.
-- Report any duplicate entries as an error.
--
-- Unlike 'computeDRBDMap'', includes entries for all nodes, even if empty.
| 868 |
computeDRBDMap' cfg trs =
flip execStateT (fmap (fmap (: [])) (trsDRBD trs))
$ F.forM_ (configDisks cfg) addMinors
where
-- | Creates a lens for modifying the list of instances
nodeMinor :: NodeUUID -> DRBDMinor -> Lens' DRBDMap' [DiskUUID]
nodeMinor node minor = maybeLens (at node) . maybeLens (at minor)
-- | Adds minors of a disk within the state monad
addMinors disk = do
let minors = getDrbdMinorsForDisk disk
forM_ minors $ \(minor, node) ->
nodeMinor (UTF8.fromString node) minor %=
(UTF8.fromString (uuidOf disk) :)
-- | Compute the map of used DRBD minor/nodes.
-- Report any duplicate entries as an error.
--
-- Unlike 'computeDRBDMap'', includes entries for all nodes, even if empty.
| 758 | true | true | 2 | 14 | 241 | 228 | 117 | 111 | null | null |
hephaestus-pl/hephaestus
|
alexandre/util/src/BasicTypes.hs
|
mit
|
isSuccess :: ParserResult a -> Bool
isSuccess (Success _) = True
| 64 |
isSuccess :: ParserResult a -> Bool
isSuccess (Success _) = True
| 64 |
isSuccess (Success _) = True
| 28 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
lifengsun/haskell-exercise
|
scheme/05/equalparser.hs
|
gpl-3.0
|
eqv :: [LispVal] -> ThrowsError LispVal
eqv [(Bool x), (Bool y)] = return $ Bool $ x == y
| 89 |
eqv :: [LispVal] -> ThrowsError LispVal
eqv [(Bool x), (Bool y)] = return $ Bool $ x == y
| 89 |
eqv [(Bool x), (Bool y)] = return $ Bool $ x == y
| 49 | false | true | 0 | 8 | 18 | 54 | 28 | 26 | null | null |
brendanhay/gogol
|
gogol-videointelligence/gen/Network/Google/VideoIntelligence/Types/Product.hs
|
mpl-2.0
|
-- | Creates a value of 'GoogleCloudVideointelligenceV1p2beta1_TextAnnotation' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'gcvvtaText'
--
-- * 'gcvvtaVersion'
--
-- * 'gcvvtaSegments'
googleCloudVideointelligenceV1p2beta1_TextAnnotation
:: GoogleCloudVideointelligenceV1p2beta1_TextAnnotation
googleCloudVideointelligenceV1p2beta1_TextAnnotation =
GoogleCloudVideointelligenceV1p2beta1_TextAnnotation'
{_gcvvtaText = Nothing, _gcvvtaVersion = Nothing, _gcvvtaSegments = Nothing}
| 578 |
googleCloudVideointelligenceV1p2beta1_TextAnnotation
:: GoogleCloudVideointelligenceV1p2beta1_TextAnnotation
googleCloudVideointelligenceV1p2beta1_TextAnnotation =
GoogleCloudVideointelligenceV1p2beta1_TextAnnotation'
{_gcvvtaText = Nothing, _gcvvtaVersion = Nothing, _gcvvtaSegments = Nothing}
| 304 |
googleCloudVideointelligenceV1p2beta1_TextAnnotation =
GoogleCloudVideointelligenceV1p2beta1_TextAnnotation'
{_gcvvtaText = Nothing, _gcvvtaVersion = Nothing, _gcvvtaSegments = Nothing}
| 191 | true | true | 0 | 6 | 66 | 40 | 28 | 12 | null | null |
mars-lan/WhereHows
|
contrib/metadata-ingestion/haskell/bin/dataset-jdbc-generator.hs
|
apache-2.0
|
datasetOracleSql :: T.Text
datasetOracleSql = [q|
select
c.OWNER || '.' || c.TABLE_NAME as schema_name
, t.COMMENTS as schema_description
, c.COLUMN_NAME as field_path
, c.DATA_TYPE as native_data_type
, m.COMMENTS as description
from ALL_TAB_COLUMNS c
left join ALL_TAB_COMMENTS t
on c.OWNER = t.OWNER
and c.TABLE_NAME = t.TABLE_NAME
left join ALL_COL_COMMENTS m
on c.OWNER = m.OWNER
and c.TABLE_NAME = m.TABLE_NAME
and c.COLUMN_NAME = m.COLUMN_NAME
where NOT REGEXP_LIKE(c.OWNER, 'ANONYMOUS|PUBLIC|SYS|SYSTEM|DBSNMP|MDSYS|CTXSYS|XDB|TSMSYS|ORACLE.*|APEX.*|TEST?*|GG_.*|\\$')
order by schema_name, c.COLUMN_ID
|]
| 704 |
datasetOracleSql :: T.Text
datasetOracleSql = [q|
select
c.OWNER || '.' || c.TABLE_NAME as schema_name
, t.COMMENTS as schema_description
, c.COLUMN_NAME as field_path
, c.DATA_TYPE as native_data_type
, m.COMMENTS as description
from ALL_TAB_COLUMNS c
left join ALL_TAB_COMMENTS t
on c.OWNER = t.OWNER
and c.TABLE_NAME = t.TABLE_NAME
left join ALL_COL_COMMENTS m
on c.OWNER = m.OWNER
and c.TABLE_NAME = m.TABLE_NAME
and c.COLUMN_NAME = m.COLUMN_NAME
where NOT REGEXP_LIKE(c.OWNER, 'ANONYMOUS|PUBLIC|SYS|SYSTEM|DBSNMP|MDSYS|CTXSYS|XDB|TSMSYS|ORACLE.*|APEX.*|TEST?*|GG_.*|\\$')
order by schema_name, c.COLUMN_ID
|]
| 704 |
datasetOracleSql = [q|
select
c.OWNER || '.' || c.TABLE_NAME as schema_name
, t.COMMENTS as schema_description
, c.COLUMN_NAME as field_path
, c.DATA_TYPE as native_data_type
, m.COMMENTS as description
from ALL_TAB_COLUMNS c
left join ALL_TAB_COMMENTS t
on c.OWNER = t.OWNER
and c.TABLE_NAME = t.TABLE_NAME
left join ALL_COL_COMMENTS m
on c.OWNER = m.OWNER
and c.TABLE_NAME = m.TABLE_NAME
and c.COLUMN_NAME = m.COLUMN_NAME
where NOT REGEXP_LIKE(c.OWNER, 'ANONYMOUS|PUBLIC|SYS|SYSTEM|DBSNMP|MDSYS|CTXSYS|XDB|TSMSYS|ORACLE.*|APEX.*|TEST?*|GG_.*|\\$')
order by schema_name, c.COLUMN_ID
|]
| 677 | false | true | 0 | 7 | 160 | 24 | 12 | 12 | null | null |
ghcjs/haddock-internal
|
vendor/attoparsec-0.10.4.0/Data/Attoparsec/ByteString/Char8.hs
|
bsd-2-clause
|
-- | Fast predicate for matching ASCII space characters.
--
-- /Note/: This predicate only gives correct answers for the ASCII
-- encoding. For instance, it does not recognise U+00A0 (non-breaking
-- space) as a space character, even though it is a valid ISO-8859-15
-- byte. For a Unicode-aware and only slightly slower predicate,
-- use 'Data.Char.isSpace'
isSpace :: Char -> Bool
isSpace c = (c == ' ') || ('\t' <= c && c <= '\r')
| 434 |
isSpace :: Char -> Bool
isSpace c = (c == ' ') || ('\t' <= c && c <= '\r')
| 74 |
isSpace c = (c == ' ') || ('\t' <= c && c <= '\r')
| 50 | true | true | 1 | 7 | 77 | 58 | 32 | 26 | null | null |
jmitchell/Idris-dev
|
src/IRTS/CodegenC.hs
|
bsd-3-clause
|
doOp v (LSGt ATFloat) [l, r] = v ++ "FLOATBOP(>," ++ creg l ++ ", " ++ creg r ++ ")"
| 84 |
doOp v (LSGt ATFloat) [l, r] = v ++ "FLOATBOP(>," ++ creg l ++ ", " ++ creg r ++ ")"
| 84 |
doOp v (LSGt ATFloat) [l, r] = v ++ "FLOATBOP(>," ++ creg l ++ ", " ++ creg r ++ ")"
| 84 | false | false | 0 | 9 | 20 | 51 | 25 | 26 | null | null |
rueshyna/gogol
|
gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs
|
mpl-2.0
|
-- | Shipping services describing shipping fees calculation.
assServices :: Lens' AccountShipping [AccountShippingShippingService]
assServices
= lens _assServices (\ s a -> s{_assServices = a}) .
_Default
. _Coerce
| 228 |
assServices :: Lens' AccountShipping [AccountShippingShippingService]
assServices
= lens _assServices (\ s a -> s{_assServices = a}) .
_Default
. _Coerce
| 167 |
assServices
= lens _assServices (\ s a -> s{_assServices = a}) .
_Default
. _Coerce
| 97 | true | true | 1 | 10 | 41 | 55 | 28 | 27 | null | null |
spechub/Hets
|
SoftFOL/ProveVampire.hs
|
gpl-2.0
|
-- * Main prover functions
-- ** Utility functions
{- |
Record for prover specific functions. This is used by both GUI and command
line interface.
-}
atpFun :: String -- ^ theory name
-> ATPFunctions Sign Sentence SoftFOLMorphism ProofTree SoftFOLProverState
atpFun thName = ATPFunctions
{ initialProverState = spassProverState,
atpTransSenName = transSenName,
atpInsertSentence = insertSentenceGen,
goalOutput = showTPTPProblem thName,
proverHelpText = vampireHelpText,
batchTimeEnv = "HETS_SPASS_BATCH_TIME_LIMIT",
fileExtensions = FileExtensions {problemOutput = ".tptp",
proverOutput = ".vamp",
theoryConfiguration = ".spcf"},
runProver = runVampire,
createProverOptions = extraOpts}
| 823 |
atpFun :: String -- ^ theory name
-> ATPFunctions Sign Sentence SoftFOLMorphism ProofTree SoftFOLProverState
atpFun thName = ATPFunctions
{ initialProverState = spassProverState,
atpTransSenName = transSenName,
atpInsertSentence = insertSentenceGen,
goalOutput = showTPTPProblem thName,
proverHelpText = vampireHelpText,
batchTimeEnv = "HETS_SPASS_BATCH_TIME_LIMIT",
fileExtensions = FileExtensions {problemOutput = ".tptp",
proverOutput = ".vamp",
theoryConfiguration = ".spcf"},
runProver = runVampire,
createProverOptions = extraOpts}
| 667 |
atpFun thName = ATPFunctions
{ initialProverState = spassProverState,
atpTransSenName = transSenName,
atpInsertSentence = insertSentenceGen,
goalOutput = showTPTPProblem thName,
proverHelpText = vampireHelpText,
batchTimeEnv = "HETS_SPASS_BATCH_TIME_LIMIT",
fileExtensions = FileExtensions {problemOutput = ".tptp",
proverOutput = ".vamp",
theoryConfiguration = ".spcf"},
runProver = runVampire,
createProverOptions = extraOpts}
| 556 | true | true | 0 | 8 | 218 | 113 | 69 | 44 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.