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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ohua-dev/ohua-core
|
tests/src/DFLoweringSpec.hs
|
epl-1.0
|
spec :: Spec
spec = do
smapSpec
ifSpec
generalLowering
seqSpec
| 78 |
spec :: Spec
spec = do
smapSpec
ifSpec
generalLowering
seqSpec
| 78 |
spec = do
smapSpec
ifSpec
generalLowering
seqSpec
| 65 | false | true | 0 | 7 | 25 | 30 | 11 | 19 | null | null |
HIPERFIT/futhark
|
src/Futhark/Internalise/Monomorphise.hs
|
isc
|
transformExp (Negate e loc) =
Negate <$> transformExp e <*> pure loc
| 70 |
transformExp (Negate e loc) =
Negate <$> transformExp e <*> pure loc
| 70 |
transformExp (Negate e loc) =
Negate <$> transformExp e <*> pure loc
| 70 | false | false | 0 | 7 | 13 | 31 | 14 | 17 | null | null |
loganbraga/hunch
|
app/Hunch/Runner.hs
|
mit
|
-- Forcefully exit the program by printing a given error message
fatal :: String -> IO ()
fatal str = hPutStrLn stderr ("(FATAL) " ++ str ++ helpText) >> exitFailure
where
helpText = "\n\nType `hunch --help` for more information on Hunch usage."
-- Catch exception and print it as other errors
| 300 |
fatal :: String -> IO ()
fatal str = hPutStrLn stderr ("(FATAL) " ++ str ++ helpText) >> exitFailure
where
helpText = "\n\nType `hunch --help` for more information on Hunch usage."
-- Catch exception and print it as other errors
| 235 |
fatal str = hPutStrLn stderr ("(FATAL) " ++ str ++ helpText) >> exitFailure
where
helpText = "\n\nType `hunch --help` for more information on Hunch usage."
-- Catch exception and print it as other errors
| 210 | true | true | 0 | 9 | 57 | 53 | 27 | 26 | null | null |
IreneKnapp/direct-crypto-socket
|
SSH.hs
|
mit
|
main :: IO ()
main = do
arguments <- getArgs
case arguments of
[hostname] -> sshClient hostname
_ -> usage
| 118 |
main :: IO ()
main = do
arguments <- getArgs
case arguments of
[hostname] -> sshClient hostname
_ -> usage
| 118 |
main = do
arguments <- getArgs
case arguments of
[hostname] -> sshClient hostname
_ -> usage
| 104 | false | true | 0 | 10 | 31 | 48 | 23 | 25 | null | null |
fibsifan/pandoc
|
src/Text/Pandoc/Writers/Haddock.hs
|
gpl-2.0
|
writeHaddock :: WriterOptions -> Pandoc -> String
writeHaddock opts document =
evalState (pandocToHaddock opts{
writerWrapText = writerWrapText opts } document) def
| 184 |
writeHaddock :: WriterOptions -> Pandoc -> String
writeHaddock opts document =
evalState (pandocToHaddock opts{
writerWrapText = writerWrapText opts } document) def
| 184 |
writeHaddock opts document =
evalState (pandocToHaddock opts{
writerWrapText = writerWrapText opts } document) def
| 134 | false | true | 0 | 10 | 40 | 48 | 24 | 24 | null | null |
forsyde/forsyde-atom
|
src/ForSyDe/Atom/Utility/Tuple.hs
|
bsd-3-clause
|
f ><<<< (a1, a2, a3, a4, a5) = f a1 a2 a3 a4 a5
| 67 |
f ><<<< (a1, a2, a3, a4, a5) = f a1 a2 a3 a4 a5
| 67 |
f ><<<< (a1, a2, a3, a4, a5) = f a1 a2 a3 a4 a5
| 67 | false | false | 2 | 5 | 33 | 38 | 20 | 18 | null | null |
urbanslug/ghc
|
compiler/stranal/DmdAnal.hs
|
bsd-3-clause
|
dmdAnalTopBind :: AnalEnv
-> CoreBind
-> (AnalEnv, CoreBind)
dmdAnalTopBind sigs (NonRec id rhs)
= (extendAnalEnv TopLevel sigs id sig, NonRec id2 rhs2)
where
( _, _, _, rhs1) = dmdAnalRhs TopLevel Nothing sigs id rhs
(sig, _, id2, rhs2) = dmdAnalRhs TopLevel Nothing (nonVirgin sigs) id rhs1
-- Do two passes to improve CPR information
-- See comments with ignore_cpr_info in mk_sig_ty
-- and with extendSigsWithLam
| 497 |
dmdAnalTopBind :: AnalEnv
-> CoreBind
-> (AnalEnv, CoreBind)
dmdAnalTopBind sigs (NonRec id rhs)
= (extendAnalEnv TopLevel sigs id sig, NonRec id2 rhs2)
where
( _, _, _, rhs1) = dmdAnalRhs TopLevel Nothing sigs id rhs
(sig, _, id2, rhs2) = dmdAnalRhs TopLevel Nothing (nonVirgin sigs) id rhs1
-- Do two passes to improve CPR information
-- See comments with ignore_cpr_info in mk_sig_ty
-- and with extendSigsWithLam
| 497 |
dmdAnalTopBind sigs (NonRec id rhs)
= (extendAnalEnv TopLevel sigs id sig, NonRec id2 rhs2)
where
( _, _, _, rhs1) = dmdAnalRhs TopLevel Nothing sigs id rhs
(sig, _, id2, rhs2) = dmdAnalRhs TopLevel Nothing (nonVirgin sigs) id rhs1
-- Do two passes to improve CPR information
-- See comments with ignore_cpr_info in mk_sig_ty
-- and with extendSigsWithLam
| 406 | false | true | 0 | 10 | 146 | 133 | 70 | 63 | null | null |
3of8/heap
|
Test/Heap/Internal.hs
|
bsd-2-clause
|
listProperty :: (Ord prio) => [prio] -> Bool
listProperty xs = let
list = List.sort xs
heap = fromList (zip xs [(1 :: Int) ..])
in
list == fmap fst (List.sort (toList heap))
| 189 |
listProperty :: (Ord prio) => [prio] -> Bool
listProperty xs = let
list = List.sort xs
heap = fromList (zip xs [(1 :: Int) ..])
in
list == fmap fst (List.sort (toList heap))
| 189 |
listProperty xs = let
list = List.sort xs
heap = fromList (zip xs [(1 :: Int) ..])
in
list == fmap fst (List.sort (toList heap))
| 144 | false | true | 0 | 13 | 48 | 95 | 49 | 46 | null | null |
agentm/project-m36
|
examples/Hospital.hs
|
unlicense
|
failFastEither :: Show a => Either a b -> IO b
failFastEither (Left err) = error (show err)
| 91 |
failFastEither :: Show a => Either a b -> IO b
failFastEither (Left err) = error (show err)
| 91 |
failFastEither (Left err) = error (show err)
| 44 | false | true | 0 | 7 | 17 | 48 | 22 | 26 | null | null |
pparkkin/eta
|
compiler/ETA/Main/DynFlags.hs
|
bsd-3-clause
|
wayOptl _ WayDebug = []
| 28 |
wayOptl _ WayDebug = []
| 28 |
wayOptl _ WayDebug = []
| 28 | false | false | 1 | 6 | 9 | 15 | 6 | 9 | null | null |
hackern/ghc-7.8.3
|
libraries/containers/Data/IntSet/Base.hs
|
bsd-3-clause
|
findMax (Tip kx bm) = kx + highestBitSet bm
| 43 |
findMax (Tip kx bm) = kx + highestBitSet bm
| 43 |
findMax (Tip kx bm) = kx + highestBitSet bm
| 43 | false | false | 0 | 7 | 8 | 24 | 11 | 13 | null | null |
ezyang/ghc
|
testsuite/tests/concurrent/prog003/CASList.hs
|
bsd-3-clause
|
find :: Eq a => ListHandle a -> a -> IO Bool
find (ListHandle { headList = head }) x =
let go !prevPtr =
do prevNode <- readIORef prevPtr
let curPtr = myNext prevNode -- head/node/delnode have all next
curNode <- readIORef curPtr
case curNode of
Node {val = y, next = nextNode } ->
if (x == y)
then -- node found and alive
return True
else go curPtr -- continue
Null -> return False -- reached end of list
DelNode {next = nextNode } ->
-- atomically delete curNode by setting the next of prevNode to next of curNode
-- if this fails we simply move ahead
case prevNode of
Node {} -> do b <- atomCAS prevPtr prevNode (Node {val = val prevNode,
next = nextNode})
if b then go prevPtr
else go curPtr
Head {} -> do b <- atomCAS prevPtr prevNode (Head {next = nextNode})
if b then go prevPtr
else go curPtr
DelNode {} -> go curPtr -- if parent deleted simply move ahead
{-
correct as well, but a deleted parent deleting a child is (for certain cases) a useless operation
do atomicModifyIORef prevPtr ( \ cur -> (cur{next = nextNode},True))
go prevPtr
-}
in do startPtr <- readIORef head
go startPtr
| 1,803 |
find :: Eq a => ListHandle a -> a -> IO Bool
find (ListHandle { headList = head }) x =
let go !prevPtr =
do prevNode <- readIORef prevPtr
let curPtr = myNext prevNode -- head/node/delnode have all next
curNode <- readIORef curPtr
case curNode of
Node {val = y, next = nextNode } ->
if (x == y)
then -- node found and alive
return True
else go curPtr -- continue
Null -> return False -- reached end of list
DelNode {next = nextNode } ->
-- atomically delete curNode by setting the next of prevNode to next of curNode
-- if this fails we simply move ahead
case prevNode of
Node {} -> do b <- atomCAS prevPtr prevNode (Node {val = val prevNode,
next = nextNode})
if b then go prevPtr
else go curPtr
Head {} -> do b <- atomCAS prevPtr prevNode (Head {next = nextNode})
if b then go prevPtr
else go curPtr
DelNode {} -> go curPtr -- if parent deleted simply move ahead
{-
correct as well, but a deleted parent deleting a child is (for certain cases) a useless operation
do atomicModifyIORef prevPtr ( \ cur -> (cur{next = nextNode},True))
go prevPtr
-}
in do startPtr <- readIORef head
go startPtr
| 1,803 |
find (ListHandle { headList = head }) x =
let go !prevPtr =
do prevNode <- readIORef prevPtr
let curPtr = myNext prevNode -- head/node/delnode have all next
curNode <- readIORef curPtr
case curNode of
Node {val = y, next = nextNode } ->
if (x == y)
then -- node found and alive
return True
else go curPtr -- continue
Null -> return False -- reached end of list
DelNode {next = nextNode } ->
-- atomically delete curNode by setting the next of prevNode to next of curNode
-- if this fails we simply move ahead
case prevNode of
Node {} -> do b <- atomCAS prevPtr prevNode (Node {val = val prevNode,
next = nextNode})
if b then go prevPtr
else go curPtr
Head {} -> do b <- atomCAS prevPtr prevNode (Head {next = nextNode})
if b then go prevPtr
else go curPtr
DelNode {} -> go curPtr -- if parent deleted simply move ahead
{-
correct as well, but a deleted parent deleting a child is (for certain cases) a useless operation
do atomicModifyIORef prevPtr ( \ cur -> (cur{next = nextNode},True))
go prevPtr
-}
in do startPtr <- readIORef head
go startPtr
| 1,758 | false | true | 0 | 24 | 920 | 323 | 160 | 163 | null | null |
Blaisorblade/pts
|
src-lib/PTS/Syntax/Parser.hs
|
bsd-3-clause
|
if0 = lexem (keyword "if0")
| 30 |
if0 = lexem (keyword "if0")
| 30 |
if0 = lexem (keyword "if0")
| 30 | false | false | 0 | 7 | 7 | 15 | 7 | 8 | null | null |
puhlenbruck/hf
|
src/Interpreter.hs
|
mit
|
processCommand Read commands pc dataPointer input = let (newValue, newInput) = readByteIfStreamOpen (currentCell dataPointer) input
in (pc + 1, setCurrent dataPointer newValue, newInput, return ())
| 259 |
processCommand Read commands pc dataPointer input = let (newValue, newInput) = readByteIfStreamOpen (currentCell dataPointer) input
in (pc + 1, setCurrent dataPointer newValue, newInput, return ())
| 259 |
processCommand Read commands pc dataPointer input = let (newValue, newInput) = readByteIfStreamOpen (currentCell dataPointer) input
in (pc + 1, setCurrent dataPointer newValue, newInput, return ())
| 259 | false | false | 0 | 11 | 86 | 74 | 36 | 38 | null | null |
diekmann/useless_playground_shame
|
grumpybot/Main.hs
|
apache-2.0
|
port = 6667
| 13 |
port = 6667
| 13 |
port = 6667
| 13 | false | false | 0 | 4 | 4 | 6 | 3 | 3 | null | null |
codingiam/sandbox-hs
|
src/Ch04a.hs
|
bsd-3-clause
|
flip' :: (a -> b -> c) -> (b -> a -> c)
flip' f x y = f y x
| 59 |
flip' :: (a -> b -> c) -> (b -> a -> c)
flip' f x y = f y x
| 59 |
flip' f x y = f y x
| 19 | false | true | 0 | 8 | 20 | 49 | 25 | 24 | null | null |
TomMD/irc-core
|
driver/ClientState.hs
|
bsd-3-clause
|
focusedChan :: ClientState -> Maybe Identifier
focusedChan st =
case view clientFocus st of
ChannelInfoFocus c -> Just c
MaskListFocus _ c -> Just c
DCCFocus _ -> Nothing
ChannelFocus c
| isChannelName c (view (clientServer0.ccConnection) st) -> Just c
| otherwise -> Nothing
| 318 |
focusedChan :: ClientState -> Maybe Identifier
focusedChan st =
case view clientFocus st of
ChannelInfoFocus c -> Just c
MaskListFocus _ c -> Just c
DCCFocus _ -> Nothing
ChannelFocus c
| isChannelName c (view (clientServer0.ccConnection) st) -> Just c
| otherwise -> Nothing
| 318 |
focusedChan st =
case view clientFocus st of
ChannelInfoFocus c -> Just c
MaskListFocus _ c -> Just c
DCCFocus _ -> Nothing
ChannelFocus c
| isChannelName c (view (clientServer0.ccConnection) st) -> Just c
| otherwise -> Nothing
| 271 | false | true | 4 | 11 | 86 | 95 | 46 | 49 | null | null |
pheaver/BitVector
|
Data/BitVector/BitVector3.hs
|
bsd-3-clause
|
indexL v i = indexR v (length v - i - 1)
| 40 |
indexL v i = indexR v (length v - i - 1)
| 40 |
indexL v i = indexR v (length v - i - 1)
| 40 | false | false | 0 | 9 | 11 | 30 | 14 | 16 | null | null |
zepto-lang/zepto-js
|
src/Zepto/Types.hs
|
gpl-2.0
|
showVal (SimpleVal (Bool False)) = "#f"
| 39 |
showVal (SimpleVal (Bool False)) = "#f"
| 39 |
showVal (SimpleVal (Bool False)) = "#f"
| 39 | false | false | 0 | 8 | 5 | 22 | 10 | 12 | null | null |
MnO2/hindley-milner
|
src/HM/HigherRank.hs
|
bsd-3-clause
|
inferRho :: Term -> Tc Rho
inferRho expr
= do { ref <- newTcRef (error "inferRho: empty result")
; tcRho expr (Infer ref)
; readTcRef ref }
| 156 |
inferRho :: Term -> Tc Rho
inferRho expr
= do { ref <- newTcRef (error "inferRho: empty result")
; tcRho expr (Infer ref)
; readTcRef ref }
| 156 |
inferRho expr
= do { ref <- newTcRef (error "inferRho: empty result")
; tcRho expr (Infer ref)
; readTcRef ref }
| 129 | false | true | 0 | 11 | 43 | 66 | 30 | 36 | null | null |
Happy0/haskellscrabble
|
test/Tests/FullGameTest.hs
|
gpl-3.0
|
letterBag :: IO LetterBag
letterBag = bagFromTiles $ map toTileBag tilesAsLetters
where
tilesAsLetters = "JEARVINENVO_NILLEWBKONUIEUWEAZBDESIAPAEOOURGOCDSNIADOAACAR_RMYELTUTYTEREOSITNIRFGPHAQLHESOIITXFDMETG"
| 231 |
letterBag :: IO LetterBag
letterBag = bagFromTiles $ map toTileBag tilesAsLetters
where
tilesAsLetters = "JEARVINENVO_NILLEWBKONUIEUWEAZBDESIAPAEOOURGOCDSNIADOAACAR_RMYELTUTYTEREOSITNIRFGPHAQLHESOIITXFDMETG"
| 227 |
letterBag = bagFromTiles $ map toTileBag tilesAsLetters
where
tilesAsLetters = "JEARVINENVO_NILLEWBKONUIEUWEAZBDESIAPAEOOURGOCDSNIADOAACAR_RMYELTUTYTEREOSITNIRFGPHAQLHESOIITXFDMETG"
| 201 | false | true | 0 | 6 | 38 | 30 | 15 | 15 | null | null |
brendanhay/gogol
|
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
|
mpl-2.0
|
-- | The list of per interaction dimensions the report should include.
rptccPerInteractionDimensions :: Lens' ReportPathToConversionCriteria [SortedDimension]
rptccPerInteractionDimensions
= lens _rptccPerInteractionDimensions
(\ s a -> s{_rptccPerInteractionDimensions = a})
. _Default
. _Coerce
| 316 |
rptccPerInteractionDimensions :: Lens' ReportPathToConversionCriteria [SortedDimension]
rptccPerInteractionDimensions
= lens _rptccPerInteractionDimensions
(\ s a -> s{_rptccPerInteractionDimensions = a})
. _Default
. _Coerce
| 245 |
rptccPerInteractionDimensions
= lens _rptccPerInteractionDimensions
(\ s a -> s{_rptccPerInteractionDimensions = a})
. _Default
. _Coerce
| 157 | true | true | 0 | 11 | 51 | 51 | 28 | 23 | null | null |
urbanslug/ghc
|
compiler/ghci/ByteCodeItbls.hs
|
bsd-3-clause
|
-- Make info tables for the data decls in this module
mkITbls :: DynFlags -> [TyCon] -> IO ItblEnv
mkITbls _ [] = return emptyNameEnv
| 133 |
mkITbls :: DynFlags -> [TyCon] -> IO ItblEnv
mkITbls _ [] = return emptyNameEnv
| 79 |
mkITbls _ [] = return emptyNameEnv
| 34 | true | true | 0 | 9 | 24 | 41 | 19 | 22 | null | null |
kawamuray/ganeti
|
src/Ganeti/OpCodes.hs
|
gpl-2.0
|
opSummaryVal OpInstanceReplaceDisks { opInstanceName = s } = Just s
| 67 |
opSummaryVal OpInstanceReplaceDisks { opInstanceName = s } = Just s
| 67 |
opSummaryVal OpInstanceReplaceDisks { opInstanceName = s } = Just s
| 67 | false | false | 0 | 7 | 9 | 22 | 10 | 12 | null | null |
snoyberg/ghc
|
compiler/types/Type.hs
|
bsd-3-clause
|
seqType (TyConApp tc tys) = tc `seq` seqTypes tys
| 59 |
seqType (TyConApp tc tys) = tc `seq` seqTypes tys
| 59 |
seqType (TyConApp tc tys) = tc `seq` seqTypes tys
| 59 | false | false | 0 | 6 | 18 | 27 | 13 | 14 | null | null |
nushio3/Paraiso
|
attic/newexp/staging-rewrite.hs
|
bsd-3-clause
|
replaceAtom :: (Typeable a, Typeable b) => Expr b -> Expr b -> Expr a -> Expr a
replaceAtom i1 i2 = go
where
go :: Typeable a => Expr a -> Expr a
go (f :$ a) = go f :$ go a
go (Op1 o a) = Op1 o (go a)
go (Op2 o a b) = Op2 o (go a) (go b)
go x = (\i -> if i==i1 then i2 else i) %? x
| 311 |
replaceAtom :: (Typeable a, Typeable b) => Expr b -> Expr b -> Expr a -> Expr a
replaceAtom i1 i2 = go
where
go :: Typeable a => Expr a -> Expr a
go (f :$ a) = go f :$ go a
go (Op1 o a) = Op1 o (go a)
go (Op2 o a b) = Op2 o (go a) (go b)
go x = (\i -> if i==i1 then i2 else i) %? x
| 311 |
replaceAtom i1 i2 = go
where
go :: Typeable a => Expr a -> Expr a
go (f :$ a) = go f :$ go a
go (Op1 o a) = Op1 o (go a)
go (Op2 o a b) = Op2 o (go a) (go b)
go x = (\i -> if i==i1 then i2 else i) %? x
| 231 | false | true | 0 | 9 | 107 | 201 | 98 | 103 | null | null |
rmcmaho/Haskell_OpenGL_Examples
|
Fog/Fog_Display.hs
|
gpl-3.0
|
-- | Initializes various things for the program.
initfn :: IO ()
initfn = do
frontFace $= CW
depthFunc $= Just Lequal
ambient light0 $= lightAmbient
diffuse light0 $= lightDiffuse
position light0 $= lightPosition
lightModelAmbient $= modelAmb
lightModelTwoSide $= Enabled
lighting $= Enabled
light light0 $= Enabled
materialShininess Front $= matShin_front
materialSpecular Front $= matSpec_front
materialDiffuse Front $= matDiff_front
materialShininess Back $= matShin_back
materialSpecular Back $= matSpec_back
materialDiffuse Back $= matDiff_back
fog $= Enabled
fogMode $= Exp fogDensity
fogColor $= fog_color
clearColor $= Color4 0.8 0.8 0.8 1.0
defineList cubeList Compile $ renderTube
matrixMode $= Projection
perspective 45.0 1.0 1.0 200.0
matrixMode $= Modelview 0
where
light0 = Light 0
lightAmbient = Color4 0.1 0.1 0.1 1.0
lightDiffuse = Color4 1.0 1.0 1.0 1.0
lightPosition = Vertex4 90.0 90.0 0.0 0.0
modelAmb = Color4 0.0 0.0 0.0 1.0
matShin_front = 30.0
matSpec_front = Color4 0.0 0.0 0.0 1.0
matDiff_front = Color4 0.0 1.0 0.0 1.0
matShin_back = 50.0
matSpec_back = Color4 0.0 0.0 1.0 1.0
matDiff_back = Color4 1.0 0.0 0.0 1.0
fogDensity = 0.02
fog_color = Color4 0.8 0.8 0.8 1.0
cubeList = DisplayList 1
renderTube = renderPrimitive TriangleStrip $ mapM_ renderSection triangleList
renderSection triangleObject = do
normal $ n1 triangleObject
vertex $ v1 triangleObject
normal $ n2 triangleObject
vertex $ v2 triangleObject
normal $ n3 triangleObject
vertex $ v3 triangleObject
| 1,661 |
initfn :: IO ()
initfn = do
frontFace $= CW
depthFunc $= Just Lequal
ambient light0 $= lightAmbient
diffuse light0 $= lightDiffuse
position light0 $= lightPosition
lightModelAmbient $= modelAmb
lightModelTwoSide $= Enabled
lighting $= Enabled
light light0 $= Enabled
materialShininess Front $= matShin_front
materialSpecular Front $= matSpec_front
materialDiffuse Front $= matDiff_front
materialShininess Back $= matShin_back
materialSpecular Back $= matSpec_back
materialDiffuse Back $= matDiff_back
fog $= Enabled
fogMode $= Exp fogDensity
fogColor $= fog_color
clearColor $= Color4 0.8 0.8 0.8 1.0
defineList cubeList Compile $ renderTube
matrixMode $= Projection
perspective 45.0 1.0 1.0 200.0
matrixMode $= Modelview 0
where
light0 = Light 0
lightAmbient = Color4 0.1 0.1 0.1 1.0
lightDiffuse = Color4 1.0 1.0 1.0 1.0
lightPosition = Vertex4 90.0 90.0 0.0 0.0
modelAmb = Color4 0.0 0.0 0.0 1.0
matShin_front = 30.0
matSpec_front = Color4 0.0 0.0 0.0 1.0
matDiff_front = Color4 0.0 1.0 0.0 1.0
matShin_back = 50.0
matSpec_back = Color4 0.0 0.0 1.0 1.0
matDiff_back = Color4 1.0 0.0 0.0 1.0
fogDensity = 0.02
fog_color = Color4 0.8 0.8 0.8 1.0
cubeList = DisplayList 1
renderTube = renderPrimitive TriangleStrip $ mapM_ renderSection triangleList
renderSection triangleObject = do
normal $ n1 triangleObject
vertex $ v1 triangleObject
normal $ n2 triangleObject
vertex $ v2 triangleObject
normal $ n3 triangleObject
vertex $ v3 triangleObject
| 1,612 |
initfn = do
frontFace $= CW
depthFunc $= Just Lequal
ambient light0 $= lightAmbient
diffuse light0 $= lightDiffuse
position light0 $= lightPosition
lightModelAmbient $= modelAmb
lightModelTwoSide $= Enabled
lighting $= Enabled
light light0 $= Enabled
materialShininess Front $= matShin_front
materialSpecular Front $= matSpec_front
materialDiffuse Front $= matDiff_front
materialShininess Back $= matShin_back
materialSpecular Back $= matSpec_back
materialDiffuse Back $= matDiff_back
fog $= Enabled
fogMode $= Exp fogDensity
fogColor $= fog_color
clearColor $= Color4 0.8 0.8 0.8 1.0
defineList cubeList Compile $ renderTube
matrixMode $= Projection
perspective 45.0 1.0 1.0 200.0
matrixMode $= Modelview 0
where
light0 = Light 0
lightAmbient = Color4 0.1 0.1 0.1 1.0
lightDiffuse = Color4 1.0 1.0 1.0 1.0
lightPosition = Vertex4 90.0 90.0 0.0 0.0
modelAmb = Color4 0.0 0.0 0.0 1.0
matShin_front = 30.0
matSpec_front = Color4 0.0 0.0 0.0 1.0
matDiff_front = Color4 0.0 1.0 0.0 1.0
matShin_back = 50.0
matSpec_back = Color4 0.0 0.0 1.0 1.0
matDiff_back = Color4 1.0 0.0 0.0 1.0
fogDensity = 0.02
fog_color = Color4 0.8 0.8 0.8 1.0
cubeList = DisplayList 1
renderTube = renderPrimitive TriangleStrip $ mapM_ renderSection triangleList
renderSection triangleObject = do
normal $ n1 triangleObject
vertex $ v1 triangleObject
normal $ n2 triangleObject
vertex $ v2 triangleObject
normal $ n3 triangleObject
vertex $ v3 triangleObject
| 1,596 | true | true | 15 | 9 | 388 | 543 | 217 | 326 | null | null |
olsner/ghc
|
compiler/prelude/PrelNames.hs
|
bsd-3-clause
|
aRROW = mkBaseModule (fsLit "Control.Arrow")
| 54 |
aRROW = mkBaseModule (fsLit "Control.Arrow")
| 54 |
aRROW = mkBaseModule (fsLit "Control.Arrow")
| 54 | false | false | 0 | 7 | 14 | 15 | 7 | 8 | null | null |
haskell-opengl/OpenGLRaw
|
src/Graphics/GL/Functions/F15.hs
|
bsd-3-clause
|
ptr_glIsBuffer :: FunPtr (GLuint -> IO GLboolean)
ptr_glIsBuffer = unsafePerformIO $ getCommand "glIsBuffer"
| 108 |
ptr_glIsBuffer :: FunPtr (GLuint -> IO GLboolean)
ptr_glIsBuffer = unsafePerformIO $ getCommand "glIsBuffer"
| 108 |
ptr_glIsBuffer = unsafePerformIO $ getCommand "glIsBuffer"
| 58 | false | true | 4 | 7 | 12 | 34 | 15 | 19 | null | null |
nevrenato/Hets_Fork
|
CspCASL/Morphism.hs
|
gpl-2.0
|
{- | Apply a signature morphism to a CASL FORMULA (for CspCASL only, i.e. a CASL
FORMULA that appears in CspCASL). -}
mapCASLFormula :: CspCASLMorphism -> FORMULA () -> FORMULA ()
mapCASLFormula =
{- The error here is not used. It is a function to map over the morphism,
CspCASL does not use this functionality. -}
CASL_MapSen.mapSen (error "CspCASL.Morphism.mapCASLFormula")
. cspCASLMorphism2caslMorphism
| 424 |
mapCASLFormula :: CspCASLMorphism -> FORMULA () -> FORMULA ()
mapCASLFormula =
{- The error here is not used. It is a function to map over the morphism,
CspCASL does not use this functionality. -}
CASL_MapSen.mapSen (error "CspCASL.Morphism.mapCASLFormula")
. cspCASLMorphism2caslMorphism
| 306 |
mapCASLFormula =
{- The error here is not used. It is a function to map over the morphism,
CspCASL does not use this functionality. -}
CASL_MapSen.mapSen (error "CspCASL.Morphism.mapCASLFormula")
. cspCASLMorphism2caslMorphism
| 244 | true | true | 1 | 9 | 78 | 53 | 24 | 29 | null | null |
uwap/Idris-dev
|
src/Idris/AbsSyntaxTree.hs
|
bsd-3-clause
|
inferTy = sMN 0 "__Infer"
| 27 |
inferTy = sMN 0 "__Infer"
| 27 |
inferTy = sMN 0 "__Infer"
| 27 | false | false | 0 | 5 | 6 | 11 | 5 | 6 | null | null |
pontarius/pontarius-service
|
source/Persist.hs
|
agpl-3.0
|
setCredentials :: MonadIO m => Text -> Xmpp.Username -> Xmpp.Password -> PSM m ()
setCredentials hostName username password = do
runDB $ do
deleteWhere ([] :: [Filter HostCredentials])
now <- liftIO getCurrentTime
_ <- insert $ HostCredentials hostName username password now
return ()
| 320 |
setCredentials :: MonadIO m => Text -> Xmpp.Username -> Xmpp.Password -> PSM m ()
setCredentials hostName username password = do
runDB $ do
deleteWhere ([] :: [Filter HostCredentials])
now <- liftIO getCurrentTime
_ <- insert $ HostCredentials hostName username password now
return ()
| 320 |
setCredentials hostName username password = do
runDB $ do
deleteWhere ([] :: [Filter HostCredentials])
now <- liftIO getCurrentTime
_ <- insert $ HostCredentials hostName username password now
return ()
| 238 | false | true | 0 | 13 | 78 | 113 | 52 | 61 | null | null |
da-x/Algorithm-W-Step-By-Step
|
Lamdu/Expr/TypeVars.hs
|
gpl-3.0
|
difference :: TypeVars -> TypeVars -> TypeVars
difference (TypeVars t0 r0 s0) (TypeVars t1 r1 s1) =
TypeVars (Set.difference t0 t1) (Set.difference r0 r1) (Set.difference s0 s1)
| 181 |
difference :: TypeVars -> TypeVars -> TypeVars
difference (TypeVars t0 r0 s0) (TypeVars t1 r1 s1) =
TypeVars (Set.difference t0 t1) (Set.difference r0 r1) (Set.difference s0 s1)
| 181 |
difference (TypeVars t0 r0 s0) (TypeVars t1 r1 s1) =
TypeVars (Set.difference t0 t1) (Set.difference r0 r1) (Set.difference s0 s1)
| 134 | false | true | 0 | 10 | 30 | 87 | 41 | 46 | null | null |
fmapfmapfmap/amazonka
|
amazonka-redshift/gen/Network/AWS/Redshift/ModifyCluster.hs
|
mpl-2.0
|
-- | The unique identifier of the cluster to be modified.
--
-- Example: 'examplecluster'
mcClusterIdentifier :: Lens' ModifyCluster Text
mcClusterIdentifier = lens _mcClusterIdentifier (\ s a -> s{_mcClusterIdentifier = a})
| 224 |
mcClusterIdentifier :: Lens' ModifyCluster Text
mcClusterIdentifier = lens _mcClusterIdentifier (\ s a -> s{_mcClusterIdentifier = a})
| 134 |
mcClusterIdentifier = lens _mcClusterIdentifier (\ s a -> s{_mcClusterIdentifier = a})
| 86 | true | true | 0 | 9 | 30 | 42 | 24 | 18 | null | null |
leshchevds/ganeti
|
src/Ganeti/Metad/WebServer.hs
|
bsd-2-clause
|
lookupInstanceParams :: MonadError String m => String -> Map String b -> m b
lookupInstanceParams inst params =
case Map.lookup inst params of
Nothing -> throwError $ "Could not get instance params for " ++ show inst
Just x -> return x
-- | The 404 "not found" error.
| 278 |
lookupInstanceParams :: MonadError String m => String -> Map String b -> m b
lookupInstanceParams inst params =
case Map.lookup inst params of
Nothing -> throwError $ "Could not get instance params for " ++ show inst
Just x -> return x
-- | The 404 "not found" error.
| 278 |
lookupInstanceParams inst params =
case Map.lookup inst params of
Nothing -> throwError $ "Could not get instance params for " ++ show inst
Just x -> return x
-- | The 404 "not found" error.
| 201 | false | true | 3 | 8 | 59 | 83 | 38 | 45 | null | null |
da-x/ghc
|
compiler/hsSyn/HsExpr.hs
|
bsd-3-clause
|
pprHsBracket (TExpBr e) = thTyBrackets (ppr e)
| 47 |
pprHsBracket (TExpBr e) = thTyBrackets (ppr e)
| 47 |
pprHsBracket (TExpBr e) = thTyBrackets (ppr e)
| 47 | false | false | 0 | 7 | 7 | 25 | 11 | 14 | null | null |
quivade/screwdriver
|
src/Language/FIRRTL/Parser/Statement.hs
|
gpl-3.0
|
memReader:: RTLParser ()
memReader = do
mst <- gets memoryState
t <- memParser "reader" (token identifier)
modify (\s -> s { memoryState = mst { _memReaders = t : _memReaders mst }})
| 188 |
memReader:: RTLParser ()
memReader = do
mst <- gets memoryState
t <- memParser "reader" (token identifier)
modify (\s -> s { memoryState = mst { _memReaders = t : _memReaders mst }})
| 188 |
memReader = do
mst <- gets memoryState
t <- memParser "reader" (token identifier)
modify (\s -> s { memoryState = mst { _memReaders = t : _memReaders mst }})
| 163 | false | true | 0 | 15 | 37 | 81 | 40 | 41 | null | null |
JamesSullivan1/Mpp
|
src/MppSemanticAnalyzer.hs
|
mit
|
wf_expr (M_bval _ _) _ = Ok True
| 32 |
wf_expr (M_bval _ _) _ = Ok True
| 32 |
wf_expr (M_bval _ _) _ = Ok True
| 32 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
kantp/ice
|
Ice/Types.hs
|
gpl-3.0
|
-- | Initialise the logger
initLog :: Config -> IO ()
initLog c = do
h <- fileHandler (logFile c) INFO >>= \lh -> return $
setFormatter lh (simpleLogFormatter "[$time] $msg")
updateGlobalLogger rootLoggerName removeHandler
updateGlobalLogger "ice" (addHandler h)
updateGlobalLogger "ice" (setLevel INFO)
-- | Print information to the logfile
| 358 |
initLog :: Config -> IO ()
initLog c = do
h <- fileHandler (logFile c) INFO >>= \lh -> return $
setFormatter lh (simpleLogFormatter "[$time] $msg")
updateGlobalLogger rootLoggerName removeHandler
updateGlobalLogger "ice" (addHandler h)
updateGlobalLogger "ice" (setLevel INFO)
-- | Print information to the logfile
| 331 |
initLog c = do
h <- fileHandler (logFile c) INFO >>= \lh -> return $
setFormatter lh (simpleLogFormatter "[$time] $msg")
updateGlobalLogger rootLoggerName removeHandler
updateGlobalLogger "ice" (addHandler h)
updateGlobalLogger "ice" (setLevel INFO)
-- | Print information to the logfile
| 304 | true | true | 0 | 14 | 65 | 108 | 49 | 59 | null | null |
nevrenato/Hets_Fork
|
CSL/Reduce_Interface.hs
|
gpl-2.0
|
casDeclareEquation :: Session a => a -> CMD -> IO ()
casDeclareEquation sess (Ass c def) =
do
let e1 = exportExp $ opDeclToOp c
e2 = exportExp def
putStrLn $ e1 ++ ":=" ++ e2
hPutStrLn (inp sess) $ e1 ++ ":=" ++ e2 ++ ";"
res <- getNextResultOutput (outp sess)
putStrLn $ "Declaration Result: " ++ res
return ()
| 364 |
casDeclareEquation :: Session a => a -> CMD -> IO ()
casDeclareEquation sess (Ass c def) =
do
let e1 = exportExp $ opDeclToOp c
e2 = exportExp def
putStrLn $ e1 ++ ":=" ++ e2
hPutStrLn (inp sess) $ e1 ++ ":=" ++ e2 ++ ";"
res <- getNextResultOutput (outp sess)
putStrLn $ "Declaration Result: " ++ res
return ()
| 364 |
casDeclareEquation sess (Ass c def) =
do
let e1 = exportExp $ opDeclToOp c
e2 = exportExp def
putStrLn $ e1 ++ ":=" ++ e2
hPutStrLn (inp sess) $ e1 ++ ":=" ++ e2 ++ ";"
res <- getNextResultOutput (outp sess)
putStrLn $ "Declaration Result: " ++ res
return ()
| 311 | false | true | 0 | 13 | 113 | 151 | 68 | 83 | null | null |
erijonhson/ufcg-plp-e-aplicacoes
|
praticando_programacao_funcional_parte_2/palavrasRepetidas.hs
|
apache-2.0
|
retornaTuplas (head:body) = do
let quant = (quantidade head body) + 1
let lista = removeElemento head body
[(head, quant)] ++ retornaTuplas lista
| 157 |
retornaTuplas (head:body) = do
let quant = (quantidade head body) + 1
let lista = removeElemento head body
[(head, quant)] ++ retornaTuplas lista
| 157 |
retornaTuplas (head:body) = do
let quant = (quantidade head body) + 1
let lista = removeElemento head body
[(head, quant)] ++ retornaTuplas lista
| 157 | false | false | 0 | 12 | 34 | 70 | 34 | 36 | null | null |
nikki-and-the-robots/nikki
|
src/Editor/Scene.hs
|
lgpl-3.0
|
-- | looks, if there is an object under the cursor (and therefore selected)
-- in the selected layer
searchSelectedObject :: EditorScene Sort_ -> Maybe (GroundsIndex, Index)
searchSelectedObject s@EditorScene{selectedLayer_} =
let indices = I.findIndices isSelected $
s ^. editorObjects ^. layerA selectedLayer_ ^. content
isSelected o = lowerCorner o == cursor s
lowerCorner o = o ^. editorPosition
in case indices of
[] -> Nothing
ll -> Just $ (selectedLayer_, last ll)
-- * normalizers
| 541 |
searchSelectedObject :: EditorScene Sort_ -> Maybe (GroundsIndex, Index)
searchSelectedObject s@EditorScene{selectedLayer_} =
let indices = I.findIndices isSelected $
s ^. editorObjects ^. layerA selectedLayer_ ^. content
isSelected o = lowerCorner o == cursor s
lowerCorner o = o ^. editorPosition
in case indices of
[] -> Nothing
ll -> Just $ (selectedLayer_, last ll)
-- * normalizers
| 440 |
searchSelectedObject s@EditorScene{selectedLayer_} =
let indices = I.findIndices isSelected $
s ^. editorObjects ^. layerA selectedLayer_ ^. content
isSelected o = lowerCorner o == cursor s
lowerCorner o = o ^. editorPosition
in case indices of
[] -> Nothing
ll -> Just $ (selectedLayer_, last ll)
-- * normalizers
| 367 | true | true | 6 | 14 | 127 | 138 | 69 | 69 | null | null |
k-bx/waiwstest
|
Main.hs
|
mit
|
info :: String -> IO ()
info m = putStrLn ("[INFO] " ++ m)
| 58 |
info :: String -> IO ()
info m = putStrLn ("[INFO] " ++ m)
| 58 |
info m = putStrLn ("[INFO] " ++ m)
| 34 | false | true | 0 | 7 | 13 | 33 | 16 | 17 | null | null |
nc6/cabin
|
main.hs
|
bsd-3-clause
|
listOpts :: Parser ListOpts
listOpts = ListOpts
<$> switch ( long "active"
<> short 'a'
<> help "Show only active cabins."
)
| 169 |
listOpts :: Parser ListOpts
listOpts = ListOpts
<$> switch ( long "active"
<> short 'a'
<> help "Show only active cabins."
)
| 169 |
listOpts = ListOpts
<$> switch ( long "active"
<> short 'a'
<> help "Show only active cabins."
)
| 141 | false | true | 3 | 9 | 66 | 45 | 19 | 26 | null | null |
ssoudan/hsChess
|
src/GUI.hs
|
apache-2.0
|
helpPlayer :: SuperState -> Maybe SuperState
helpPlayer state = if isCurrentPlayerMate state
then Nothing
else let state' = AB.doMove state
in trace (show state') $ Just state'
| 242 |
helpPlayer :: SuperState -> Maybe SuperState
helpPlayer state = if isCurrentPlayerMate state
then Nothing
else let state' = AB.doMove state
in trace (show state') $ Just state'
| 242 |
helpPlayer state = if isCurrentPlayerMate state
then Nothing
else let state' = AB.doMove state
in trace (show state') $ Just state'
| 197 | false | true | 0 | 11 | 92 | 64 | 30 | 34 | null | null |
mlite/hLLVM
|
src/Llvm/Pass/DataUsage.hs
|
bsd-3-clause
|
applyToEither fl fr (Right x) du = fr x du
| 42 |
applyToEither fl fr (Right x) du = fr x du
| 42 |
applyToEither fl fr (Right x) du = fr x du
| 42 | false | false | 0 | 7 | 9 | 26 | 12 | 14 | null | null |
purefn/hipbot
|
src/HipBot/AbsoluteURI.hs
|
bsd-3-clause
|
parseAbsoluteURI :: String -> Maybe AbsoluteURI
parseAbsoluteURI = fmap AbsoluteURI . URI.parseAbsoluteURI
| 106 |
parseAbsoluteURI :: String -> Maybe AbsoluteURI
parseAbsoluteURI = fmap AbsoluteURI . URI.parseAbsoluteURI
| 106 |
parseAbsoluteURI = fmap AbsoluteURI . URI.parseAbsoluteURI
| 58 | false | true | 0 | 6 | 11 | 27 | 13 | 14 | null | null |
beni55/haste-compiler
|
libraries/ghc-7.8/base/Foreign/C/String.hs
|
bsd-3-clause
|
newCAString = newArray0 nUL . charsToCChars
| 44 |
newCAString = newArray0 nUL . charsToCChars
| 44 |
newCAString = newArray0 nUL . charsToCChars
| 44 | false | false | 2 | 5 | 6 | 18 | 6 | 12 | null | null |
mariusae/bert
|
Data/BERT/Term.hs
|
bsd-3-clause
|
-- All other terms are composite:
putTerm t = putTerm . compose $ t
| 67 |
putTerm t = putTerm . compose $ t
| 33 |
putTerm t = putTerm . compose $ t
| 33 | true | false | 0 | 6 | 13 | 18 | 9 | 9 | null | null |
xmonad/xmonad-contrib
|
XMonad/Prompt.hs
|
bsd-3-clause
|
bufferOne :: String -> String -> (Bool,Bool)
bufferOne xs x = (null xs && null x,True)
| 86 |
bufferOne :: String -> String -> (Bool,Bool)
bufferOne xs x = (null xs && null x,True)
| 86 |
bufferOne xs x = (null xs && null x,True)
| 41 | false | true | 0 | 7 | 15 | 46 | 24 | 22 | null | null |
johan--/postgrest
|
src/PostgREST/Auth.hs
|
mit
|
resetUserId :: H.Tx P.Postgres s ()
resetUserId = H.unitEx [H.stmt|reset user_vars.user_id|]
| 92 |
resetUserId :: H.Tx P.Postgres s ()
resetUserId = H.unitEx [H.stmt|reset user_vars.user_id|]
| 92 |
resetUserId = H.unitEx [H.stmt|reset user_vars.user_id|]
| 56 | false | true | 0 | 6 | 10 | 35 | 19 | 16 | null | null |
thomas-oo/projectEulerHaskell
|
src/Problem9.hs
|
bsd-3-clause
|
--Basically a brute force attempt. For larger numbers, say where a+b+c=10000, this will take a long long time. At 1000 though, it takes a minute or so
triplet n = [(x,y,z) | x <- [1..(n-1)], y <- [1..(n-x)], z <- [1..(n-x-y)], x+y+z == n, z>y, z>x, y>x, x^2+y^2==z^2]
| 267 |
triplet n = [(x,y,z) | x <- [1..(n-1)], y <- [1..(n-x)], z <- [1..(n-x-y)], x+y+z == n, z>y, z>x, y>x, x^2+y^2==z^2]
| 116 |
triplet n = [(x,y,z) | x <- [1..(n-1)], y <- [1..(n-x)], z <- [1..(n-x-y)], x+y+z == n, z>y, z>x, y>x, x^2+y^2==z^2]
| 116 | true | false | 1 | 12 | 47 | 154 | 80 | 74 | null | null |
mcmaniac/ghc
|
compiler/cmm/CmmSpillReload.hs
|
bsd-3-clause
|
dualLiveLattice :: DataflowLattice DualLive
dualLiveLattice = DataflowLattice "variables live in registers and on stack" empty add
where empty = DualLive emptyRegSet emptyRegSet
add _ (OldFact old) (NewFact new) = (changeIf $ change1 || change2, DualLive stack regs)
where (change1, stack) = add1 (on_stack old) (on_stack new)
(change2, regs) = add1 (in_regs old) (in_regs new)
add1 old new = if sizeUniqSet join > sizeUniqSet old then (True, join) else (False, old)
where join = unionUniqSets old new
| 569 |
dualLiveLattice :: DataflowLattice DualLive
dualLiveLattice = DataflowLattice "variables live in registers and on stack" empty add
where empty = DualLive emptyRegSet emptyRegSet
add _ (OldFact old) (NewFact new) = (changeIf $ change1 || change2, DualLive stack regs)
where (change1, stack) = add1 (on_stack old) (on_stack new)
(change2, regs) = add1 (in_regs old) (in_regs new)
add1 old new = if sizeUniqSet join > sizeUniqSet old then (True, join) else (False, old)
where join = unionUniqSets old new
| 569 |
dualLiveLattice = DataflowLattice "variables live in registers and on stack" empty add
where empty = DualLive emptyRegSet emptyRegSet
add _ (OldFact old) (NewFact new) = (changeIf $ change1 || change2, DualLive stack regs)
where (change1, stack) = add1 (on_stack old) (on_stack new)
(change2, regs) = add1 (in_regs old) (in_regs new)
add1 old new = if sizeUniqSet join > sizeUniqSet old then (True, join) else (False, old)
where join = unionUniqSets old new
| 525 | false | true | 3 | 7 | 143 | 206 | 98 | 108 | null | null |
bhamrick/fixalgs
|
Examples/RangeReverse/Main.hs
|
bsd-3-clause
|
randomIntervalIO :: Int -> IO (Int, Int)
randomIntervalIO size = do
i <- randomRIO (0, size)
j <- randomRIO (0, size)
if i < j
then return (i, j)
else return (j, i)
| 192 |
randomIntervalIO :: Int -> IO (Int, Int)
randomIntervalIO size = do
i <- randomRIO (0, size)
j <- randomRIO (0, size)
if i < j
then return (i, j)
else return (j, i)
| 192 |
randomIntervalIO size = do
i <- randomRIO (0, size)
j <- randomRIO (0, size)
if i < j
then return (i, j)
else return (j, i)
| 151 | false | true | 0 | 9 | 60 | 92 | 48 | 44 | null | null |
j-mueller/virtual-hom
|
src/VirtualHom/Html.hs
|
bsd-3-clause
|
fieldset :: Elem cb ()
fieldset = elm "fieldset"
| 48 |
fieldset :: Elem cb ()
fieldset = elm "fieldset"
| 48 |
fieldset = elm "fieldset"
| 25 | false | true | 0 | 6 | 8 | 21 | 10 | 11 | null | null |
acowley/pcd-loader
|
src/PCD/Internal/StorableFieldType.hs
|
bsd-3-clause
|
parseBinaryField U 2 = peekStep TUshort
| 39 |
parseBinaryField U 2 = peekStep TUshort
| 39 |
parseBinaryField U 2 = peekStep TUshort
| 39 | false | false | 1 | 5 | 5 | 19 | 6 | 13 | null | null |
DaMSL/K3
|
src/Language/K3/Analysis/Provenance/Inference.hs
|
apache-2.0
|
inferDataAnnotationDeclProv d = return d
| 40 |
inferDataAnnotationDeclProv d = return d
| 40 |
inferDataAnnotationDeclProv d = return d
| 40 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
hvr/text
|
tests/Tests/Properties.hs
|
bsd-2-clause
|
t_use_from t = monadicIO $ assert . (==t) =<< run (useAsPtr t fromPtr)
| 70 |
t_use_from t = monadicIO $ assert . (==t) =<< run (useAsPtr t fromPtr)
| 70 |
t_use_from t = monadicIO $ assert . (==t) =<< run (useAsPtr t fromPtr)
| 70 | false | false | 0 | 8 | 12 | 36 | 18 | 18 | null | null |
pawel-n/fingertree-tf
|
Data/FingerTree.hs
|
bsd-3-clause
|
addDigits2 m1 (Three a b c) d e (Two f g) m2 =
appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2
| 106 |
addDigits2 m1 (Three a b c) d e (Two f g) m2 =
appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2
| 106 |
addDigits2 m1 (Three a b c) d e (Two f g) m2 =
appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2
| 106 | false | false | 0 | 7 | 29 | 74 | 36 | 38 | null | null |
bigsleep/Wf
|
src/Wf/Web/Routing.hs
|
mit
|
routePatternToString :: RoutePattern -> String
routePatternToString (RoutePath s) = B.unpack s
| 94 |
routePatternToString :: RoutePattern -> String
routePatternToString (RoutePath s) = B.unpack s
| 94 |
routePatternToString (RoutePath s) = B.unpack s
| 47 | false | true | 0 | 7 | 10 | 29 | 14 | 15 | null | null |
mhwombat/exp-som-comparison
|
src/Image.hs
|
gpl-3.0
|
pixelArray :: Image -> [[Word8]]
pixelArray (Image w _ ps) = chunksOf w ps
| 74 |
pixelArray :: Image -> [[Word8]]
pixelArray (Image w _ ps) = chunksOf w ps
| 74 |
pixelArray (Image w _ ps) = chunksOf w ps
| 41 | false | true | 0 | 7 | 13 | 39 | 20 | 19 | null | null |
dinkelk/redo
|
src/Database.hs
|
mit
|
clearRedoTempDirectory :: IO ()
clearRedoTempDirectory = safeRemoveDirectoryRecursive =<< redoTempDirectory
| 107 |
clearRedoTempDirectory :: IO ()
clearRedoTempDirectory = safeRemoveDirectoryRecursive =<< redoTempDirectory
| 107 |
clearRedoTempDirectory = safeRemoveDirectoryRecursive =<< redoTempDirectory
| 75 | false | true | 0 | 6 | 8 | 20 | 10 | 10 | null | null |
vektordev/GP
|
src/GRPMath.hs
|
gpl-2.0
|
variance :: (Fractional a, Foldable t) => t a -> a
variance lst =
let mn = mean lst
in foldl (\buff val -> buff + (val - mn) * (val - mn) ) 0 lst / fromIntegral (length lst - 1)
| 181 |
variance :: (Fractional a, Foldable t) => t a -> a
variance lst =
let mn = mean lst
in foldl (\buff val -> buff + (val - mn) * (val - mn) ) 0 lst / fromIntegral (length lst - 1)
| 181 |
variance lst =
let mn = mean lst
in foldl (\buff val -> buff + (val - mn) * (val - mn) ) 0 lst / fromIntegral (length lst - 1)
| 130 | false | true | 0 | 14 | 45 | 106 | 53 | 53 | null | null |
ghcjs/jsaddle-dom
|
src/JSDOM/Generated/PerformanceObserverCallback.hs
|
mit
|
-- | <https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserverCallback Mozilla PerformanceObserverCallback documentation>
newPerformanceObserverCallbackAsync ::
(MonadDOM m) =>
(PerformanceObserverEntryList ->
PerformanceObserver -> JSM ())
-> m PerformanceObserverCallback
newPerformanceObserverCallbackAsync callback
= liftDOM
(PerformanceObserverCallback . Callback <$>
asyncFunction
(\ _ _ [entries, observer] ->
fromJSValUnchecked observer >>=
\ observer' ->
fromJSValUnchecked entries >>= \ entries' -> callback entries'
observer'))
| 802 |
newPerformanceObserverCallbackAsync ::
(MonadDOM m) =>
(PerformanceObserverEntryList ->
PerformanceObserver -> JSM ())
-> m PerformanceObserverCallback
newPerformanceObserverCallbackAsync callback
= liftDOM
(PerformanceObserverCallback . Callback <$>
asyncFunction
(\ _ _ [entries, observer] ->
fromJSValUnchecked observer >>=
\ observer' ->
fromJSValUnchecked entries >>= \ entries' -> callback entries'
observer'))
| 667 |
newPerformanceObserverCallbackAsync callback
= liftDOM
(PerformanceObserverCallback . Callback <$>
asyncFunction
(\ _ _ [entries, observer] ->
fromJSValUnchecked observer >>=
\ observer' ->
fromJSValUnchecked entries >>= \ entries' -> callback entries'
observer'))
| 360 | true | true | 0 | 15 | 301 | 111 | 57 | 54 | null | null |
ribag/ganeti-experiments
|
src/Ganeti/Locking/Waiting.hs
|
gpl-2.0
|
revisitRequests :: (Lock a, Ord b, Ord c)
=> S.Set b -- ^ the owners where the requests keyed by them
-- already have been revisited
-> S.Set b -- ^ the owners where requests keyed by them need
-- to be revisited
-> LockWaiting a b c -- ^ state before revisiting
-> (S.Set b, LockWaiting a b c) -- ^ owners visited and state
-- after revisiting
revisitRequests notify todo state =
let getRequests (pending, reqs) owner =
(M.delete owner pending
, fromMaybe S.empty (M.lookup owner pending) `S.union` reqs)
(pending', requests) = S.foldl getRequests (lwPending state, S.empty) todo
revisitedOwners = S.map (\(_, o, _) -> o) requests
pendingOwners' = S.foldl (flip M.delete) (lwPendingOwners state)
revisitedOwners
state' = state { lwPending = pending', lwPendingOwners = pendingOwners' }
(state'', notify') = S.foldl tryFulfillRequest (state', notify) requests
done = notify `S.union` todo
newTodo = notify' S.\\ done
in if S.null todo
then (notify, state)
else revisitRequests done newTodo state''
| 1,270 |
revisitRequests :: (Lock a, Ord b, Ord c)
=> S.Set b -- ^ the owners where the requests keyed by them
-- already have been revisited
-> S.Set b -- ^ the owners where requests keyed by them need
-- to be revisited
-> LockWaiting a b c -- ^ state before revisiting
-> (S.Set b, LockWaiting a b c)
revisitRequests notify todo state =
let getRequests (pending, reqs) owner =
(M.delete owner pending
, fromMaybe S.empty (M.lookup owner pending) `S.union` reqs)
(pending', requests) = S.foldl getRequests (lwPending state, S.empty) todo
revisitedOwners = S.map (\(_, o, _) -> o) requests
pendingOwners' = S.foldl (flip M.delete) (lwPendingOwners state)
revisitedOwners
state' = state { lwPending = pending', lwPendingOwners = pendingOwners' }
(state'', notify') = S.foldl tryFulfillRequest (state', notify) requests
done = notify `S.union` todo
newTodo = notify' S.\\ done
in if S.null todo
then (notify, state)
else revisitRequests done newTodo state''
| 1,172 |
revisitRequests notify todo state =
let getRequests (pending, reqs) owner =
(M.delete owner pending
, fromMaybe S.empty (M.lookup owner pending) `S.union` reqs)
(pending', requests) = S.foldl getRequests (lwPending state, S.empty) todo
revisitedOwners = S.map (\(_, o, _) -> o) requests
pendingOwners' = S.foldl (flip M.delete) (lwPendingOwners state)
revisitedOwners
state' = state { lwPending = pending', lwPendingOwners = pendingOwners' }
(state'', notify') = S.foldl tryFulfillRequest (state', notify) requests
done = notify `S.union` todo
newTodo = notify' S.\\ done
in if S.null todo
then (notify, state)
else revisitRequests done newTodo state''
| 759 | true | true | 0 | 14 | 430 | 343 | 184 | 159 | null | null |
meditans/lambdaEval
|
src/Lib.hs
|
bsd-3-clause
|
nReductions :: Term -> Int
nReductions = length . reductions
| 60 |
nReductions :: Term -> Int
nReductions = length . reductions
| 60 |
nReductions = length . reductions
| 33 | false | true | 0 | 5 | 9 | 19 | 10 | 9 | null | null |
benmos/reflex-dropzone
|
src/JavaScript/Dropzone/Reflex.hs
|
bsd-3-clause
|
------------------------------------------------------------------------
-- Specific Dropzone Events
-- File Events
-- | Register for "addedfile" events on the Dropzone
dropzoneAddedFile :: forall t m . MonadWidget t m => Dropzone -> m (Event t File)
dropzoneAddedFile = dropzoneEventForFile "addedfile"
| 305 |
dropzoneAddedFile :: forall t m . MonadWidget t m => Dropzone -> m (Event t File)
dropzoneAddedFile = dropzoneEventForFile "addedfile"
| 134 |
dropzoneAddedFile = dropzoneEventForFile "addedfile"
| 52 | true | true | 0 | 10 | 38 | 48 | 26 | 22 | null | null |
GaloisInc/saw-script
|
src/SAWScript/Prover/MRSolver/Monad.hs
|
bsd-3-clause
|
-- | Get the current value of 'mriSMTTimeout'
mrSMTTimeout :: MRM (Maybe Integer)
mrSMTTimeout = mriSMTTimeout <$> ask
| 118 |
mrSMTTimeout :: MRM (Maybe Integer)
mrSMTTimeout = mriSMTTimeout <$> ask
| 72 |
mrSMTTimeout = mriSMTTimeout <$> ask
| 36 | true | true | 0 | 7 | 17 | 25 | 13 | 12 | null | null |
sw17ch/gator
|
src/Language/Gator/Ops/Input.hs
|
bsd-3-clause
|
nextInput :: (MonadState Logic m) => m Name
nextInput = do
idx <- nextIdxOf inputID
return $ "in" ++ (show idx)
| 119 |
nextInput :: (MonadState Logic m) => m Name
nextInput = do
idx <- nextIdxOf inputID
return $ "in" ++ (show idx)
| 119 |
nextInput = do
idx <- nextIdxOf inputID
return $ "in" ++ (show idx)
| 75 | false | true | 0 | 10 | 28 | 58 | 26 | 32 | null | null |
travitch/llvm-analysis
|
src/LLVM/Analysis/IFDS.hs
|
bsd-3-clause
|
getICFG :: IFDSM a domType ICFGGraphType
getICFG = do
g <- gets icfg
return (icfgGraph g)
-- | The key function that builds up the PathEdge set using a worklist
-- algorithm. It handles the three cases outlined in the main
-- algorithm: adding interprocedural edges for call/invoke nodes,
-- adding interprocedural (and summary) edges for return nodes, and
-- adding intraprocedural edges for all other instructions.
| 423 |
getICFG :: IFDSM a domType ICFGGraphType
getICFG = do
g <- gets icfg
return (icfgGraph g)
-- | The key function that builds up the PathEdge set using a worklist
-- algorithm. It handles the three cases outlined in the main
-- algorithm: adding interprocedural edges for call/invoke nodes,
-- adding interprocedural (and summary) edges for return nodes, and
-- adding intraprocedural edges for all other instructions.
| 423 |
getICFG = do
g <- gets icfg
return (icfgGraph g)
-- | The key function that builds up the PathEdge set using a worklist
-- algorithm. It handles the three cases outlined in the main
-- algorithm: adding interprocedural edges for call/invoke nodes,
-- adding interprocedural (and summary) edges for return nodes, and
-- adding intraprocedural edges for all other instructions.
| 382 | false | true | 0 | 10 | 73 | 51 | 24 | 27 | null | null |
hanshoglund/fluent
|
src/Sound/Fluent.hs
|
bsd-3-clause
|
startAt :: Time -> Span -> Span
startAt t s = delay (t - onset s) s
| 67 |
startAt :: Time -> Span -> Span
startAt t s = delay (t - onset s) s
| 67 |
startAt t s = delay (t - onset s) s
| 35 | false | true | 0 | 8 | 16 | 45 | 20 | 25 | null | null |
anniecherk/pyschocnf
|
src/DataStructures.hs
|
bsd-3-clause
|
getNFresh :: Int -> State (Count, CNF) [Count]
getNFresh n = replicateM n getFresh
| 82 |
getNFresh :: Int -> State (Count, CNF) [Count]
getNFresh n = replicateM n getFresh
| 82 |
getNFresh n = replicateM n getFresh
| 35 | false | true | 0 | 8 | 13 | 43 | 20 | 23 | null | null |
nvasilakis/pandoc
|
src/Text/Pandoc/Readers/HTML.hs
|
gpl-2.0
|
isSpecial :: Char -> Bool
isSpecial '"' = True
| 46 |
isSpecial :: Char -> Bool
isSpecial '"' = True
| 46 |
isSpecial '"' = True
| 20 | false | true | 0 | 7 | 8 | 24 | 10 | 14 | null | null |
ghcjs/ghcjs
|
src/Gen2/Optimizer.hs
|
mit
|
doubleInfixOp MulOp (SaneDouble d1) (SaneDouble d2) = ValE (DoubleV $ SaneDouble (d1*d2))
| 89 |
doubleInfixOp MulOp (SaneDouble d1) (SaneDouble d2) = ValE (DoubleV $ SaneDouble (d1*d2))
| 89 |
doubleInfixOp MulOp (SaneDouble d1) (SaneDouble d2) = ValE (DoubleV $ SaneDouble (d1*d2))
| 89 | false | false | 0 | 10 | 11 | 45 | 22 | 23 | null | null |
songpp/halo
|
src/HttpRequestParser.hs
|
apache-2.0
|
versions :: Parser Int
versions = try (char '0' >> return 0)
<|> (char '1' >> return 1)
| 96 |
versions :: Parser Int
versions = try (char '0' >> return 0)
<|> (char '1' >> return 1)
| 96 |
versions = try (char '0' >> return 0)
<|> (char '1' >> return 1)
| 73 | false | true | 0 | 9 | 26 | 47 | 22 | 25 | null | null |
alexander-at-github/eta
|
compiler/ETA/Prelude/PrimOp.hs
|
bsd-3-clause
|
primOpInfo Int64SllOp =
mkGenPrimOp (fsLit "uncheckedIShiftL64#") [] [int64PrimTy, intPrimTy] int64PrimTy
| 116 |
primOpInfo Int64SllOp =
mkGenPrimOp (fsLit "uncheckedIShiftL64#") [] [int64PrimTy, intPrimTy] int64PrimTy
| 116 |
primOpInfo Int64SllOp =
mkGenPrimOp (fsLit "uncheckedIShiftL64#") [] [int64PrimTy, intPrimTy] int64PrimTy
| 116 | false | false | 0 | 7 | 20 | 32 | 16 | 16 | null | null |
greydot/dns
|
Network/DNS/Resolver.hs
|
bsd-3-clause
|
tcpLookup ::
Query
-> SockAddr
-> Int
-> Maybe Socket
-> IO (Either DNSError DNSMessage)
tcpLookup _ _ _ Nothing = return $ Left ServerFailure
| 162 |
tcpLookup ::
Query
-> SockAddr
-> Int
-> Maybe Socket
-> IO (Either DNSError DNSMessage)
tcpLookup _ _ _ Nothing = return $ Left ServerFailure
| 162 |
tcpLookup _ _ _ Nothing = return $ Left ServerFailure
| 53 | false | true | 0 | 12 | 44 | 58 | 27 | 31 | null | null |
brendanhay/gogol
|
gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Systemapks/Variants/List.hs
|
mpl-2.0
|
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
svlUploadType :: Lens' SystemapksVariantsList (Maybe Text)
svlUploadType
= lens _svlUploadType
(\ s a -> s{_svlUploadType = a})
| 206 |
svlUploadType :: Lens' SystemapksVariantsList (Maybe Text)
svlUploadType
= lens _svlUploadType
(\ s a -> s{_svlUploadType = a})
| 135 |
svlUploadType
= lens _svlUploadType
(\ s a -> s{_svlUploadType = a})
| 76 | true | true | 1 | 9 | 34 | 51 | 25 | 26 | null | null |
jeannekamikaze/Spear
|
Spear/Step.hs
|
mit
|
-- | Compose two steps.
(<.) :: Step s e a b -> Step s e c a -> Step s e c b
(<.) = flip (.>)
| 93 |
(<.) :: Step s e a b -> Step s e c a -> Step s e c b
(<.) = flip (.>)
| 69 |
(<.) = flip (.>)
| 16 | true | true | 0 | 7 | 27 | 56 | 30 | 26 | null | null |
christiaanb/ghc
|
compiler/hsSyn/HsExpr.hs
|
bsd-3-clause
|
hsLMatchPats :: LMatch id body -> [LPat id]
hsLMatchPats (L _ (Match _ pats _ _)) = pats
| 88 |
hsLMatchPats :: LMatch id body -> [LPat id]
hsLMatchPats (L _ (Match _ pats _ _)) = pats
| 88 |
hsLMatchPats (L _ (Match _ pats _ _)) = pats
| 44 | false | true | 0 | 11 | 17 | 55 | 25 | 30 | null | null |
nishiuramakoto/logiku
|
app/DBFS.hs
|
gpl-3.0
|
suGuest :: MonadIO m => SqlPersistT m UserAccountId
suGuest = do eguest <- getUser "guest"
case eguest of
Right guest -> do unprivilege guest
return guest
Left _ -> makeGuest
where
makeGuest :: MonadIO m => SqlPersistT m UserAccountId
makeGuest = do time <- liftIO getCurrentTime
guest <- insert $ (makeUserAccount "guest" time time time)
return $ guest
| 485 |
suGuest :: MonadIO m => SqlPersistT m UserAccountId
suGuest = do eguest <- getUser "guest"
case eguest of
Right guest -> do unprivilege guest
return guest
Left _ -> makeGuest
where
makeGuest :: MonadIO m => SqlPersistT m UserAccountId
makeGuest = do time <- liftIO getCurrentTime
guest <- insert $ (makeUserAccount "guest" time time time)
return $ guest
| 485 |
suGuest = do eguest <- getUser "guest"
case eguest of
Right guest -> do unprivilege guest
return guest
Left _ -> makeGuest
where
makeGuest :: MonadIO m => SqlPersistT m UserAccountId
makeGuest = do time <- liftIO getCurrentTime
guest <- insert $ (makeUserAccount "guest" time time time)
return $ guest
| 433 | false | true | 2 | 12 | 189 | 135 | 60 | 75 | null | null |
noraesae/line
|
test/Line/Messaging/WebhookSpec.hs
|
bsd-3-clause
|
emptyBody :: BL.ByteString
emptyBody = "{ \"events\": [] }"
| 59 |
emptyBody :: BL.ByteString
emptyBody = "{ \"events\": [] }"
| 59 |
emptyBody = "{ \"events\": [] }"
| 32 | false | true | 0 | 5 | 8 | 13 | 7 | 6 | null | null |
ocramz/petsc-hs
|
src/Numerical/PETSc/Internal/Class/RealVectorSpace.hs
|
gpl-3.0
|
nv3 = norm v3
| 13 |
nv3 = norm v3
| 13 |
nv3 = norm v3
| 13 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
wavewave/HROOT
|
HROOT-generate/lib/HROOT/Data/Graf/Class.hs
|
gpl-3.0
|
tCrown :: Class
tCrown =
grafclass "TCrown" [tEllipse]
[ Constructor [double "x1", double "y1", double "radin", double "radout", double "phimin", double "phimax"] Nothing
]
| 178 |
tCrown :: Class
tCrown =
grafclass "TCrown" [tEllipse]
[ Constructor [double "x1", double "y1", double "radin", double "radout", double "phimin", double "phimax"] Nothing
]
| 178 |
tCrown =
grafclass "TCrown" [tEllipse]
[ Constructor [double "x1", double "y1", double "radin", double "radout", double "phimin", double "phimax"] Nothing
]
| 162 | false | true | 0 | 8 | 29 | 66 | 33 | 33 | null | null |
shashikiranrp/RealWorldHaskell
|
Chapter 5/SimpleJSON.hs
|
apache-2.0
|
getArray :: JValue -> Maybe [JValue]
getArray (JArray a) = Just a
| 65 |
getArray :: JValue -> Maybe [JValue]
getArray (JArray a) = Just a
| 65 |
getArray (JArray a) = Just a
| 28 | false | true | 0 | 7 | 11 | 33 | 16 | 17 | null | null |
pcapriotti-test/optparse-applicative
|
Options/Applicative/Builder.hs
|
bsd-3-clause
|
noBacktrack :: PrefsMod
noBacktrack = PrefsMod $ \p -> p { prefBacktrack = False }
| 82 |
noBacktrack :: PrefsMod
noBacktrack = PrefsMod $ \p -> p { prefBacktrack = False }
| 82 |
noBacktrack = PrefsMod $ \p -> p { prefBacktrack = False }
| 58 | false | true | 2 | 8 | 14 | 36 | 17 | 19 | null | null |
edsko/ChinesePodAPI
|
src/Servant/ChinesePod/Analysis.hs
|
bsd-3-clause
|
showHskLevel :: Simpl -> IO ()
showHskLevel = putStrLn . dumpStr . hskWordLevel
| 79 |
showHskLevel :: Simpl -> IO ()
showHskLevel = putStrLn . dumpStr . hskWordLevel
| 79 |
showHskLevel = putStrLn . dumpStr . hskWordLevel
| 48 | false | true | 0 | 8 | 12 | 34 | 15 | 19 | null | null |
vikraman/ghc
|
libraries/template-haskell/Language/Haskell/TH/Lib.hs
|
bsd-3-clause
|
unpacked = bang sourceUnpack sourceStrict
| 41 |
unpacked = bang sourceUnpack sourceStrict
| 41 |
unpacked = bang sourceUnpack sourceStrict
| 41 | false | false | 1 | 5 | 4 | 14 | 5 | 9 | null | null |
joshcough/L5-Haskell
|
src/L/L1/L1L2AST.hs
|
mit
|
cmp EQ = (==)
| 15 |
cmp EQ = (==)
| 15 |
cmp EQ = (==)
| 15 | false | false | 0 | 4 | 5 | 12 | 6 | 6 | null | null |
IreneKnapp/direct-opengl
|
Graphics/Rendering/OpenGL/GL/PixelRectangles/Convolution.hs
|
bsd-3-clause
|
getConvolutionFilter :: ConvolutionTarget -> PixelData a -> IO ()
getConvolutionFilter t pd =
withPixelData pd $ glGetConvolutionFilter (marshalConvolutionTarget t)
| 167 |
getConvolutionFilter :: ConvolutionTarget -> PixelData a -> IO ()
getConvolutionFilter t pd =
withPixelData pd $ glGetConvolutionFilter (marshalConvolutionTarget t)
| 167 |
getConvolutionFilter t pd =
withPixelData pd $ glGetConvolutionFilter (marshalConvolutionTarget t)
| 101 | false | true | 0 | 8 | 21 | 48 | 22 | 26 | null | null |
Jonplussed/url-text-histogram
|
src/Server/Model/Histogram.hs
|
mit
|
doesHistogramExist :: URI -> Db.Tx Postgres s Bool
doesHistogramExist url = do
exists <- testForUrlSql $ urlText url
case exists of
Just _ -> return True
_ -> return False
| 191 |
doesHistogramExist :: URI -> Db.Tx Postgres s Bool
doesHistogramExist url = do
exists <- testForUrlSql $ urlText url
case exists of
Just _ -> return True
_ -> return False
| 191 |
doesHistogramExist url = do
exists <- testForUrlSql $ urlText url
case exists of
Just _ -> return True
_ -> return False
| 140 | false | true | 0 | 11 | 49 | 74 | 32 | 42 | null | null |
fmapfmapfmap/amazonka
|
amazonka-redshift/gen/Network/AWS/Redshift/ResetClusterParameterGroup.hs
|
mpl-2.0
|
-- | Creates a value of 'ResetClusterParameterGroup' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rcpgResetAllParameters'
--
-- * 'rcpgParameters'
--
-- * 'rcpgParameterGroupName'
resetClusterParameterGroup
:: Text -- ^ 'rcpgParameterGroupName'
-> ResetClusterParameterGroup
resetClusterParameterGroup pParameterGroupName_ =
ResetClusterParameterGroup'
{ _rcpgResetAllParameters = Nothing
, _rcpgParameters = Nothing
, _rcpgParameterGroupName = pParameterGroupName_
}
| 584 |
resetClusterParameterGroup
:: Text -- ^ 'rcpgParameterGroupName'
-> ResetClusterParameterGroup
resetClusterParameterGroup pParameterGroupName_ =
ResetClusterParameterGroup'
{ _rcpgResetAllParameters = Nothing
, _rcpgParameters = Nothing
, _rcpgParameterGroupName = pParameterGroupName_
}
| 315 |
resetClusterParameterGroup pParameterGroupName_ =
ResetClusterParameterGroup'
{ _rcpgResetAllParameters = Nothing
, _rcpgParameters = Nothing
, _rcpgParameterGroupName = pParameterGroupName_
}
| 212 | true | true | 0 | 6 | 94 | 48 | 32 | 16 | null | null |
alexbiehl/protocol-buffers
|
hprotoc/Text/ProtocolBuffers/ProtoCompile/Gen.hs
|
apache-2.0
|
instanceGPB :: ProtoName -> Decl
instanceGPB protoName
= InstDecl src Nothing [] [] (private "GPB") [TyCon (unqualName protoName)] []
| 137 |
instanceGPB :: ProtoName -> Decl
instanceGPB protoName
= InstDecl src Nothing [] [] (private "GPB") [TyCon (unqualName protoName)] []
| 137 |
instanceGPB protoName
= InstDecl src Nothing [] [] (private "GPB") [TyCon (unqualName protoName)] []
| 104 | false | true | 0 | 9 | 22 | 57 | 28 | 29 | null | null |
vladimir-ipatov/ganeti
|
src/Ganeti/Confd/Utils.hs
|
gpl-2.0
|
-- | Returns the HMAC key.
getClusterHmac :: IO HashKey
getClusterHmac = Path.confdHmacKey >>= fmap B.unpack . B.readFile
| 121 |
getClusterHmac :: IO HashKey
getClusterHmac = Path.confdHmacKey >>= fmap B.unpack . B.readFile
| 94 |
getClusterHmac = Path.confdHmacKey >>= fmap B.unpack . B.readFile
| 65 | true | true | 0 | 8 | 17 | 32 | 16 | 16 | null | null |
slpopejoy/fadno-xml
|
src/Fadno/MusicXml/MusicXml30.hs
|
bsd-2-clause
|
-- | Smart constructor for 'Wedge'
mkWedge :: WedgeType -> Wedge
mkWedge a = Wedge a Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing
| 172 |
mkWedge :: WedgeType -> Wedge
mkWedge a = Wedge a Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing
| 137 |
mkWedge a = Wedge a Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing
| 107 | true | true | 0 | 5 | 26 | 44 | 22 | 22 | null | null |
joozek78/stack
|
src/Stack/BuildPlan.hs
|
bsd-3-clause
|
buildPlanFixes :: MiniBuildPlan -> MiniBuildPlan
buildPlanFixes mbp = mbp
{ mbpPackages = Map.fromList $ map go $ Map.toList $ mbpPackages mbp
}
where
go (name, mpi) =
(name, mpi
{ mpiFlags = goF (packageNameString name) (mpiFlags mpi)
})
goF "persistent-sqlite" = Map.insert $(mkFlagName "systemlib") False
goF "yaml" = Map.insert $(mkFlagName "system-libyaml") False
goF _ = id
-- | Load the 'BuildPlan' for the given snapshot. Will load from a local copy
-- if available, otherwise downloading from Github.
| 569 |
buildPlanFixes :: MiniBuildPlan -> MiniBuildPlan
buildPlanFixes mbp = mbp
{ mbpPackages = Map.fromList $ map go $ Map.toList $ mbpPackages mbp
}
where
go (name, mpi) =
(name, mpi
{ mpiFlags = goF (packageNameString name) (mpiFlags mpi)
})
goF "persistent-sqlite" = Map.insert $(mkFlagName "systemlib") False
goF "yaml" = Map.insert $(mkFlagName "system-libyaml") False
goF _ = id
-- | Load the 'BuildPlan' for the given snapshot. Will load from a local copy
-- if available, otherwise downloading from Github.
| 569 |
buildPlanFixes mbp = mbp
{ mbpPackages = Map.fromList $ map go $ Map.toList $ mbpPackages mbp
}
where
go (name, mpi) =
(name, mpi
{ mpiFlags = goF (packageNameString name) (mpiFlags mpi)
})
goF "persistent-sqlite" = Map.insert $(mkFlagName "systemlib") False
goF "yaml" = Map.insert $(mkFlagName "system-libyaml") False
goF _ = id
-- | Load the 'BuildPlan' for the given snapshot. Will load from a local copy
-- if available, otherwise downloading from Github.
| 520 | false | true | 1 | 10 | 137 | 163 | 78 | 85 | null | null |
secYOUre/pdstrategies
|
tournament-submission/Pip.hs
|
bsd-3-clause
|
-- Compute probabilities of cooperation
cprob :: Fractional a => [[Maybe Choice]] -> [a]
cprob simulations = ps
where ns = map (length) (map (filter ((== Just Cooperate))) simulations)
noc = map (length) (map (filter ((== Nothing))) simulations)
runs = map (length) simulations
ps = zipWith (/) (map (fromIntegral) ns) (map (fromIntegral) (zipWith (-) runs noc))
-- Are all the elements in the list the same?
| 443 |
cprob :: Fractional a => [[Maybe Choice]] -> [a]
cprob simulations = ps
where ns = map (length) (map (filter ((== Just Cooperate))) simulations)
noc = map (length) (map (filter ((== Nothing))) simulations)
runs = map (length) simulations
ps = zipWith (/) (map (fromIntegral) ns) (map (fromIntegral) (zipWith (-) runs noc))
-- Are all the elements in the list the same?
| 403 |
cprob simulations = ps
where ns = map (length) (map (filter ((== Just Cooperate))) simulations)
noc = map (length) (map (filter ((== Nothing))) simulations)
runs = map (length) simulations
ps = zipWith (/) (map (fromIntegral) ns) (map (fromIntegral) (zipWith (-) runs noc))
-- Are all the elements in the list the same?
| 354 | true | true | 0 | 14 | 100 | 173 | 95 | 78 | null | null |
themoritz/cabal
|
cabal-install/Distribution/Client/BuildReports/Anonymous.hs
|
bsd-3-clause
|
dispFlag (fname, False) = Disp.char '-' <> Disp.text (unFlagName fname)
| 71 |
dispFlag (fname, False) = Disp.char '-' <> Disp.text (unFlagName fname)
| 71 |
dispFlag (fname, False) = Disp.char '-' <> Disp.text (unFlagName fname)
| 71 | false | false | 0 | 8 | 9 | 35 | 17 | 18 | null | null |
tjakway/ghcjvm
|
compiler/simplCore/SimplEnv.hs
|
bsd-3-clause
|
andFF FltOkSpec FltCareful = FltCareful
| 40 |
andFF FltOkSpec FltCareful = FltCareful
| 40 |
andFF FltOkSpec FltCareful = FltCareful
| 40 | false | false | 0 | 5 | 5 | 13 | 5 | 8 | null | null |
bos/math-functions
|
Numeric/RootFinding.hs
|
bsd-2-clause
|
findRoot :: IterationStep a
=> Int -- ^ Maximum
-> Tolerance -- ^ Error tolerance
-> [a]
-> Root Double
findRoot maxN tol = go 0
where
go !i _ | i >= maxN = SearchFailed
go !_ [] = SearchFailed
go i (x:xs) = case matchRoot tol x of
Just r -> r
Nothing -> go (i+1) xs
| 357 |
findRoot :: IterationStep a
=> Int -- ^ Maximum
-> Tolerance -- ^ Error tolerance
-> [a]
-> Root Double
findRoot maxN tol = go 0
where
go !i _ | i >= maxN = SearchFailed
go !_ [] = SearchFailed
go i (x:xs) = case matchRoot tol x of
Just r -> r
Nothing -> go (i+1) xs
| 357 |
findRoot maxN tol = go 0
where
go !i _ | i >= maxN = SearchFailed
go !_ [] = SearchFailed
go i (x:xs) = case matchRoot tol x of
Just r -> r
Nothing -> go (i+1) xs
| 205 | false | true | 2 | 13 | 149 | 139 | 66 | 73 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.