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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
kim/amazonka
|
amazonka-ec2/gen/Network/AWS/EC2/DeleteDhcpOptions.hs
|
mpl-2.0
|
-- | 'DeleteDhcpOptions' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'ddo1DhcpOptionsId' @::@ 'Text'
--
-- * 'ddo1DryRun' @::@ 'Maybe' 'Bool'
--
deleteDhcpOptions :: Text -- ^ 'ddo1DhcpOptionsId'
-> DeleteDhcpOptions
deleteDhcpOptions p1 = DeleteDhcpOptions
{ _ddo1DhcpOptionsId = p1
, _ddo1DryRun = Nothing
}
| 385 |
deleteDhcpOptions :: Text -- ^ 'ddo1DhcpOptionsId'
-> DeleteDhcpOptions
deleteDhcpOptions p1 = DeleteDhcpOptions
{ _ddo1DhcpOptionsId = p1
, _ddo1DryRun = Nothing
}
| 201 |
deleteDhcpOptions p1 = DeleteDhcpOptions
{ _ddo1DhcpOptionsId = p1
, _ddo1DryRun = Nothing
}
| 111 | true | true | 0 | 7 | 84 | 45 | 28 | 17 | null | null |
AlexanderPankiv/ghc
|
compiler/stgSyn/StgSyn.hs
|
bsd-3-clause
|
{-
************************************************************************
* *
\subsection[Stg-pretty-printing]{Pretty-printing}
* *
************************************************************************
Robin Popplestone asked for semi-colon separators on STG binds; here's
hoping he likes terminators instead... Ditto for case alternatives.
-}
pprGenStgBinding :: (OutputableBndr bndr, Outputable bdee, Ord bdee)
=> GenStgBinding bndr bdee -> SDoc
pprGenStgBinding (StgNonRec bndr rhs)
= hang (hsep [pprBndr LetBind bndr, equals])
4 (ppr rhs <> semi)
| 724 |
pprGenStgBinding :: (OutputableBndr bndr, Outputable bdee, Ord bdee)
=> GenStgBinding bndr bdee -> SDoc
pprGenStgBinding (StgNonRec bndr rhs)
= hang (hsep [pprBndr LetBind bndr, equals])
4 (ppr rhs <> semi)
| 233 |
pprGenStgBinding (StgNonRec bndr rhs)
= hang (hsep [pprBndr LetBind bndr, equals])
4 (ppr rhs <> semi)
| 112 | true | true | 0 | 10 | 226 | 95 | 45 | 50 | null | null |
mdorman/couch-simple
|
src/lib/Database/Couch/Explicit/Database.hs
|
mit
|
compactBase :: RequestBuilder ()
compactBase = do
setMethod "POST"
selectDb
addPath "_compact"
-- | Base bits for our revision examination functions
| 155 |
compactBase :: RequestBuilder ()
compactBase = do
setMethod "POST"
selectDb
addPath "_compact"
-- | Base bits for our revision examination functions
| 155 |
compactBase = do
setMethod "POST"
selectDb
addPath "_compact"
-- | Base bits for our revision examination functions
| 122 | false | true | 0 | 7 | 27 | 32 | 14 | 18 | null | null |
ardumont/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 |
zakharvoit/haskell-homework
|
Vector.hs
|
gpl-3.0
|
-- foldl3D f v = f (f (vx3D v) (vy3D v)) (vz3D z)
innerProduct :: (LikeVector v, LikeNumber a) => v a -> v a -> a
innerProduct = fold (+) $$ zip (*)
| 149 |
innerProduct :: (LikeVector v, LikeNumber a) => v a -> v a -> a
innerProduct = fold (+) $$ zip (*)
| 98 |
innerProduct = fold (+) $$ zip (*)
| 34 | true | true | 0 | 8 | 34 | 55 | 29 | 26 | null | null |
llllllllll/strp
|
Strp.hs
|
gpl-2.0
|
-- | Invokes strp with either a String or pulls one from xclip.
invoke :: [StrpModule] -> Maybe String -> IO ()
invoke ms Nothing = readProcess "xclip" ["-o"] ""
>>= flip processString ms
| 211 |
invoke :: [StrpModule] -> Maybe String -> IO ()
invoke ms Nothing = readProcess "xclip" ["-o"] ""
>>= flip processString ms
| 147 |
invoke ms Nothing = readProcess "xclip" ["-o"] ""
>>= flip processString ms
| 99 | true | true | 0 | 8 | 57 | 55 | 27 | 28 | null | null |
kowey/pandoc-old
|
src/Text/Pandoc/Writers/MediaWiki.hs
|
gpl-2.0
|
escapeString :: String -> String
escapeString = escapeStringForXML
| 67 |
escapeString :: String -> String
escapeString = escapeStringForXML
| 67 |
escapeString = escapeStringForXML
| 34 | false | true | 0 | 7 | 8 | 22 | 9 | 13 | null | null |
rueshyna/gogol
|
gogol-freebasesearch/gen/Network/Google/Method/Freebase/Search.hs
|
mpl-2.0
|
-- | The code of the language to run the query with. Default is \'en\'.
sLang :: Lens' Search [Text]
sLang
= lens _sLang (\ s a -> s{_sLang = a}) . _Default .
_Coerce
| 174 |
sLang :: Lens' Search [Text]
sLang
= lens _sLang (\ s a -> s{_sLang = a}) . _Default .
_Coerce
| 102 |
sLang
= lens _sLang (\ s a -> s{_sLang = a}) . _Default .
_Coerce
| 73 | true | true | 1 | 10 | 42 | 57 | 28 | 29 | null | null |
Lysxia/metamorph
|
test/test.hs
|
mit
|
f_E :: forall e. F_E e
f_E a b = do
w <- a
x <- b
y <- b
z <- a
pure [w, z, x, y]
| 91 |
f_E :: forall e. F_E e
f_E a b = do
w <- a
x <- b
y <- b
z <- a
pure [w, z, x, y]
| 91 |
f_E a b = do
w <- a
x <- b
y <- b
z <- a
pure [w, z, x, y]
| 68 | false | true | 0 | 8 | 37 | 70 | 34 | 36 | null | null |
mvv/data-dword
|
tests/Tests.hs
|
bsd-3-clause
|
main = defaultMain
$ localOption (QuickCheckTests 10000)
$ testGroup "Tests"
[ isoTestGroup "|Word32|Word32|" (0 ∷ U64)
, isoTestGroup "|Int32|Word32|" (0 ∷ I64)
, isoTestGroup "|Word16|Word16|Word32|" (0 ∷ UU64)
, isoTestGroup "|Int16|Word16|Word32|" (0 ∷ II64) ]
| 310 |
main = defaultMain
$ localOption (QuickCheckTests 10000)
$ testGroup "Tests"
[ isoTestGroup "|Word32|Word32|" (0 ∷ U64)
, isoTestGroup "|Int32|Word32|" (0 ∷ I64)
, isoTestGroup "|Word16|Word16|Word32|" (0 ∷ UU64)
, isoTestGroup "|Int16|Word16|Word32|" (0 ∷ II64) ]
| 310 |
main = defaultMain
$ localOption (QuickCheckTests 10000)
$ testGroup "Tests"
[ isoTestGroup "|Word32|Word32|" (0 ∷ U64)
, isoTestGroup "|Int32|Word32|" (0 ∷ I64)
, isoTestGroup "|Word16|Word16|Word32|" (0 ∷ UU64)
, isoTestGroup "|Int16|Word16|Word32|" (0 ∷ II64) ]
| 310 | false | false | 5 | 8 | 80 | 89 | 45 | 44 | null | null |
JacquesCarette/literate-scientific-software
|
code/drasil-lang/Language/Drasil/ShortHands.hs
|
bsd-2-clause
|
lJ = Variable "j"
| 17 |
lJ = Variable "j"
| 17 |
lJ = Variable "j"
| 17 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
jeremyong/Yaiba
|
Yaiba/Map.hs
|
bsd-3-clause
|
submap' :: Ord a => (b -> c -> Bool) -> Map a b -> Map a c -> Bool
submap' _ Tip _ = True
| 89 |
submap' :: Ord a => (b -> c -> Bool) -> Map a b -> Map a c -> Bool
submap' _ Tip _ = True
| 89 |
submap' _ Tip _ = True
| 22 | false | true | 0 | 10 | 25 | 64 | 29 | 35 | null | null |
hackern/network-hans
|
src/Network/Socket/Internal.hs
|
bsd-3-clause
|
advanceShutdown :: Maybe ShutdownCmd -> ShutdownCmd -> ShutdownCmd
advanceShutdown Nothing x = x
| 125 |
advanceShutdown :: Maybe ShutdownCmd -> ShutdownCmd -> ShutdownCmd
advanceShutdown Nothing x = x
| 125 |
advanceShutdown Nothing x = x
| 58 | false | true | 0 | 6 | 41 | 27 | 13 | 14 | null | null |
rueshyna/gogol
|
gogol-compute/gen/Network/Google/Resource/Compute/TargetSSLProxies/Delete.hs
|
mpl-2.0
|
-- | Name of the TargetSslProxy resource to delete.
tspdTargetSSLProxy :: Lens' TargetSSLProxiesDelete Text
tspdTargetSSLProxy
= lens _tspdTargetSSLProxy
(\ s a -> s{_tspdTargetSSLProxy = a})
| 199 |
tspdTargetSSLProxy :: Lens' TargetSSLProxiesDelete Text
tspdTargetSSLProxy
= lens _tspdTargetSSLProxy
(\ s a -> s{_tspdTargetSSLProxy = a})
| 147 |
tspdTargetSSLProxy
= lens _tspdTargetSSLProxy
(\ s a -> s{_tspdTargetSSLProxy = a})
| 91 | true | true | 0 | 9 | 32 | 42 | 22 | 20 | null | null |
wavewave/HROOT-generate
|
HROOT-generate/lib/HROOT/Data/RooFit/Class.hs
|
gpl-3.0
|
rooDirItem :: Class
rooDirItem = roofitclass "RooDirItem" []
[ ]
| 77 |
rooDirItem :: Class
rooDirItem = roofitclass "RooDirItem" []
[ ]
| 77 |
rooDirItem = roofitclass "RooDirItem" []
[ ]
| 57 | false | true | 0 | 6 | 22 | 30 | 12 | 18 | null | null |
music-suite/lilypond
|
src/Data/Music/Lilypond.hs
|
bsd-3-clause
|
addFermata :: Music -> Music
addFermata = addArticulation Fermata
| 65 |
addFermata :: Music -> Music
addFermata = addArticulation Fermata
| 65 |
addFermata = addArticulation Fermata
| 36 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
iblumenfeld/saw-core
|
src/Verifier/SAW/Conversion.hs
|
bsd-3-clause
|
asSuccLit :: (Functor m, Monad m, Termlike t) => Matcher m t Prim.Nat
asSuccLit = asCtor "Prelude.Succ" asAnyNatLit
| 115 |
asSuccLit :: (Functor m, Monad m, Termlike t) => Matcher m t Prim.Nat
asSuccLit = asCtor "Prelude.Succ" asAnyNatLit
| 115 |
asSuccLit = asCtor "Prelude.Succ" asAnyNatLit
| 45 | false | true | 0 | 7 | 17 | 46 | 23 | 23 | null | null |
ArturB/Multilinear
|
test/all/Test/QuickCheck/Common.hs
|
gpl-3.0
|
-- quickCheck with parametrizable tests number
quickCheckN :: Testable prop => Int -> prop -> IO Result
quickCheckN n = quickCheckWithResult (Args
Nothing -- ^ Should we replay a previous test? No.
n -- ^ Maximum number of successful tests before succeeding set to N.
1 -- ^ Maximum number of discarded tests per successful test before giving up - gave up after first failure.
n -- ^ Size to use for the biggest test cases.
True -- ^ Whether to print anything? yes.
0)
| 518 |
quickCheckN :: Testable prop => Int -> prop -> IO Result
quickCheckN n = quickCheckWithResult (Args
Nothing -- ^ Should we replay a previous test? No.
n -- ^ Maximum number of successful tests before succeeding set to N.
1 -- ^ Maximum number of discarded tests per successful test before giving up - gave up after first failure.
n -- ^ Size to use for the biggest test cases.
True -- ^ Whether to print anything? yes.
0)
| 471 |
quickCheckN n = quickCheckWithResult (Args
Nothing -- ^ Should we replay a previous test? No.
n -- ^ Maximum number of successful tests before succeeding set to N.
1 -- ^ Maximum number of discarded tests per successful test before giving up - gave up after first failure.
n -- ^ Size to use for the biggest test cases.
True -- ^ Whether to print anything? yes.
0)
| 414 | true | true | 0 | 9 | 134 | 61 | 31 | 30 | null | null |
Zoetermeer/latro
|
src/Latro/Typecheck.hs
|
mit
|
tcTy (SynTyRef p qid synTyArgs) = do
tyCon <- lookupTyQual qid
tyArgs <- mapM tcTy synTyArgs
let arity = tyConArity tyCon
if isPolymorphic tyCon
then
case arity of
ArityFixed paramLen
| not (length tyArgs == paramLen) -> throwError (ErrWrongTyConArity tyCon tyArgs) `reportErrorAt` p
| otherwise -> return $ TyApp tyCon tyArgs
_ -> return $ TyApp tyCon tyArgs
else
throwError (ErrNotPolymorphicType tyCon tyArgs) `reportErrorAt` p
| 500 |
tcTy (SynTyRef p qid synTyArgs) = do
tyCon <- lookupTyQual qid
tyArgs <- mapM tcTy synTyArgs
let arity = tyConArity tyCon
if isPolymorphic tyCon
then
case arity of
ArityFixed paramLen
| not (length tyArgs == paramLen) -> throwError (ErrWrongTyConArity tyCon tyArgs) `reportErrorAt` p
| otherwise -> return $ TyApp tyCon tyArgs
_ -> return $ TyApp tyCon tyArgs
else
throwError (ErrNotPolymorphicType tyCon tyArgs) `reportErrorAt` p
| 500 |
tcTy (SynTyRef p qid synTyArgs) = do
tyCon <- lookupTyQual qid
tyArgs <- mapM tcTy synTyArgs
let arity = tyConArity tyCon
if isPolymorphic tyCon
then
case arity of
ArityFixed paramLen
| not (length tyArgs == paramLen) -> throwError (ErrWrongTyConArity tyCon tyArgs) `reportErrorAt` p
| otherwise -> return $ TyApp tyCon tyArgs
_ -> return $ TyApp tyCon tyArgs
else
throwError (ErrNotPolymorphicType tyCon tyArgs) `reportErrorAt` p
| 500 | false | false | 0 | 17 | 134 | 167 | 77 | 90 | null | null |
ben-schulz/Idris-dev
|
src/Idris/Core/TT.hs
|
bsd-3-clause
|
constDocs c@(AType ATFloat) = "Double-precision floating-point numbers"
| 86 |
constDocs c@(AType ATFloat) = "Double-precision floating-point numbers"
| 86 |
constDocs c@(AType ATFloat) = "Double-precision floating-point numbers"
| 86 | false | false | 1 | 8 | 21 | 23 | 9 | 14 | null | null |
htquach/HaskellLED
|
LEDDisplay.hs
|
mit
|
romptForeverTerminal :: LEDDisplaySettings -> IO (Maybe Int)
promptForeverTerminal sim = runMaybeT $ forever $ do
liftIO $ putStr "Text to display: "
str <- liftIO getLine -- TODO: implement backspace
when (str == "exit") $ do
liftIO $ renderMatrixToTerminal (sim { scrDelayMicroSec = 50000}) (stringToMatrix "Bye »")
exit
lift $ renderMatrixToTerminal sim $ padMatrix (width sim) (height sim) (stringToMatrix str)
-- | Display the ticking clock updated every second
| 505 |
promptForeverTerminal :: LEDDisplaySettings -> IO (Maybe Int)
promptForeverTerminal sim = runMaybeT $ forever $ do
liftIO $ putStr "Text to display: "
str <- liftIO getLine -- TODO: implement backspace
when (str == "exit") $ do
liftIO $ renderMatrixToTerminal (sim { scrDelayMicroSec = 50000}) (stringToMatrix "Bye »")
exit
lift $ renderMatrixToTerminal sim $ padMatrix (width sim) (height sim) (stringToMatrix str)
-- | Display the ticking clock updated every second
| 505 |
promptForeverTerminal sim = runMaybeT $ forever $ do
liftIO $ putStr "Text to display: "
str <- liftIO getLine -- TODO: implement backspace
when (str == "exit") $ do
liftIO $ renderMatrixToTerminal (sim { scrDelayMicroSec = 50000}) (stringToMatrix "Bye »")
exit
lift $ renderMatrixToTerminal sim $ padMatrix (width sim) (height sim) (stringToMatrix str)
-- | Display the ticking clock updated every second
| 443 | false | true | 0 | 15 | 107 | 145 | 69 | 76 | null | null |
crockeo/lips
|
src/lib/Language/Lips/Parser.hs
|
mit
|
parseLList :: Parser LipsVal
parseLList = liftM LList $ between (char '(') (char ')') $ sepBy lipsParser spaces
| 111 |
parseLList :: Parser LipsVal
parseLList = liftM LList $ between (char '(') (char ')') $ sepBy lipsParser spaces
| 111 |
parseLList = liftM LList $ between (char '(') (char ')') $ sepBy lipsParser spaces
| 82 | false | true | 2 | 8 | 17 | 54 | 23 | 31 | null | null |
lu-fennell/nix-env-rebuild
|
src/Nix/Packages.hs
|
gpl-3.0
|
newPackageAndStatus :: Upd -> (PackageWithPath, PkgStatus)
newPackageAndStatus upd@Upd{..} = (newPackage upd, uStatus)
| 118 |
newPackageAndStatus :: Upd -> (PackageWithPath, PkgStatus)
newPackageAndStatus upd@Upd{..} = (newPackage upd, uStatus)
| 118 |
newPackageAndStatus upd@Upd{..} = (newPackage upd, uStatus)
| 59 | false | true | 0 | 8 | 11 | 42 | 23 | 19 | null | null |
wellposed/hblas
|
tests/HBLAS/BLAS/Level1Spec.hs
|
bsd-3-clause
|
vecTest1DROT :: IO ()
vecTest1DROT = do
left <- Matrix.generateMutableDenseVectorWithStride 4 1 (\idx -> [1, 2, 3, 4] !! idx)
right <- Matrix.generateMutableDenseVectorWithStride 8 2 (\idx -> [8, 7, 6, 5, 4, 3, 2, 1] !! idx)
drot 4 left right 0 (-2)
resLeft <- Matrix.mutableVectorToList $ _bufferMutDenseVector left
resRight <- Matrix.mutableVectorToList $ _bufferMutDenseVector right
resLeft `shouldBe` [-16, -12, -8, -4]
resRight `shouldBe` [2, 7, 4, 5, 6, 3, 8, 1]
| 482 |
vecTest1DROT :: IO ()
vecTest1DROT = do
left <- Matrix.generateMutableDenseVectorWithStride 4 1 (\idx -> [1, 2, 3, 4] !! idx)
right <- Matrix.generateMutableDenseVectorWithStride 8 2 (\idx -> [8, 7, 6, 5, 4, 3, 2, 1] !! idx)
drot 4 left right 0 (-2)
resLeft <- Matrix.mutableVectorToList $ _bufferMutDenseVector left
resRight <- Matrix.mutableVectorToList $ _bufferMutDenseVector right
resLeft `shouldBe` [-16, -12, -8, -4]
resRight `shouldBe` [2, 7, 4, 5, 6, 3, 8, 1]
| 482 |
vecTest1DROT = do
left <- Matrix.generateMutableDenseVectorWithStride 4 1 (\idx -> [1, 2, 3, 4] !! idx)
right <- Matrix.generateMutableDenseVectorWithStride 8 2 (\idx -> [8, 7, 6, 5, 4, 3, 2, 1] !! idx)
drot 4 left right 0 (-2)
resLeft <- Matrix.mutableVectorToList $ _bufferMutDenseVector left
resRight <- Matrix.mutableVectorToList $ _bufferMutDenseVector right
resLeft `shouldBe` [-16, -12, -8, -4]
resRight `shouldBe` [2, 7, 4, 5, 6, 3, 8, 1]
| 460 | false | true | 0 | 12 | 84 | 227 | 122 | 105 | null | null |
sbditto85/parsedsltest
|
test/Generators.hs
|
apache-2.0
|
jsonValueToString :: JsonValue -> String
jsonValueToString (JsonValue stringConcat') = stringConcatToString stringConcat'
| 121 |
jsonValueToString :: JsonValue -> String
jsonValueToString (JsonValue stringConcat') = stringConcatToString stringConcat'
| 121 |
jsonValueToString (JsonValue stringConcat') = stringConcatToString stringConcat'
| 80 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
mapinguari/SC_HS_Proxy
|
src/Proxy/Types/Game.hs
|
mit
|
locationToPixel :: Location -> Pixel
locationToPixel (x,y) = P x y
| 66 |
locationToPixel :: Location -> Pixel
locationToPixel (x,y) = P x y
| 66 |
locationToPixel (x,y) = P x y
| 29 | false | true | 0 | 5 | 10 | 34 | 16 | 18 | null | null |
abakst/symmetry
|
checker/src/Symmetry/SymbEx.hs
|
mit
|
joinStmt s1 s2
= IL.NonDet [s1, s2] ()
| 40 |
joinStmt s1 s2
= IL.NonDet [s1, s2] ()
| 40 |
joinStmt s1 s2
= IL.NonDet [s1, s2] ()
| 40 | false | false | 1 | 6 | 9 | 30 | 13 | 17 | null | null |
daherb/Haskell-Muste
|
muste-lib/Muste/Tree/Internal.hs
|
artistic-2.0
|
countMatchedNodes :: TTree -> TTree -> Int
countMatchedNodes tree1 tree2 =
let
pathes = getPathes tree1
in
length $ filter (\p -> selectNode tree1 p == selectNode tree2 p) pathes
| 190 |
countMatchedNodes :: TTree -> TTree -> Int
countMatchedNodes tree1 tree2 =
let
pathes = getPathes tree1
in
length $ filter (\p -> selectNode tree1 p == selectNode tree2 p) pathes
| 190 |
countMatchedNodes tree1 tree2 =
let
pathes = getPathes tree1
in
length $ filter (\p -> selectNode tree1 p == selectNode tree2 p) pathes
| 147 | false | true | 0 | 12 | 41 | 69 | 33 | 36 | null | null |
pparkkin/eta
|
compiler/ETA/CodeGen/Prim.hs
|
bsd-3-clause
|
simpleOp Int64Gt = Just $ typedCmp jlong ifgt
| 45 |
simpleOp Int64Gt = Just $ typedCmp jlong ifgt
| 45 |
simpleOp Int64Gt = Just $ typedCmp jlong ifgt
| 45 | false | false | 0 | 6 | 7 | 18 | 8 | 10 | null | null |
bfops/Chess
|
src/Main.hs
|
mit
|
allPieces :: [HashString]
allPieces = [ fileString c p | c <- [G.White, G.Black] , p <- [minBound .. maxBound ] ]
| 113 |
allPieces :: [HashString]
allPieces = [ fileString c p | c <- [G.White, G.Black] , p <- [minBound .. maxBound ] ]
| 113 |
allPieces = [ fileString c p | c <- [G.White, G.Black] , p <- [minBound .. maxBound ] ]
| 87 | false | true | 0 | 9 | 21 | 54 | 30 | 24 | null | null |
nushio3/ghc
|
compiler/types/OptCoercion.hs
|
bsd-3-clause
|
isAxiom_maybe (AxiomInstCo con ind cos)
= Just (False, con, ind, cos)
| 71 |
isAxiom_maybe (AxiomInstCo con ind cos)
= Just (False, con, ind, cos)
| 71 |
isAxiom_maybe (AxiomInstCo con ind cos)
= Just (False, con, ind, cos)
| 71 | false | false | 0 | 7 | 12 | 34 | 18 | 16 | null | null |
dmpots/fibon
|
tools/fibon-analyse/Fibon/Analyse/Analysis.hs
|
bsd-3-clause
|
normalize :: NormFun RawPerf
-> RawPerf
-> RawPerf
-> PerfMonad NormPerf
normalize n base@(RawTime _) peak@(RawTime _) =
return(n rawPerfToDouble base peak)
| 188 |
normalize :: NormFun RawPerf
-> RawPerf
-> RawPerf
-> PerfMonad NormPerf
normalize n base@(RawTime _) peak@(RawTime _) =
return(n rawPerfToDouble base peak)
| 188 |
normalize n base@(RawTime _) peak@(RawTime _) =
return(n rawPerfToDouble base peak)
| 85 | false | true | 0 | 8 | 53 | 67 | 33 | 34 | null | null |
postgres-haskell/postgres-wire
|
src/Database/PostgreSQL/Driver/StatementStorage.hs
|
mit
|
defaultStatementName :: StatementName
defaultStatementName = StatementName ""
| 77 |
defaultStatementName :: StatementName
defaultStatementName = StatementName ""
| 77 |
defaultStatementName = StatementName ""
| 39 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
mavenraven/github
|
samples/Users/ShowUser.hs
|
bsd-3-clause
|
formatDate = show . Github.fromGithubDate
| 41 |
formatDate = show . Github.fromGithubDate
| 41 |
formatDate = show . Github.fromGithubDate
| 41 | false | false | 0 | 6 | 4 | 12 | 6 | 6 | null | null |
patperry/hs-linear-algebra
|
tests-old/STMatrix.hs
|
bsd-3-clause
|
subMatrix_S x y = ( (), x - y, y )
| 34 |
subMatrix_S x y = ( (), x - y, y )
| 34 |
subMatrix_S x y = ( (), x - y, y )
| 34 | false | false | 0 | 6 | 10 | 26 | 14 | 12 | null | null |
m15k/hs-xml-alchemy
|
lib/Readers/DTD.hs
|
mit
|
evalEntityDecl (ExternalParameterEntityDecl name eid) = undefined
| 65 |
evalEntityDecl (ExternalParameterEntityDecl name eid) = undefined
| 65 |
evalEntityDecl (ExternalParameterEntityDecl name eid) = undefined
| 65 | false | false | 0 | 6 | 5 | 18 | 8 | 10 | null | null |
hpdeifel/hlwm-haskell
|
src/HLWM/IPC.hs
|
bsd-2-clause
|
connectionFd :: IPC.HerbstConnection -> Fd
connectionFd = Fd . connectionNumber . IPC.display
| 93 |
connectionFd :: IPC.HerbstConnection -> Fd
connectionFd = Fd . connectionNumber . IPC.display
| 93 |
connectionFd = Fd . connectionNumber . IPC.display
| 50 | false | true | 0 | 6 | 11 | 27 | 14 | 13 | null | null |
bergmannf/gitit
|
src/Network/Gitit/ContentTransformer.hs
|
gpl-2.0
|
--
-- Top level, composed transformers
--
-- | Responds with raw source.
rawTextResponse :: ContentTransformer Response
rawTextResponse = rawContents >>= textResponse
| 167 |
rawTextResponse :: ContentTransformer Response
rawTextResponse = rawContents >>= textResponse
| 93 |
rawTextResponse = rawContents >>= textResponse
| 46 | true | true | 0 | 5 | 22 | 22 | 13 | 9 | null | null |
ghc-android/ghc
|
testsuite/tests/ghci/should_run/ghcirun004.hs
|
bsd-3-clause
|
2351 = 2350
| 11 |
2351 = 2350
| 11 |
2351 = 2350
| 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
juhp/stack
|
src/Stack/Options/BenchParser.hs
|
bsd-3-clause
|
-- | Parser for bench arguments.
-- FIXME hiding options
benchOptsParser :: Bool -> Parser BenchmarkOptsMonoid
benchOptsParser hide0 = BenchmarkOptsMonoid
<$> optionalFirst (strOption (long "benchmark-arguments" <>
long "ba" <>
metavar "BENCH_ARGS" <>
help ("Forward BENCH_ARGS to the benchmark suite. " <>
"Supports templates from `cabal bench`") <>
hide))
<*> optionalFirst (flag' True (long "no-run-benchmarks" <>
help "Disable running of benchmarks. (Benchmarks will still be built.)" <>
hide))
where hide = hideMods hide0
| 776 |
benchOptsParser :: Bool -> Parser BenchmarkOptsMonoid
benchOptsParser hide0 = BenchmarkOptsMonoid
<$> optionalFirst (strOption (long "benchmark-arguments" <>
long "ba" <>
metavar "BENCH_ARGS" <>
help ("Forward BENCH_ARGS to the benchmark suite. " <>
"Supports templates from `cabal bench`") <>
hide))
<*> optionalFirst (flag' True (long "no-run-benchmarks" <>
help "Disable running of benchmarks. (Benchmarks will still be built.)" <>
hide))
where hide = hideMods hide0
| 719 |
benchOptsParser hide0 = BenchmarkOptsMonoid
<$> optionalFirst (strOption (long "benchmark-arguments" <>
long "ba" <>
metavar "BENCH_ARGS" <>
help ("Forward BENCH_ARGS to the benchmark suite. " <>
"Supports templates from `cabal bench`") <>
hide))
<*> optionalFirst (flag' True (long "no-run-benchmarks" <>
help "Disable running of benchmarks. (Benchmarks will still be built.)" <>
hide))
where hide = hideMods hide0
| 665 | true | true | 0 | 15 | 321 | 116 | 56 | 60 | null | null |
ocramz/optimization
|
Test.hs
|
bsd-3-clause
|
powellX = V4 3 (-1) 0 1
| 23 |
powellX = V4 3 (-1) 0 1
| 23 |
powellX = V4 3 (-1) 0 1
| 23 | false | false | 0 | 7 | 6 | 20 | 10 | 10 | null | null |
rueshyna/gogol
|
gogol-iam/gen/Network/Google/Resource/IAM/Projects/ServiceAccounts/Keys/Delete.hs
|
mpl-2.0
|
-- | OAuth bearer token.
psakdBearerToken :: Lens' ProjectsServiceAccountsKeysDelete (Maybe Text)
psakdBearerToken
= lens _psakdBearerToken
(\ s a -> s{_psakdBearerToken = a})
| 183 |
psakdBearerToken :: Lens' ProjectsServiceAccountsKeysDelete (Maybe Text)
psakdBearerToken
= lens _psakdBearerToken
(\ s a -> s{_psakdBearerToken = a})
| 158 |
psakdBearerToken
= lens _psakdBearerToken
(\ s a -> s{_psakdBearerToken = a})
| 85 | true | true | 0 | 9 | 29 | 48 | 25 | 23 | null | null |
snoyberg/ghc
|
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
|
bsd-3-clause
|
justName = mkNameG DataName "base" "GHC.Base" "Just"
| 55 |
justName = mkNameG DataName "base" "GHC.Base" "Just"
| 55 |
justName = mkNameG DataName "base" "GHC.Base" "Just"
| 55 | false | false | 0 | 5 | 9 | 15 | 7 | 8 | null | null |
urbanslug/ghc
|
testsuite/tests/deSugar/should_run/dsrun015.hs
|
bsd-3-clause
|
foo x b =
let y = x+1
in (C{..}, let x = 100 in D{..})
| 63 |
foo x b =
let y = x+1
in (C{..}, let x = 100 in D{..})
| 63 |
foo x b =
let y = x+1
in (C{..}, let x = 100 in D{..})
| 63 | false | false | 0 | 11 | 24 | 53 | 27 | 26 | null | null |
bitc/hs-watchman
|
tests/test.hs
|
mit
|
test_version :: Assertion
test_version = withWatchmanServer Nothing $ \sockFile -> do
Watchman.WatchmanVersion v <- Watchman.version sockFile
assertBool "Version string not empty" (not (null v))
| 202 |
test_version :: Assertion
test_version = withWatchmanServer Nothing $ \sockFile -> do
Watchman.WatchmanVersion v <- Watchman.version sockFile
assertBool "Version string not empty" (not (null v))
| 202 |
test_version = withWatchmanServer Nothing $ \sockFile -> do
Watchman.WatchmanVersion v <- Watchman.version sockFile
assertBool "Version string not empty" (not (null v))
| 176 | false | true | 0 | 14 | 31 | 67 | 29 | 38 | null | null |
tonyfloatersu/solution-haskell-craft-of-FP
|
Chapter_11_my_note.hs
|
mit
|
invseq :: (a -> b -> c) -> (b -> a -> c)
invseq f = \v2 v1 -> f v1 v2
| 72 |
invseq :: (a -> b -> c) -> (b -> a -> c)
invseq f = \v2 v1 -> f v1 v2
| 72 |
invseq f = \v2 v1 -> f v1 v2
| 31 | false | true | 0 | 10 | 24 | 57 | 28 | 29 | null | null |
thedobs/LTSmin
|
doc/code/regroup.hs
|
bsd-3-clause
|
nextswap g = let (i,j,_) = bestswap g in
trace (show i ++ " -> " ++ show j ++ " (" ++ show (cost g) ++ ")")
swap g i j
| 154 |
nextswap g = let (i,j,_) = bestswap g in
trace (show i ++ " -> " ++ show j ++ " (" ++ show (cost g) ++ ")")
swap g i j
| 154 |
nextswap g = let (i,j,_) = bestswap g in
trace (show i ++ " -> " ++ show j ++ " (" ++ show (cost g) ++ ")")
swap g i j
| 154 | false | false | 0 | 14 | 67 | 82 | 39 | 43 | null | null |
tuura/concepts
|
src/Tuura/Concept/STG/Translation.hs
|
bsd-3-clause
|
genSTG :: Show a => [a] -> [a] -> [a] -> [String] -> [(String, Bool)]
-> [String] -> String
genSTG inputSigns outputSigns internalSigns arcStrs initStrs invStr =
printf tmpl (unwords ins)
(unwords outs)
(unwords ints)
(unlines allArcs)
(unwords marks)
(unlines invStr)
where
allSigns = output initStrs
outs = map show outputSigns
ins = map show inputSigns
ints = map show internalSigns
allArcs = concatMap consistencyLoop allSigns ++ arcStrs
marks = initVals allSigns initStrs
-- | For each additional transition object for a signal, caused by OR
-- causality, add this to the signals transition loop.
| 724 |
genSTG :: Show a => [a] -> [a] -> [a] -> [String] -> [(String, Bool)]
-> [String] -> String
genSTG inputSigns outputSigns internalSigns arcStrs initStrs invStr =
printf tmpl (unwords ins)
(unwords outs)
(unwords ints)
(unlines allArcs)
(unwords marks)
(unlines invStr)
where
allSigns = output initStrs
outs = map show outputSigns
ins = map show inputSigns
ints = map show internalSigns
allArcs = concatMap consistencyLoop allSigns ++ arcStrs
marks = initVals allSigns initStrs
-- | For each additional transition object for a signal, caused by OR
-- causality, add this to the signals transition loop.
| 724 |
genSTG inputSigns outputSigns internalSigns arcStrs initStrs invStr =
printf tmpl (unwords ins)
(unwords outs)
(unwords ints)
(unlines allArcs)
(unwords marks)
(unlines invStr)
where
allSigns = output initStrs
outs = map show outputSigns
ins = map show inputSigns
ints = map show internalSigns
allArcs = concatMap consistencyLoop allSigns ++ arcStrs
marks = initVals allSigns initStrs
-- | For each additional transition object for a signal, caused by OR
-- causality, add this to the signals transition loop.
| 620 | false | true | 2 | 13 | 217 | 213 | 103 | 110 | null | null |
tamarin-prover/tamarin-prover
|
lib/theory/src/Theory/Text/Parser/Signature.hs
|
gpl-3.0
|
equations :: Parser ()
equations =
symbol "equations" *> colon *> commaSep1 equation *> pure ()
where
equation = do
rrule <- RRule <$> term llitNoPub True <*> (equalSign *> term llitNoPub True)
case rRuleToCtxtStRule rrule of
Just str ->
modifyStateSig (addCtxtStRule str)
Nothing ->
fail $ "Not a correct equation: " ++ show rrule
-- | options
| 426 |
equations :: Parser ()
equations =
symbol "equations" *> colon *> commaSep1 equation *> pure ()
where
equation = do
rrule <- RRule <$> term llitNoPub True <*> (equalSign *> term llitNoPub True)
case rRuleToCtxtStRule rrule of
Just str ->
modifyStateSig (addCtxtStRule str)
Nothing ->
fail $ "Not a correct equation: " ++ show rrule
-- | options
| 426 |
equations =
symbol "equations" *> colon *> commaSep1 equation *> pure ()
where
equation = do
rrule <- RRule <$> term llitNoPub True <*> (equalSign *> term llitNoPub True)
case rRuleToCtxtStRule rrule of
Just str ->
modifyStateSig (addCtxtStRule str)
Nothing ->
fail $ "Not a correct equation: " ++ show rrule
-- | options
| 403 | false | true | 1 | 13 | 139 | 134 | 59 | 75 | null | null |
snoyberg/ghc
|
compiler/basicTypes/OccName.hs
|
bsd-3-clause
|
-- Data con for a class
mkNewTyCoOcc = mk_simple_deriv tcName "N:"
| 75 |
mkNewTyCoOcc = mk_simple_deriv tcName "N:"
| 51 |
mkNewTyCoOcc = mk_simple_deriv tcName "N:"
| 51 | true | false | 0 | 5 | 19 | 12 | 6 | 6 | null | null |
jgoerzen/dtmconv
|
HaXml-1.12/src/Text/XML/HaXml/DtdToHaskell/TypeDef.hs
|
gpl-2.0
|
-- nonzero attrs, no constructors
ppTypeDef (DataDef _ n fs []) =
let name = ppHName n in
text "data" <+> name <+> text "=" <+> name $$
nest 4 ( text "{" <+> ppF (head fs) $$
vcat (map (\f-> text "," <+> ppF f) (tail fs)) $$
text "}" <+> derives )
| 285 |
ppTypeDef (DataDef _ n fs []) =
let name = ppHName n in
text "data" <+> name <+> text "=" <+> name $$
nest 4 ( text "{" <+> ppF (head fs) $$
vcat (map (\f-> text "," <+> ppF f) (tail fs)) $$
text "}" <+> derives )
| 251 |
ppTypeDef (DataDef _ n fs []) =
let name = ppHName n in
text "data" <+> name <+> text "=" <+> name $$
nest 4 ( text "{" <+> ppF (head fs) $$
vcat (map (\f-> text "," <+> ppF f) (tail fs)) $$
text "}" <+> derives )
| 251 | true | false | 4 | 16 | 91 | 139 | 63 | 76 | null | null |
brendanhay/gogol
|
gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Students/List.hs
|
mpl-2.0
|
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
cslUploadType :: Lens' CoursesStudentsList (Maybe Text)
cslUploadType
= lens _cslUploadType
(\ s a -> s{_cslUploadType = a})
| 203 |
cslUploadType :: Lens' CoursesStudentsList (Maybe Text)
cslUploadType
= lens _cslUploadType
(\ s a -> s{_cslUploadType = a})
| 132 |
cslUploadType
= lens _cslUploadType
(\ s a -> s{_cslUploadType = a})
| 76 | true | true | 1 | 9 | 34 | 51 | 25 | 26 | null | null |
shockkolate/lambdircd
|
src.old/IRC/Numeric.hs
|
apache-2.0
|
numERR_USERONCHANNEL = Numeric 443
| 41 |
numERR_USERONCHANNEL = Numeric 443
| 41 |
numERR_USERONCHANNEL = Numeric 443
| 41 | false | false | 0 | 5 | 10 | 9 | 4 | 5 | null | null |
urbanslug/ghc
|
testsuite/tests/programs/galois_raytrace/Parse.hs
|
bsd-3-clause
|
run :: String -> IO ()
run is = case (parse program "" is) of
Left err -> print err
Right x -> print x
| 121 |
run :: String -> IO ()
run is = case (parse program "" is) of
Left err -> print err
Right x -> print x
| 121 |
run is = case (parse program "" is) of
Left err -> print err
Right x -> print x
| 98 | false | true | 0 | 8 | 43 | 65 | 29 | 36 | null | null |
d0kt0r0/estuary
|
client/src/Estuary/Languages/CineCer0/Parser.hs
|
gpl-3.0
|
-- //////////////
int :: H Int
int = fromIntegral <$> integer
| 62 |
int :: H Int
int = fromIntegral <$> integer
| 43 |
int = fromIntegral <$> integer
| 30 | true | true | 0 | 6 | 11 | 25 | 11 | 14 | null | null |
bacchanalia/KitchenSink
|
KitchenSink/Qualified.hs
|
gpl-3.0
|
-- |'VU.elemIndices'
vu_elemIndices = VU.elemIndices
| 52 |
vu_elemIndices = VU.elemIndices
| 31 |
vu_elemIndices = VU.elemIndices
| 31 | true | false | 0 | 5 | 4 | 9 | 5 | 4 | null | null |
AlexeyRaga/eta
|
compiler/ETA/Prelude/PrimOp.hs
|
bsd-3-clause
|
tagOf_PrimOp CasSmallArrayOp = _ILIT(170)
| 41 |
tagOf_PrimOp CasSmallArrayOp = _ILIT(170)
| 41 |
tagOf_PrimOp CasSmallArrayOp = _ILIT(170)
| 41 | false | false | 0 | 6 | 3 | 16 | 7 | 9 | null | null |
delta4d/codewars
|
kata/befunge-interpreter/Befunge93.hs
|
mit
|
newCode :: String -> Code
newCode s = f 0 0 s emptyCode
where
f _ _ "" m = m
f x y ('\n':s) m = f 0 (y+1) s m
f x y (c:s) m = f (x+1) y s (M.insert (x, y) c m)
| 178 |
newCode :: String -> Code
newCode s = f 0 0 s emptyCode
where
f _ _ "" m = m
f x y ('\n':s) m = f 0 (y+1) s m
f x y (c:s) m = f (x+1) y s (M.insert (x, y) c m)
| 177 |
newCode s = f 0 0 s emptyCode
where
f _ _ "" m = m
f x y ('\n':s) m = f 0 (y+1) s m
f x y (c:s) m = f (x+1) y s (M.insert (x, y) c m)
| 151 | false | true | 4 | 8 | 65 | 160 | 69 | 91 | null | null |
jhance/gba-hs
|
test/Test/GBA/Thumb/T4.hs
|
mit
|
t4adc5b :: TestTree
t4adc5b = testCase "[t4adc5b] V flag, set to 1" $ do
v <- runTest $ do
writeSafeRegister 0 [b|10000000 00000000 00000000 00000000|]
writeSafeRegister 1 [b|11111111 11111111 11111111 11111111|]
writeStatus statusC False
execute $ T4 T4_ADC 0 1
readStatus statusV
v @?= True
| 340 |
t4adc5b :: TestTree
t4adc5b = testCase "[t4adc5b] V flag, set to 1" $ do
v <- runTest $ do
writeSafeRegister 0 [b|10000000 00000000 00000000 00000000|]
writeSafeRegister 1 [b|11111111 11111111 11111111 11111111|]
writeStatus statusC False
execute $ T4 T4_ADC 0 1
readStatus statusV
v @?= True
| 340 |
t4adc5b = testCase "[t4adc5b] V flag, set to 1" $ do
v <- runTest $ do
writeSafeRegister 0 [b|10000000 00000000 00000000 00000000|]
writeSafeRegister 1 [b|11111111 11111111 11111111 11111111|]
writeStatus statusC False
execute $ T4 T4_ADC 0 1
readStatus statusV
v @?= True
| 320 | false | true | 0 | 13 | 92 | 95 | 43 | 52 | null | null |
DanielSchuessler/hstri
|
Util.hs
|
gpl-3.0
|
prop_flipNibbles :: Word8 -> Bool
prop_flipNibbles x = word8ToNibbles (flipNibbles x) == (y0,y1)
where
(y1,y0) = word8ToNibbles x
-- charsToPermute :: Int -> [Char] -> Permute
-- charsToPermute n = listPermute n . fmap f
-- where
-- f c = ord c - ord 'a'
--
--
-- permuteToChars :: Permute -> [Char]
-- permuteToChars = fmap f . Permute.elems
-- where
-- f i = chr (i + ord 'a')
| 445 |
prop_flipNibbles :: Word8 -> Bool
prop_flipNibbles x = word8ToNibbles (flipNibbles x) == (y0,y1)
where
(y1,y0) = word8ToNibbles x
-- charsToPermute :: Int -> [Char] -> Permute
-- charsToPermute n = listPermute n . fmap f
-- where
-- f c = ord c - ord 'a'
--
--
-- permuteToChars :: Permute -> [Char]
-- permuteToChars = fmap f . Permute.elems
-- where
-- f i = chr (i + ord 'a')
| 445 |
prop_flipNibbles x = word8ToNibbles (flipNibbles x) == (y0,y1)
where
(y1,y0) = word8ToNibbles x
-- charsToPermute :: Int -> [Char] -> Permute
-- charsToPermute n = listPermute n . fmap f
-- where
-- f c = ord c - ord 'a'
--
--
-- permuteToChars :: Permute -> [Char]
-- permuteToChars = fmap f . Permute.elems
-- where
-- f i = chr (i + ord 'a')
| 410 | false | true | 0 | 8 | 138 | 64 | 38 | 26 | null | null |
danr/hipspec
|
src/HipSpec/Lang/Monomorphise.hs
|
gpl-3.0
|
instLemma :: (Ord a,Ord b)
=> Bool {- ^ allow new type instantiations -}
-> Lemma a b {- ^ lemma to maybe instantiate -}
-> InstMap a b {- ^ type to instantiate it at -}
-> Records a b {- ^ instantiated records so far -}
-> Maybe (Lemma a b,Clause a b)
{- Just (l,r,c) :
l: Lemma with new info
c: The clause that got instantiated -}
instLemma allow_new l@Lemma{..} im rs
-- Instantiate lemmas as long as they don't trigger new
-- types to be instantiated
| (allow_new || and
[ (t,map (tySubsts (M.toList im)) ts) `member` rs
| (t,ts) <- takeWhile (isTySymb . fst) (toList lm_eff)
])
-- and we haven't instantiated it before
&& im `notElem` lm_inst
-- and all type variables are assigned
&& all (`M.member` im) (ty_vars lm_cl)
= Just
( l { lm_inst = im : lm_inst }
, instClauseWith lm_cl (M.toList im)
)
| otherwise = Nothing
| 1,066 |
instLemma :: (Ord a,Ord b)
=> Bool {- ^ allow new type instantiations -}
-> Lemma a b {- ^ lemma to maybe instantiate -}
-> InstMap a b {- ^ type to instantiate it at -}
-> Records a b {- ^ instantiated records so far -}
-> Maybe (Lemma a b,Clause a b)
instLemma allow_new l@Lemma{..} im rs
-- Instantiate lemmas as long as they don't trigger new
-- types to be instantiated
| (allow_new || and
[ (t,map (tySubsts (M.toList im)) ts) `member` rs
| (t,ts) <- takeWhile (isTySymb . fst) (toList lm_eff)
])
-- and we haven't instantiated it before
&& im `notElem` lm_inst
-- and all type variables are assigned
&& all (`M.member` im) (ty_vars lm_cl)
= Just
( l { lm_inst = im : lm_inst }
, instClauseWith lm_cl (M.toList im)
)
| otherwise = Nothing
| 897 |
instLemma allow_new l@Lemma{..} im rs
-- Instantiate lemmas as long as they don't trigger new
-- types to be instantiated
| (allow_new || and
[ (t,map (tySubsts (M.toList im)) ts) `member` rs
| (t,ts) <- takeWhile (isTySymb . fst) (toList lm_eff)
])
-- and we haven't instantiated it before
&& im `notElem` lm_inst
-- and all type variables are assigned
&& all (`M.member` im) (ty_vars lm_cl)
= Just
( l { lm_inst = im : lm_inst }
, instClauseWith lm_cl (M.toList im)
)
| otherwise = Nothing
| 585 | true | true | 1 | 22 | 399 | 260 | 139 | 121 | null | null |
diflying/logitext
|
Intuitionistic.hs
|
bsd-3-clause
|
lexerUpper = P.makeTokenParser intuitionisticStyleUpper
| 55 |
lexerUpper = P.makeTokenParser intuitionisticStyleUpper
| 55 |
lexerUpper = P.makeTokenParser intuitionisticStyleUpper
| 55 | false | false | 1 | 6 | 3 | 14 | 5 | 9 | null | null |
GaloisInc/saw-script
|
heapster-saw/src/Verifier/SAW/Heapster/PermParser.hs
|
bsd-3-clause
|
-- | Parse a 'FunPerm' named by the first 'String' from the second 'String'
parseFunPermString ::
Fail.MonadFail m =>
String {- ^ object name -} ->
PermEnv {- ^ permission environment -} ->
CruCtx args {- ^ argument types -} ->
TypeRepr ret {- ^ return type -} ->
String {- ^ input text -} ->
m (SomeFunPerm args ret)
parseFunPermString nm env args ret =
runParser nm env parseFunPerm (tcFunPerm args ret)
| 546 |
parseFunPermString ::
Fail.MonadFail m =>
String {- ^ object name -} ->
PermEnv {- ^ permission environment -} ->
CruCtx args {- ^ argument types -} ->
TypeRepr ret {- ^ return type -} ->
String {- ^ input text -} ->
m (SomeFunPerm args ret)
parseFunPermString nm env args ret =
runParser nm env parseFunPerm (tcFunPerm args ret)
| 470 |
parseFunPermString nm env args ret =
runParser nm env parseFunPerm (tcFunPerm args ret)
| 89 | true | true | 0 | 10 | 213 | 89 | 45 | 44 | null | null |
ghc-android/ghc
|
compiler/deSugar/Coverage.hs
|
bsd-3-clause
|
addTickLHsExprEvalInner :: LHsExpr Id -> TM (LHsExpr Id)
addTickLHsExprEvalInner e = do
d <- getDensity
case d of
TickForCoverage -> addTickLHsExprNever e
_otherwise -> addTickLHsExpr e
-- | A let body is treated differently from addTickLHsExprEvalInner
-- above with TickForBreakPoints, because for breakpoints we always
-- want to tick the body, even if it is not a redex. See test
-- break012. This gives the user the opportunity to inspect the
-- values of the let-bound variables.
| 509 |
addTickLHsExprEvalInner :: LHsExpr Id -> TM (LHsExpr Id)
addTickLHsExprEvalInner e = do
d <- getDensity
case d of
TickForCoverage -> addTickLHsExprNever e
_otherwise -> addTickLHsExpr e
-- | A let body is treated differently from addTickLHsExprEvalInner
-- above with TickForBreakPoints, because for breakpoints we always
-- want to tick the body, even if it is not a redex. See test
-- break012. This gives the user the opportunity to inspect the
-- values of the let-bound variables.
| 509 |
addTickLHsExprEvalInner e = do
d <- getDensity
case d of
TickForCoverage -> addTickLHsExprNever e
_otherwise -> addTickLHsExpr e
-- | A let body is treated differently from addTickLHsExprEvalInner
-- above with TickForBreakPoints, because for breakpoints we always
-- want to tick the body, even if it is not a redex. See test
-- break012. This gives the user the opportunity to inspect the
-- values of the let-bound variables.
| 452 | false | true | 0 | 10 | 100 | 67 | 33 | 34 | null | null |
HIPERFIT/futhark
|
src/Futhark/Optimise/Simplify/Engine.hs
|
isc
|
-- | Indicate in the symbol table that we have descended into a loop.
enterLoop :: SimpleM rep a -> SimpleM rep a
enterLoop = localVtable ST.deepen
| 147 |
enterLoop :: SimpleM rep a -> SimpleM rep a
enterLoop = localVtable ST.deepen
| 77 |
enterLoop = localVtable ST.deepen
| 33 | true | true | 0 | 6 | 26 | 31 | 15 | 16 | null | null |
kishoredbn/barrelfish
|
tools/sockeye/SockeyeBackendLISA.hs
|
mit
|
generateAssociatedComponents _ = []
| 35 |
generateAssociatedComponents _ = []
| 35 |
generateAssociatedComponents _ = []
| 35 | false | false | 0 | 5 | 3 | 11 | 5 | 6 | null | null |
gnn/Hets
|
OWL2/MS.hs
|
gpl-2.0
|
symsOfObjectPropertyExpression :: ObjectPropertyExpression -> Set.Set Entity
symsOfObjectPropertyExpression o = case o of
ObjectProp i -> Set.singleton $ mkEntity ObjectProperty i
ObjectInverseOf i -> symsOfObjectPropertyExpression i
| 237 |
symsOfObjectPropertyExpression :: ObjectPropertyExpression -> Set.Set Entity
symsOfObjectPropertyExpression o = case o of
ObjectProp i -> Set.singleton $ mkEntity ObjectProperty i
ObjectInverseOf i -> symsOfObjectPropertyExpression i
| 237 |
symsOfObjectPropertyExpression o = case o of
ObjectProp i -> Set.singleton $ mkEntity ObjectProperty i
ObjectInverseOf i -> symsOfObjectPropertyExpression i
| 160 | false | true | 0 | 9 | 28 | 59 | 27 | 32 | null | null |
ezyang/ghc
|
testsuite/tests/programs/maessen-hashtab/Data/HashTab.hs
|
bsd-3-clause
|
fromList :: (Eq key) => (key -> Int32) -> [(key,val)] -> IO (HashTable key val)
fromList hash list = do
table <- new (==) hash
sequence_ [ insert table k v | (k,v) <- list ]
return table
-- | Converts a hash table to a list of key\/value pairs.
--
| 254 |
fromList :: (Eq key) => (key -> Int32) -> [(key,val)] -> IO (HashTable key val)
fromList hash list = do
table <- new (==) hash
sequence_ [ insert table k v | (k,v) <- list ]
return table
-- | Converts a hash table to a list of key\/value pairs.
--
| 254 |
fromList hash list = do
table <- new (==) hash
sequence_ [ insert table k v | (k,v) <- list ]
return table
-- | Converts a hash table to a list of key\/value pairs.
--
| 174 | false | true | 0 | 11 | 57 | 112 | 58 | 54 | null | null |
AlexeyRaga/eta
|
compiler/ETA/TypeCheck/TcGenDeriv.hs
|
bsd-3-clause
|
isSym (c : _) = startsVarSym c || startsConSym c
| 48 |
isSym (c : _) = startsVarSym c || startsConSym c
| 48 |
isSym (c : _) = startsVarSym c || startsConSym c
| 48 | false | false | 0 | 6 | 9 | 27 | 12 | 15 | null | null |
zaxtax/hakaru
|
haskell/Language/Hakaru/CodeGen/Pretty.hs
|
bsd-3-clause
|
newline :: Doc
newline = char '\n'
| 34 |
newline :: Doc
newline = char '\n'
| 34 |
newline = char '\n'
| 19 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
HaskVan/tiempo
|
src/Tiempo.hs
|
mit
|
timeToMicros Hours hrs = timeToMicros Minutes (hrs * minutesPerHour)
| 68 |
timeToMicros Hours hrs = timeToMicros Minutes (hrs * minutesPerHour)
| 68 |
timeToMicros Hours hrs = timeToMicros Minutes (hrs * minutesPerHour)
| 68 | false | false | 1 | 7 | 8 | 27 | 11 | 16 | null | null |
punitrathore/haskell-first-principles
|
src/Chap12.hs
|
bsd-3-clause
|
replaceThe' :: [String] -> [String]
replaceThe' [] = []
| 55 |
replaceThe' :: [String] -> [String]
replaceThe' [] = []
| 55 |
replaceThe' [] = []
| 19 | false | true | 0 | 8 | 8 | 34 | 16 | 18 | null | null |
jacekszymanski/wxHaskell
|
wxcore/src/haskell/Graphics/UI/WXCore/WxcTypes.hs
|
lgpl-2.1
|
vecFromSize :: Size -> Vector
vecFromSize (Size w h)
= Vector w h
| 67 |
vecFromSize :: Size -> Vector
vecFromSize (Size w h)
= Vector w h
| 67 |
vecFromSize (Size w h)
= Vector w h
| 37 | false | true | 0 | 7 | 14 | 31 | 15 | 16 | null | null |
petertseng/adventofcode-hs
|
bin/20_factors.hs
|
apache-2.0
|
factorial :: Int -> Int
factorial n = product [1..n]
| 52 |
factorial :: Int -> Int
factorial n = product [1..n]
| 52 |
factorial n = product [1..n]
| 28 | false | true | 0 | 6 | 9 | 26 | 13 | 13 | null | null |
mariefarrell/Hets
|
LF/Parse.hs
|
gpl-2.0
|
whitesp :: AParser st String
whitesp = many1 $ oneOf whiteChars
| 63 |
whitesp :: AParser st String
whitesp = many1 $ oneOf whiteChars
| 63 |
whitesp = many1 $ oneOf whiteChars
| 34 | false | true | 3 | 5 | 10 | 27 | 11 | 16 | null | null |
proegssilb/beholder-observer
|
app/Main.hs
|
apache-2.0
|
main :: IO ()
main = do
dl <- load :: IO AcidStateDataLoader
S.scotty 8080 $ site dl
| 88 |
main :: IO ()
main = do
dl <- load :: IO AcidStateDataLoader
S.scotty 8080 $ site dl
| 88 |
main = do
dl <- load :: IO AcidStateDataLoader
S.scotty 8080 $ site dl
| 74 | false | true | 0 | 9 | 21 | 44 | 20 | 24 | null | null |
jml/language-python
|
src/Language/Python/Common/ParserMonad.hs
|
bsd-3-clause
|
pushIndent :: Int -> P ()
pushIndent indent = do
oldStack <- gets indentStack
modify $ \s -> s { indentStack = indent : oldStack }
| 138 |
pushIndent :: Int -> P ()
pushIndent indent = do
oldStack <- gets indentStack
modify $ \s -> s { indentStack = indent : oldStack }
| 137 |
pushIndent indent = do
oldStack <- gets indentStack
modify $ \s -> s { indentStack = indent : oldStack }
| 111 | false | true | 0 | 12 | 33 | 62 | 29 | 33 | null | null |
hvr/containers
|
Data/IntMap/Base.hs
|
bsd-3-clause
|
nequal Nil Nil = False
| 22 |
nequal Nil Nil = False
| 22 |
nequal Nil Nil = False
| 22 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
brendanhay/gogol
|
gogol-discovery/gen/Network/Google/Discovery/Types/Product.hs
|
mpl-2.0
|
-- | The root URL under which all API services live.
rdRootURL :: Lens' RestDescription (Maybe Text)
rdRootURL
= lens _rdRootURL (\ s a -> s{_rdRootURL = a})
| 159 |
rdRootURL :: Lens' RestDescription (Maybe Text)
rdRootURL
= lens _rdRootURL (\ s a -> s{_rdRootURL = a})
| 106 |
rdRootURL
= lens _rdRootURL (\ s a -> s{_rdRootURL = a})
| 58 | true | true | 1 | 9 | 29 | 52 | 25 | 27 | null | null |
keithodulaigh/Hets
|
utils/itcor/GenItCorrections.hs
|
gpl-2.0
|
parseDouble :: Parser String
parseDouble = many1 double
| 55 |
parseDouble :: Parser String
parseDouble = many1 double
| 55 |
parseDouble = many1 double
| 26 | false | true | 0 | 5 | 7 | 17 | 8 | 9 | null | null |
truls/language-vhdl-quote
|
src/Language/VHDL/Quote/Internal.hs
|
mpl-2.0
|
qqConStmE :: V.ConcurrentStatement -> Maybe (Q Exp)
qqConStmE (V.AntiConStm v) = Just $ antiVarE v
| 98 |
qqConStmE :: V.ConcurrentStatement -> Maybe (Q Exp)
qqConStmE (V.AntiConStm v) = Just $ antiVarE v
| 98 |
qqConStmE (V.AntiConStm v) = Just $ antiVarE v
| 46 | false | true | 0 | 8 | 14 | 48 | 22 | 26 | null | null |
antonlogvinenko/javelin
|
src/Javelin/Lib/ByteCode/DescSign.hs
|
mit
|
parseFieldSignature :: String -> Either ParseError ReferenceTypeSignature
parseFieldSignature = parse fieldSignatureP ""
| 120 |
parseFieldSignature :: String -> Either ParseError ReferenceTypeSignature
parseFieldSignature = parse fieldSignatureP ""
| 120 |
parseFieldSignature = parse fieldSignatureP ""
| 46 | false | true | 0 | 6 | 11 | 25 | 12 | 13 | null | null |
andreagenso/java2scala
|
src/J2s/Parser.hs
|
apache-2.0
|
pAnnotationTypeElementDeclaration''= (\vd t f -> AGS.sem_AnnotationTypeElementDeclaration_AnnTypeElemDeclConstant f t vd) <$> pVariableDeclarators <* pSpecialSimbol ";"
<|> (\i d t f -> AGS.sem_AnnotationTypeElementDeclaration_AnnTypeElemDeclAbstract f t i d) <$> pIdentifier <* pSpecialSimbol "(" <* pSpecialSimbol ")" <*> pDefaultValue <* pSpecialSimbol ";"
| 498 |
pAnnotationTypeElementDeclaration''= (\vd t f -> AGS.sem_AnnotationTypeElementDeclaration_AnnTypeElemDeclConstant f t vd) <$> pVariableDeclarators <* pSpecialSimbol ";"
<|> (\i d t f -> AGS.sem_AnnotationTypeElementDeclaration_AnnTypeElemDeclAbstract f t i d) <$> pIdentifier <* pSpecialSimbol "(" <* pSpecialSimbol ")" <*> pDefaultValue <* pSpecialSimbol ";"
| 498 |
pAnnotationTypeElementDeclaration''= (\vd t f -> AGS.sem_AnnotationTypeElementDeclaration_AnnTypeElemDeclConstant f t vd) <$> pVariableDeclarators <* pSpecialSimbol ";"
<|> (\i d t f -> AGS.sem_AnnotationTypeElementDeclaration_AnnTypeElemDeclAbstract f t i d) <$> pIdentifier <* pSpecialSimbol "(" <* pSpecialSimbol ")" <*> pDefaultValue <* pSpecialSimbol ";"
| 498 | false | false | 0 | 16 | 176 | 96 | 47 | 49 | null | null |
gridaphobe/cabal2nix
|
distribution-nixpkgs/src/Distribution/Nixpkgs/Haskell/PackageSourceSpec.hs
|
bsd-3-clause
|
cabalFromPath :: FilePath -> MaybeT IO (Bool, Cabal.GenericPackageDescription)
cabalFromPath path = do
d <- liftIO $ doesDirectoryExist path
(,) d <$> if d
then cabalFromDirectory path
else cabalFromFile False path
| 227 |
cabalFromPath :: FilePath -> MaybeT IO (Bool, Cabal.GenericPackageDescription)
cabalFromPath path = do
d <- liftIO $ doesDirectoryExist path
(,) d <$> if d
then cabalFromDirectory path
else cabalFromFile False path
| 227 |
cabalFromPath path = do
d <- liftIO $ doesDirectoryExist path
(,) d <$> if d
then cabalFromDirectory path
else cabalFromFile False path
| 148 | false | true | 0 | 9 | 42 | 74 | 36 | 38 | null | null |
fffej/HS-Poker
|
LookupPatternMatch.hs
|
bsd-3-clause
|
getValueFromProduct 100793 = 3222
| 33 |
getValueFromProduct 100793 = 3222
| 33 |
getValueFromProduct 100793 = 3222
| 33 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ndmitchell/tagsoup
|
src/Text/HTML/TagSoup/Specification.hs
|
bsd-3-clause
|
cdataSection S{..} = pos $ case hd of
_ | Just s <- next "]]>" -> dat s
_ | eof -> dat s
_ | otherwise -> hd & cdataSection tl
-- 8.2.4.39 Tokenizing character references
-- Change from spec: this is reponsible for writing '&' if nothing is to be written
| 268 |
cdataSection S{..} = pos $ case hd of
_ | Just s <- next "]]>" -> dat s
_ | eof -> dat s
_ | otherwise -> hd & cdataSection tl
-- 8.2.4.39 Tokenizing character references
-- Change from spec: this is reponsible for writing '&' if nothing is to be written
| 268 |
cdataSection S{..} = pos $ case hd of
_ | Just s <- next "]]>" -> dat s
_ | eof -> dat s
_ | otherwise -> hd & cdataSection tl
-- 8.2.4.39 Tokenizing character references
-- Change from spec: this is reponsible for writing '&' if nothing is to be written
| 268 | false | false | 0 | 13 | 66 | 84 | 37 | 47 | null | null |
GaloisInc/halvm-ghc
|
compiler/codeGen/StgCmmUtils.hs
|
bsd-3-clause
|
emitSwitch :: CmmExpr -- Tag to switch on
-> [(ConTagZ, CmmAGraphScoped)] -- Tagged branches
-> Maybe CmmAGraphScoped -- Default branch (if any)
-> ConTagZ -> ConTagZ -- Min and Max possible values;
-- behaviour outside this range is
-- undefined
-> FCode ()
-- First, two rather common cases in which there is no work to do
emitSwitch _ [] (Just code) _ _ = emit (fst code)
| 551 |
emitSwitch :: CmmExpr -- Tag to switch on
-> [(ConTagZ, CmmAGraphScoped)] -- Tagged branches
-> Maybe CmmAGraphScoped -- Default branch (if any)
-> ConTagZ -> ConTagZ -- Min and Max possible values;
-- behaviour outside this range is
-- undefined
-> FCode ()
emitSwitch _ [] (Just code) _ _ = emit (fst code)
| 484 |
emitSwitch _ [] (Just code) _ _ = emit (fst code)
| 57 | true | true | 0 | 13 | 244 | 87 | 46 | 41 | null | null |
vikraman/ghc
|
compiler/typecheck/TcRnTypes.hs
|
bsd-3-clause
|
insolubleImplic :: Implication -> Bool
insolubleImplic ic = isInsolubleStatus (ic_status ic)
| 92 |
insolubleImplic :: Implication -> Bool
insolubleImplic ic = isInsolubleStatus (ic_status ic)
| 92 |
insolubleImplic ic = isInsolubleStatus (ic_status ic)
| 53 | false | true | 0 | 7 | 10 | 32 | 14 | 18 | null | null |
keera-studios/hsQt
|
Qtc/Gui/QStyleOptionViewItem.hs
|
bsd-2-clause
|
qdecorationSize :: QStyleOptionViewItem a -> (()) -> IO (QSize ())
qdecorationSize x0 ()
= withQSizeResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QStyleOptionViewItem_decorationSize cobj_x0
| 197 |
qdecorationSize :: QStyleOptionViewItem a -> (()) -> IO (QSize ())
qdecorationSize x0 ()
= withQSizeResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QStyleOptionViewItem_decorationSize cobj_x0
| 197 |
qdecorationSize x0 ()
= withQSizeResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QStyleOptionViewItem_decorationSize cobj_x0
| 130 | false | true | 4 | 11 | 32 | 70 | 32 | 38 | null | null |
flowbox-public/mainland-pretty
|
Text/PrettyPrint/Mainland.hs
|
bsd-3-clause
|
group :: Doc -> Doc
group d = flatten d `Alt` d
| 47 |
group :: Doc -> Doc
group d = flatten d `Alt` d
| 47 |
group d = flatten d `Alt` d
| 27 | false | true | 0 | 6 | 11 | 27 | 14 | 13 | null | null |
rahulmutt/ghcvm
|
libraries/eta-meta/Language/Eta/Meta/Ppr.hs
|
bsd-3-clause
|
pprInfixExp _ = text "<<Non-variable/constructor in infix context>>"
| 75 |
pprInfixExp _ = text "<<Non-variable/constructor in infix context>>"
| 75 |
pprInfixExp _ = text "<<Non-variable/constructor in infix context>>"
| 75 | false | false | 0 | 4 | 14 | 13 | 5 | 8 | null | null |
wavewave/lhc-analysis-collection
|
analysis/oldcode/XQLD_sqsg_ATLAS0L2to6JMET_7TeV.hs
|
gpl-3.0
|
datalst = [ (x,y) | x <- masslst, y <- masslst ]
| 48 |
datalst = [ (x,y) | x <- masslst, y <- masslst ]
| 48 |
datalst = [ (x,y) | x <- masslst, y <- masslst ]
| 48 | false | false | 1 | 8 | 11 | 35 | 17 | 18 | null | null |
yesodweb/shakespeare
|
test/Text/HamletSpec.hs
|
mit
|
caseMaybeFunction :: Assertion
caseMaybeFunction = do
helper "url?foo=bar&foo1=bar1" [hamlet|
$maybe x <- Just urlParams
@?{x theArg}
|]
| 148 |
caseMaybeFunction :: Assertion
caseMaybeFunction = do
helper "url?foo=bar&foo1=bar1" [hamlet|
$maybe x <- Just urlParams
@?{x theArg}
|]
| 148 |
caseMaybeFunction = do
helper "url?foo=bar&foo1=bar1" [hamlet|
$maybe x <- Just urlParams
@?{x theArg}
|]
| 117 | false | true | 0 | 8 | 24 | 30 | 14 | 16 | null | null |
rblaze/haskell-dbus
|
lib/DBus/Internal/Types.hs
|
apache-2.0
|
pathElements :: ObjectPath -> [String]
pathElements = filter (not . null) . splitOn "/" . coerce
| 96 |
pathElements :: ObjectPath -> [String]
pathElements = filter (not . null) . splitOn "/" . coerce
| 96 |
pathElements = filter (not . null) . splitOn "/" . coerce
| 57 | false | true | 0 | 9 | 15 | 39 | 20 | 19 | null | null |
HJvT/hdirect
|
src/Parser.hs
|
bsd-3-clause
|
action_195 (147#) = happyShift action_371
| 41 |
action_195 (147#) = happyShift action_371
| 41 |
action_195 (147#) = happyShift action_371
| 41 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
erikd/wai
|
warp/Network/Wai/Handler/Warp/HTTP2/Manager.hs
|
mit
|
kill :: Set ThreadId -> IO ()
kill set = traverse_ killThread set
| 65 |
kill :: Set ThreadId -> IO ()
kill set = traverse_ killThread set
| 65 |
kill set = traverse_ killThread set
| 35 | false | true | 0 | 7 | 12 | 31 | 14 | 17 | null | null |
olsner/ghc
|
testsuite/tests/programs/galois_raytrace/Geometry.hs
|
bsd-3-clause
|
subVV :: Vector -> Vector -> Vector
subVV (V x1 y1 z1) (V x2 y2 z2)
= V (x1 - x2) (y1 - y2) (z1 - z2)
| 105 |
subVV :: Vector -> Vector -> Vector
subVV (V x1 y1 z1) (V x2 y2 z2)
= V (x1 - x2) (y1 - y2) (z1 - z2)
| 105 |
subVV (V x1 y1 z1) (V x2 y2 z2)
= V (x1 - x2) (y1 - y2) (z1 - z2)
| 69 | false | true | 0 | 10 | 30 | 79 | 38 | 41 | null | null |
ezyang/ghc
|
compiler/utils/GraphOps.hs
|
bsd-3-clause
|
addExclusion
:: (Uniquable k, Uniquable color)
=> k -> (k -> cls) -> color
-> Graph k cls color -> Graph k cls color
addExclusion u getClass color
= graphMapModify
$ adjustWithDefaultUFM
(\node -> node { nodeExclusions = addOneToUniqSet (nodeExclusions node) color })
(newNode u (getClass u)) { nodeExclusions = unitUniqSet color }
u
| 446 |
addExclusion
:: (Uniquable k, Uniquable color)
=> k -> (k -> cls) -> color
-> Graph k cls color -> Graph k cls color
addExclusion u getClass color
= graphMapModify
$ adjustWithDefaultUFM
(\node -> node { nodeExclusions = addOneToUniqSet (nodeExclusions node) color })
(newNode u (getClass u)) { nodeExclusions = unitUniqSet color }
u
| 445 |
addExclusion u getClass color
= graphMapModify
$ adjustWithDefaultUFM
(\node -> node { nodeExclusions = addOneToUniqSet (nodeExclusions node) color })
(newNode u (getClass u)) { nodeExclusions = unitUniqSet color }
u
| 304 | false | true | 0 | 13 | 166 | 133 | 68 | 65 | null | null |
vikraman/ghc
|
compiler/coreSyn/CoreSyn.hs
|
bsd-3-clause
|
boringCxtNotOk, boringCxtOk :: Bool
boringCxtOk = True
| 57 |
boringCxtNotOk, boringCxtOk :: Bool
boringCxtOk = True
| 57 |
boringCxtOk = True
| 21 | false | true | 2 | 6 | 9 | 21 | 8 | 13 | null | null |
exercism/xhaskell
|
exercises/practice/perfect-numbers/test/Tests.hs
|
mit
|
cases :: [Case]
cases = [ Case { description = "Smallest perfect number is classified correctly"
, number = 6
, expected = Just Perfect
}
, Case { description = "Medium perfect number is classified correctly"
, number = 28
, expected = Just Perfect
}
, Case { description = "Large perfect number is classified correctly"
, number = 33550336
, expected = Just Perfect
}
, Case { description = "Smallest abundant number is classified correctly"
, number = 12
, expected = Just Abundant
}
, Case { description = "Medium abundant number is classified correctly"
, number = 30
, expected = Just Abundant
}
, Case { description = "Large abundant number is classified correctly"
, number = 33550335
, expected = Just Abundant
}
, Case { description = "Smallest prime deficient number is classified correctly"
, number = 2
, expected = Just Deficient
}
, Case { description = "Smallest non-prime deficient number is classified correctly"
, number = 4
, expected = Just Deficient
}
, Case { description = "Medium deficient number is classified correctly"
, number = 32
, expected = Just Deficient
}
, Case { description = "Large deficient number is classified correctly"
, number = 33550337
, expected = Just Deficient
}
, Case { description = "Edge case (no factors other than itself) is classified correctly"
, number = 1
, expected = Just Deficient
}
, Case { description = "Zero is rejected (not a natural number)"
, number = 0
, expected = Nothing
}
, Case { description = "Negative integer is rejected (not a natural number)"
, number = -1
, expected = Nothing
}
]
| 2,354 |
cases :: [Case]
cases = [ Case { description = "Smallest perfect number is classified correctly"
, number = 6
, expected = Just Perfect
}
, Case { description = "Medium perfect number is classified correctly"
, number = 28
, expected = Just Perfect
}
, Case { description = "Large perfect number is classified correctly"
, number = 33550336
, expected = Just Perfect
}
, Case { description = "Smallest abundant number is classified correctly"
, number = 12
, expected = Just Abundant
}
, Case { description = "Medium abundant number is classified correctly"
, number = 30
, expected = Just Abundant
}
, Case { description = "Large abundant number is classified correctly"
, number = 33550335
, expected = Just Abundant
}
, Case { description = "Smallest prime deficient number is classified correctly"
, number = 2
, expected = Just Deficient
}
, Case { description = "Smallest non-prime deficient number is classified correctly"
, number = 4
, expected = Just Deficient
}
, Case { description = "Medium deficient number is classified correctly"
, number = 32
, expected = Just Deficient
}
, Case { description = "Large deficient number is classified correctly"
, number = 33550337
, expected = Just Deficient
}
, Case { description = "Edge case (no factors other than itself) is classified correctly"
, number = 1
, expected = Just Deficient
}
, Case { description = "Zero is rejected (not a natural number)"
, number = 0
, expected = Nothing
}
, Case { description = "Negative integer is rejected (not a natural number)"
, number = -1
, expected = Nothing
}
]
| 2,354 |
cases = [ Case { description = "Smallest perfect number is classified correctly"
, number = 6
, expected = Just Perfect
}
, Case { description = "Medium perfect number is classified correctly"
, number = 28
, expected = Just Perfect
}
, Case { description = "Large perfect number is classified correctly"
, number = 33550336
, expected = Just Perfect
}
, Case { description = "Smallest abundant number is classified correctly"
, number = 12
, expected = Just Abundant
}
, Case { description = "Medium abundant number is classified correctly"
, number = 30
, expected = Just Abundant
}
, Case { description = "Large abundant number is classified correctly"
, number = 33550335
, expected = Just Abundant
}
, Case { description = "Smallest prime deficient number is classified correctly"
, number = 2
, expected = Just Deficient
}
, Case { description = "Smallest non-prime deficient number is classified correctly"
, number = 4
, expected = Just Deficient
}
, Case { description = "Medium deficient number is classified correctly"
, number = 32
, expected = Just Deficient
}
, Case { description = "Large deficient number is classified correctly"
, number = 33550337
, expected = Just Deficient
}
, Case { description = "Edge case (no factors other than itself) is classified correctly"
, number = 1
, expected = Just Deficient
}
, Case { description = "Zero is rejected (not a natural number)"
, number = 0
, expected = Nothing
}
, Case { description = "Negative integer is rejected (not a natural number)"
, number = -1
, expected = Nothing
}
]
| 2,338 | false | true | 0 | 8 | 1,078 | 348 | 215 | 133 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.