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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Concomitant/LambdaHack
|
GameDefinition/Content/ItemKind.hs
|
bsd-3-clause
|
ring1 = ring
{ irarity = [(10, 2)]
, iaspects = [AddSpeed $ 1 + d 2, AddMaxHP $ dl 7 - 7 - d 7]
, ieffects = [Explode "distortion"] -- strong magic
, ifeature = ifeature ring ++ [EqpSlot EqpSlotAddSpeed ""]
}
| 220
|
ring1 = ring
{ irarity = [(10, 2)]
, iaspects = [AddSpeed $ 1 + d 2, AddMaxHP $ dl 7 - 7 - d 7]
, ieffects = [Explode "distortion"] -- strong magic
, ifeature = ifeature ring ++ [EqpSlot EqpSlotAddSpeed ""]
}
| 220
|
ring1 = ring
{ irarity = [(10, 2)]
, iaspects = [AddSpeed $ 1 + d 2, AddMaxHP $ dl 7 - 7 - d 7]
, ieffects = [Explode "distortion"] -- strong magic
, ifeature = ifeature ring ++ [EqpSlot EqpSlotAddSpeed ""]
}
| 220
| false
| false
| 1
| 12
| 55
| 105
| 55
| 50
| null | null |
flipstone/orville
|
orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/RawSql.hs
|
mit
|
connectionEscaping :: Connection -> Escaping IO
connectionEscaping connection =
Escaping
{ escapeStringLiteral = Conn.escapeStringLiteral connection
}
| 160
|
connectionEscaping :: Connection -> Escaping IO
connectionEscaping connection =
Escaping
{ escapeStringLiteral = Conn.escapeStringLiteral connection
}
| 160
|
connectionEscaping connection =
Escaping
{ escapeStringLiteral = Conn.escapeStringLiteral connection
}
| 112
| false
| true
| 0
| 9
| 25
| 42
| 19
| 23
| null | null |
ezyang/ghc
|
libraries/template-haskell/Language/Haskell/TH/PprLib.hs
|
bsd-3-clause
|
lbrack = return HPJ.lbrack
| 26
|
lbrack = return HPJ.lbrack
| 26
|
lbrack = return HPJ.lbrack
| 26
| false
| false
| 1
| 6
| 3
| 15
| 5
| 10
| null | null |
romanb/amazonka
|
amazonka-iam/gen/Network/AWS/IAM/Types.hs
|
mpl-2.0
|
-- | The date and time when the SAML provider was created.
samlpleCreateDate :: Lens' SAMLProviderListEntry (Maybe UTCTime)
samlpleCreateDate =
lens _samlpleCreateDate (\s a -> s { _samlpleCreateDate = a })
. mapping _Time
| 234
|
samlpleCreateDate :: Lens' SAMLProviderListEntry (Maybe UTCTime)
samlpleCreateDate =
lens _samlpleCreateDate (\s a -> s { _samlpleCreateDate = a })
. mapping _Time
| 175
|
samlpleCreateDate =
lens _samlpleCreateDate (\s a -> s { _samlpleCreateDate = a })
. mapping _Time
| 110
| true
| true
| 2
| 8
| 45
| 60
| 28
| 32
| null | null |
apyrgio/ganeti
|
src/Ganeti/Utils/Monad.hs
|
bsd-2-clause
|
-- | See 'Data.List.unfoldr'. This is a monad-friendly version of that, with a
-- twist. Rather than returning a list, it returns any MonadPlus type of your
-- choice.
unfoldrM' :: (Monad m, MonadPlus f) => (a -> m (Maybe (b,a))) -> a -> m (f b)
unfoldrM' f z = do
x <- f z
case x of
Nothing -> return mzero
Just (x', z') -> do
xs <- unfoldrM' f z'
return (return x' `mplus` xs)
| 484
|
unfoldrM' :: (Monad m, MonadPlus f) => (a -> m (Maybe (b,a))) -> a -> m (f b)
unfoldrM' f z = do
x <- f z
case x of
Nothing -> return mzero
Just (x', z') -> do
xs <- unfoldrM' f z'
return (return x' `mplus` xs)
| 316
|
unfoldrM' f z = do
x <- f z
case x of
Nothing -> return mzero
Just (x', z') -> do
xs <- unfoldrM' f z'
return (return x' `mplus` xs)
| 238
| true
| true
| 0
| 15
| 183
| 144
| 72
| 72
| null | null |
brendanhay/gogol
|
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Projects/Get.hs
|
mpl-2.0
|
-- | Project ID.
proId :: Lens' ProjectsGet Int64
proId
= lens _proId (\ s a -> s{_proId = a}) . _Coerce
| 106
|
proId :: Lens' ProjectsGet Int64
proId
= lens _proId (\ s a -> s{_proId = a}) . _Coerce
| 89
|
proId
= lens _proId (\ s a -> s{_proId = a}) . _Coerce
| 56
| true
| true
| 0
| 10
| 23
| 46
| 24
| 22
| null | null |
mcschroeder/ghc
|
compiler/nativeGen/PIC.hs
|
bsd-3-clause
|
-- Emit GOT declaration
-- Output whatever needs to be output once per .s file.
pprGotDeclaration dflags arch os
| osElfTarget os
, arch /= ArchPPC_64 ELF_V1 && arch /= ArchPPC_64 ELF_V2
, not (gopt Opt_PIC dflags)
= empty
| osElfTarget os
, arch /= ArchPPC_64 ELF_V1 && arch /= ArchPPC_64 ELF_V2
= vcat [
-- See Note [.LCTOC1 in PPC PIC code]
text ".section \".got2\",\"aw\"",
text ".LCTOC1 = .+32768" ]
| 509
|
pprGotDeclaration dflags arch os
| osElfTarget os
, arch /= ArchPPC_64 ELF_V1 && arch /= ArchPPC_64 ELF_V2
, not (gopt Opt_PIC dflags)
= empty
| osElfTarget os
, arch /= ArchPPC_64 ELF_V1 && arch /= ArchPPC_64 ELF_V2
= vcat [
-- See Note [.LCTOC1 in PPC PIC code]
text ".section \".got2\",\"aw\"",
text ".LCTOC1 = .+32768" ]
| 429
|
pprGotDeclaration dflags arch os
| osElfTarget os
, arch /= ArchPPC_64 ELF_V1 && arch /= ArchPPC_64 ELF_V2
, not (gopt Opt_PIC dflags)
= empty
| osElfTarget os
, arch /= ArchPPC_64 ELF_V1 && arch /= ArchPPC_64 ELF_V2
= vcat [
-- See Note [.LCTOC1 in PPC PIC code]
text ".section \".got2\",\"aw\"",
text ".LCTOC1 = .+32768" ]
| 429
| true
| false
| 0
| 11
| 175
| 119
| 53
| 66
| null | null |
ppetr/disjoint-sets-st
|
Data/DisjointSet.hs
|
bsd-3-clause
|
getRank :: (MArray a Int m) => DSet a -> Int -> m Int
getRank (DSet _ _ rs) = readArray rs
| 90
|
getRank :: (MArray a Int m) => DSet a -> Int -> m Int
getRank (DSet _ _ rs) = readArray rs
| 90
|
getRank (DSet _ _ rs) = readArray rs
| 36
| false
| true
| 0
| 8
| 21
| 54
| 26
| 28
| null | null |
brendanhay/gogol
|
gogol-plus/gen/Network/Google/Plus/Types/Product.hs
|
mpl-2.0
|
-- | The URL of the person\'s profile photo. To resize the image and crop it
-- to a square, append the query string ?sz=x, where x is the dimension in
-- pixels of each side.
piURL :: Lens' PersonImage (Maybe Text)
piURL = lens _piURL (\ s a -> s{_piURL = a})
| 260
|
piURL :: Lens' PersonImage (Maybe Text)
piURL = lens _piURL (\ s a -> s{_piURL = a})
| 84
|
piURL = lens _piURL (\ s a -> s{_piURL = a})
| 44
| true
| true
| 1
| 9
| 52
| 51
| 27
| 24
| null | null |
jthornber/XMonadContrib
|
XMonad/Hooks/DebugEvents.hs
|
bsd-3-clause
|
isCountOf :: String -> String -> Bool
-- note that \NUL is safe because atom names have to be C strings
s `isCountOf` pfx = null $
dropWhile isDigit $
map fst $
dropWhile (uncurry (==)) $
zip s $
pfx ++ repeat '\NUL'
| 393
|
isCountOf :: String -> String -> Bool
s `isCountOf` pfx = null $
dropWhile isDigit $
map fst $
dropWhile (uncurry (==)) $
zip s $
pfx ++ repeat '\NUL'
| 327
|
s `isCountOf` pfx = null $
dropWhile isDigit $
map fst $
dropWhile (uncurry (==)) $
zip s $
pfx ++ repeat '\NUL'
| 281
| true
| true
| 2
| 9
| 220
| 82
| 39
| 43
| null | null |
alexander-at-github/eta
|
compiler/ETA/Prelude/PrelNames.hs
|
bsd-3-clause
|
encodeDoubleIntegerName = varQual gHC_INTEGER_TYPE (fsLit "encodeDoubleInteger") encodeDoubleIntegerIdKey
| 105
|
encodeDoubleIntegerName = varQual gHC_INTEGER_TYPE (fsLit "encodeDoubleInteger") encodeDoubleIntegerIdKey
| 105
|
encodeDoubleIntegerName = varQual gHC_INTEGER_TYPE (fsLit "encodeDoubleInteger") encodeDoubleIntegerIdKey
| 105
| false
| false
| 1
| 7
| 6
| 22
| 9
| 13
| null | null |
Stratege/Coevolutionary-Neural-Network
|
globalthermonuclearwarAI.hs
|
mit
|
a = PCG.perceptronGeneticAlgorithm [21,15,9,4] 2 fitnessFunc
| 60
|
a = PCG.perceptronGeneticAlgorithm [21,15,9,4] 2 fitnessFunc
| 60
|
a = PCG.perceptronGeneticAlgorithm [21,15,9,4] 2 fitnessFunc
| 60
| false
| false
| 1
| 6
| 5
| 30
| 15
| 15
| null | null |
DavidAlphaFox/ghc
|
libraries/haskeline/System/Console/Haskeline/RunCommand.hs
|
bsd-3-clause
|
applyKeysToCmd :: Monad m => [Key] -> CmdM m (a,[Key])
-> CmdM m (a,[Key])
applyKeysToCmd ks (GetKey next) = applyKeysToMap ks next
| 163
|
applyKeysToCmd :: Monad m => [Key] -> CmdM m (a,[Key])
-> CmdM m (a,[Key])
applyKeysToCmd ks (GetKey next) = applyKeysToMap ks next
| 163
|
applyKeysToCmd ks (GetKey next) = applyKeysToMap ks next
| 56
| false
| true
| 0
| 10
| 53
| 73
| 38
| 35
| null | null |
flyrry/phonypony
|
src/DumbBot/Pathfinding.hs
|
mit
|
walk :: Hero -> Path -> Dir
walk _ (Path []) = Stay
| 51
|
walk :: Hero -> Path -> Dir
walk _ (Path []) = Stay
| 51
|
walk _ (Path []) = Stay
| 23
| false
| true
| 0
| 11
| 12
| 38
| 17
| 21
| null | null |
fmapfmapfmap/amazonka
|
amazonka-elastictranscoder/gen/Network/AWS/ElasticTranscoder/Types.hs
|
mpl-2.0
|
-- | Elastic Transcoder encountered an unexpected exception while trying to
-- fulfill the request.
_InternalServiceException :: AsError a => Getting (First ServiceError) a ServiceError
_InternalServiceException = _ServiceError . hasCode "InternalServiceException"
| 264
|
_InternalServiceException :: AsError a => Getting (First ServiceError) a ServiceError
_InternalServiceException = _ServiceError . hasCode "InternalServiceException"
| 164
|
_InternalServiceException = _ServiceError . hasCode "InternalServiceException"
| 78
| true
| true
| 0
| 8
| 30
| 40
| 20
| 20
| null | null |
solatis/haskell-bitcoin-api
|
src/Network/Bitcoin/Api/Wallet.hs
|
mit
|
-- | Lists all accounts currently known by the wallet with default parameters
listAccounts :: T.Client
-> IO [(BT.Account, BT.Btc)]
listAccounts client = listAccountsWith client 1 False
| 198
|
listAccounts :: T.Client
-> IO [(BT.Account, BT.Btc)]
listAccounts client = listAccountsWith client 1 False
| 120
|
listAccounts client = listAccountsWith client 1 False
| 53
| true
| true
| 0
| 9
| 39
| 44
| 23
| 21
| null | null |
phischu/fragnix
|
builtins/ghc-prim/GHC.Prim.hs
|
bsd-3-clause
|
-- | Insert a scalar at the given position in a vector.
insertInt64X4# :: Int64X4# -> Int# -> Int# -> Int64X4#
insertInt64X4# = insertInt64X4#
| 144
|
insertInt64X4# :: Int64X4# -> Int# -> Int# -> Int64X4#
insertInt64X4# = insertInt64X4#
| 86
|
insertInt64X4# = insertInt64X4#
| 31
| true
| true
| 0
| 9
| 25
| 31
| 14
| 17
| null | null |
peterokagey/haskellOEIS
|
src/HelperSequences/A013929.hs
|
apache-2.0
|
nonSquarefree = any (>1) . map snd . primePowers
| 48
|
nonSquarefree = any (>1) . map snd . primePowers
| 48
|
nonSquarefree = any (>1) . map snd . primePowers
| 48
| false
| false
| 2
| 5
| 8
| 28
| 12
| 16
| null | null |
haskell-lisp/historic-lisk
|
src/Language/Lisk/Parser.hs
|
bsd-3-clause
|
liskImportDeclModuleSpec = parens $ do
name <- liskImportDeclModuleName
qualification <- optional $ spaces1 *> string ":as" *> spaces1 *>
liskModuleName
return name { importQualified = isJust qualification
, importAs = qualification }
| 284
|
liskImportDeclModuleSpec = parens $ do
name <- liskImportDeclModuleName
qualification <- optional $ spaces1 *> string ":as" *> spaces1 *>
liskModuleName
return name { importQualified = isJust qualification
, importAs = qualification }
| 284
|
liskImportDeclModuleSpec = parens $ do
name <- liskImportDeclModuleName
qualification <- optional $ spaces1 *> string ":as" *> spaces1 *>
liskModuleName
return name { importQualified = isJust qualification
, importAs = qualification }
| 284
| false
| false
| 0
| 12
| 81
| 66
| 32
| 34
| null | null |
frantisekfarka/ghc-dsi
|
compiler/nativeGen/X86/Ppr.hs
|
bsd-3-clause
|
pprImm (ImmFloat _) = ptext (sLit "naughty float immediate")
| 61
|
pprImm (ImmFloat _) = ptext (sLit "naughty float immediate")
| 61
|
pprImm (ImmFloat _) = ptext (sLit "naughty float immediate")
| 61
| false
| false
| 0
| 7
| 9
| 25
| 11
| 14
| null | null |
feliposz/learning-stuff
|
haskell/h4c.hs
|
mit
|
-- :l C:\Local\Dev\haskell\h4c.hs
-- Exemplos do tutorial http://www.haskell.org/haskellwiki/Haskell_Tutorial_for_C_Programmers
-- 2.5
-- Uma implementação recursiva de fib que usa uma função auxiliar geradora
fib :: Integer -> Integer
fib n = fibGen 0 1 n
| 260
|
fib :: Integer -> Integer
fib n = fibGen 0 1 n
| 46
|
fib n = fibGen 0 1 n
| 20
| true
| true
| 0
| 5
| 37
| 29
| 16
| 13
| null | null |
seppeljordan/simplechat2
|
src/Network/SimpleChat/Classes.hs
|
gpl-3.0
|
-- | Add a singleton to the left side of a monoid
(<|) :: (Applicative d, Monoid (d a)) =>
a -> d a -> d a
(<|) single deque = pure single <> deque
| 155
|
(<|) :: (Applicative d, Monoid (d a)) =>
a -> d a -> d a
(<|) single deque = pure single <> deque
| 105
|
(<|) single deque = pure single <> deque
| 40
| true
| true
| 0
| 8
| 42
| 63
| 33
| 30
| null | null |
fuchsto/drool
|
src/Drool/UI/Visuals/Blank.hs
|
mit
|
newBlankVisual :: Visual
newBlankVisual = Visual { dimensions = noneDimensions,
update = noneUpdate,
render = noneRender }
| 184
|
newBlankVisual :: Visual
newBlankVisual = Visual { dimensions = noneDimensions,
update = noneUpdate,
render = noneRender }
| 184
|
newBlankVisual = Visual { dimensions = noneDimensions,
update = noneUpdate,
render = noneRender }
| 159
| false
| true
| 0
| 6
| 78
| 31
| 19
| 12
| null | null |
topliceanu/learn
|
haskell/functions.hs
|
mit
|
second' :: (a, b, c) -> b
second' (_, y, _) = y
| 47
|
second' :: (a, b, c) -> b
second' (_, y, _) = y
| 47
|
second' (_, y, _) = y
| 21
| false
| true
| 0
| 8
| 12
| 42
| 22
| 20
| null | null |
sdiehl/ghc
|
libraries/base/GHC/Event/Manager.hs
|
bsd-3-clause
|
-- | Create a new 'EventManager' with the given polling backend.
newWith :: Backend -> IO EventManager
newWith be = do
iofds <- fmap (listArray (0, callbackArraySize-1)) $
replicateM callbackArraySize (newMVar =<< IT.new 8)
ctrl <- newControl False
state <- newIORef Created
us <- newSource
_ <- mkWeakIORef state $ do
st <- atomicModifyIORef' state $ \s -> (Finished, s)
when (st /= Finished) $ do
I.delete be
closeControl ctrl
lockVar <- newMVar ()
let mgr = EventManager { emBackend = be
, emFds = iofds
, emState = state
, emUniqueSource = us
, emControl = ctrl
, emLock = lockVar
}
registerControlFd mgr (controlReadFd ctrl) evtRead
registerControlFd mgr (wakeupReadFd ctrl) evtRead
return mgr
where
replicateM n x = sequence (replicate n x)
| 997
|
newWith :: Backend -> IO EventManager
newWith be = do
iofds <- fmap (listArray (0, callbackArraySize-1)) $
replicateM callbackArraySize (newMVar =<< IT.new 8)
ctrl <- newControl False
state <- newIORef Created
us <- newSource
_ <- mkWeakIORef state $ do
st <- atomicModifyIORef' state $ \s -> (Finished, s)
when (st /= Finished) $ do
I.delete be
closeControl ctrl
lockVar <- newMVar ()
let mgr = EventManager { emBackend = be
, emFds = iofds
, emState = state
, emUniqueSource = us
, emControl = ctrl
, emLock = lockVar
}
registerControlFd mgr (controlReadFd ctrl) evtRead
registerControlFd mgr (wakeupReadFd ctrl) evtRead
return mgr
where
replicateM n x = sequence (replicate n x)
| 932
|
newWith be = do
iofds <- fmap (listArray (0, callbackArraySize-1)) $
replicateM callbackArraySize (newMVar =<< IT.new 8)
ctrl <- newControl False
state <- newIORef Created
us <- newSource
_ <- mkWeakIORef state $ do
st <- atomicModifyIORef' state $ \s -> (Finished, s)
when (st /= Finished) $ do
I.delete be
closeControl ctrl
lockVar <- newMVar ()
let mgr = EventManager { emBackend = be
, emFds = iofds
, emState = state
, emUniqueSource = us
, emControl = ctrl
, emLock = lockVar
}
registerControlFd mgr (controlReadFd ctrl) evtRead
registerControlFd mgr (wakeupReadFd ctrl) evtRead
return mgr
where
replicateM n x = sequence (replicate n x)
| 894
| true
| true
| 0
| 15
| 374
| 287
| 138
| 149
| null | null |
ambiata/highlighting-kate
|
Text/Highlighting/Kate/Syntax/Ocaml.hs
|
gpl-2.0
|
parseRules ("Objective Caml","String Constant") =
(((pDetectChar False '"' >>= withAttribute StringTok) >>~ (popContext))
<|>
((pRegExpr regex_'28'5c'5c'5bntbr'27'22'5c'5c'5d'7c'5c'5c'5b0'2d9'5d'7b3'7d'7c'5c'5cx'5b0'2d9A'2dFa'2df'5d'7b2'7d'29 >>= withAttribute CharTok))
<|>
((pRegExpr regex_'5c'5c'24 >>= withAttribute CharTok))
<|>
(currentContext >>= \x -> guard (x == ("Objective Caml","String Constant")) >> pDefault >>= withAttribute StringTok))
| 471
|
parseRules ("Objective Caml","String Constant") =
(((pDetectChar False '"' >>= withAttribute StringTok) >>~ (popContext))
<|>
((pRegExpr regex_'28'5c'5c'5bntbr'27'22'5c'5c'5d'7c'5c'5c'5b0'2d9'5d'7b3'7d'7c'5c'5cx'5b0'2d9A'2dFa'2df'5d'7b2'7d'29 >>= withAttribute CharTok))
<|>
((pRegExpr regex_'5c'5c'24 >>= withAttribute CharTok))
<|>
(currentContext >>= \x -> guard (x == ("Objective Caml","String Constant")) >> pDefault >>= withAttribute StringTok))
| 471
|
parseRules ("Objective Caml","String Constant") =
(((pDetectChar False '"' >>= withAttribute StringTok) >>~ (popContext))
<|>
((pRegExpr regex_'28'5c'5c'5bntbr'27'22'5c'5c'5d'7c'5c'5c'5b0'2d9'5d'7b3'7d'7c'5c'5cx'5b0'2d9A'2dFa'2df'5d'7b2'7d'29 >>= withAttribute CharTok))
<|>
((pRegExpr regex_'5c'5c'24 >>= withAttribute CharTok))
<|>
(currentContext >>= \x -> guard (x == ("Objective Caml","String Constant")) >> pDefault >>= withAttribute StringTok))
| 471
| false
| false
| 0
| 15
| 60
| 126
| 66
| 60
| null | null |
weeeeeew/petulant-cyril
|
exercise1/given.hs
|
unlicense
|
fft as = interleave ls rs
where
(cs,ds) = bflyS as
ls = fft cs
rs = fft ds
| 92
|
fft as = interleave ls rs
where
(cs,ds) = bflyS as
ls = fft cs
rs = fft ds
| 92
|
fft as = interleave ls rs
where
(cs,ds) = bflyS as
ls = fft cs
rs = fft ds
| 92
| false
| false
| 3
| 5
| 36
| 59
| 23
| 36
| null | null |
beni55/pandoc
|
src/Text/Pandoc/Writers/Docbook.hs
|
gpl-2.0
|
-- raw XML block
blockToDocbook _ (RawBlock _ _) = empty
| 56
|
blockToDocbook _ (RawBlock _ _) = empty
| 39
|
blockToDocbook _ (RawBlock _ _) = empty
| 39
| true
| false
| 1
| 6
| 10
| 23
| 10
| 13
| null | null |
Helium4Haskell/helium
|
lib/List.hs
|
gpl-3.0
|
deleteBy eq x (y:ys) = if x `eq` y then ys else y : deleteBy eq x ys
| 72
|
deleteBy eq x (y:ys) = if x `eq` y then ys else y : deleteBy eq x ys
| 72
|
deleteBy eq x (y:ys) = if x `eq` y then ys else y : deleteBy eq x ys
| 72
| false
| false
| 0
| 7
| 21
| 48
| 24
| 24
| null | null |
Fuuzetsu/haddock
|
haddock-api/test/Haddock/Backends/Hyperlinker/ParserSpec.hs
|
bsd-2-clause
|
parseSpec :: Spec
parseSpec = around withDynFlags $ do
it "is total" $ \dflags ->
property $ \src -> length (parse dflags "" src) `shouldSatisfy` (>= 0)
it "retains file layout" $ \dflags ->
property $ \(NoGhcRewrite src) -> concatMap tkValue (parse dflags "" src) == src
context "when parsing single-line comments" $ do
it "should ignore content until the end of line" $ \dflags ->
shouldParseTo
"-- some very simple comment\nidentifier"
[TkComment, TkSpace, TkIdentifier]
dflags
it "should allow endline escaping" $ \dflags ->
shouldParseTo
"#define first line\\\nsecond line\\\nand another one"
[TkCpp]
dflags
context "when parsing multi-line comments" $ do
it "should support nested comments" $ \dflags ->
shouldParseTo
"{- comment {- nested -} still comment -} {- next comment -}"
[TkComment, TkSpace, TkComment]
dflags
it "should distinguish compiler pragma" $ \dflags ->
shouldParseTo
"{- comment -}{-# LANGUAGE GADTs #-}{- comment -}"
[TkComment, TkPragma, TkComment]
dflags
it "should recognize preprocessor directives" $ \dflags -> do
shouldParseTo
"\n#define foo bar"
[TkSpace, TkCpp]
dflags
shouldParseTo
"x # y"
[TkIdentifier, TkSpace, TkOperator, TkSpace,TkIdentifier]
dflags
it "should distinguish basic language constructs" $ \dflags -> do
shouldParseTo
"(* 2) <$> (\"abc\", foo)"
[ TkSpecial, TkOperator, TkSpace, TkNumber, TkSpecial
, TkSpace, TkOperator, TkSpace
, TkSpecial, TkString, TkSpecial, TkSpace, TkIdentifier, TkSpecial
]
dflags
shouldParseTo
"let foo' = foo in foo' + foo'"
[ TkKeyword, TkSpace, TkIdentifier
, TkSpace, TkGlyph, TkSpace
, TkIdentifier, TkSpace, TkKeyword, TkSpace
, TkIdentifier, TkSpace, TkOperator, TkSpace, TkIdentifier
]
dflags
shouldParseTo
"square x = y^2 where y = x"
[ TkIdentifier, TkSpace, TkIdentifier
, TkSpace, TkGlyph, TkSpace
, TkIdentifier, TkOperator, TkNumber
, TkSpace, TkKeyword, TkSpace
, TkIdentifier, TkSpace, TkGlyph, TkSpace, TkIdentifier
]
dflags
it "should parse do-notation syntax" $ \dflags -> do
shouldParseTo
"do { foo <- getLine; putStrLn foo }"
[ TkKeyword, TkSpace, TkSpecial, TkSpace
, TkIdentifier, TkSpace, TkGlyph, TkSpace
, TkIdentifier, TkSpecial, TkSpace
, TkIdentifier, TkSpace, TkIdentifier, TkSpace, TkSpecial
]
dflags
shouldParseTo
(unlines
[ "do"
, " foo <- getLine"
, " putStrLn foo"
])
[ TkKeyword, TkSpace, TkIdentifier
, TkSpace, TkGlyph, TkSpace, TkIdentifier, TkSpace
, TkIdentifier, TkSpace, TkIdentifier, TkSpace
]
dflags
where
shouldParseTo :: String -> [TokenType] -> GHC.DynFlags -> Expectation
shouldParseTo str tokens dflags = map tkType (parse dflags "" str) `shouldBe` tokens
| 3,590
|
parseSpec :: Spec
parseSpec = around withDynFlags $ do
it "is total" $ \dflags ->
property $ \src -> length (parse dflags "" src) `shouldSatisfy` (>= 0)
it "retains file layout" $ \dflags ->
property $ \(NoGhcRewrite src) -> concatMap tkValue (parse dflags "" src) == src
context "when parsing single-line comments" $ do
it "should ignore content until the end of line" $ \dflags ->
shouldParseTo
"-- some very simple comment\nidentifier"
[TkComment, TkSpace, TkIdentifier]
dflags
it "should allow endline escaping" $ \dflags ->
shouldParseTo
"#define first line\\\nsecond line\\\nand another one"
[TkCpp]
dflags
context "when parsing multi-line comments" $ do
it "should support nested comments" $ \dflags ->
shouldParseTo
"{- comment {- nested -} still comment -} {- next comment -}"
[TkComment, TkSpace, TkComment]
dflags
it "should distinguish compiler pragma" $ \dflags ->
shouldParseTo
"{- comment -}{-# LANGUAGE GADTs #-}{- comment -}"
[TkComment, TkPragma, TkComment]
dflags
it "should recognize preprocessor directives" $ \dflags -> do
shouldParseTo
"\n#define foo bar"
[TkSpace, TkCpp]
dflags
shouldParseTo
"x # y"
[TkIdentifier, TkSpace, TkOperator, TkSpace,TkIdentifier]
dflags
it "should distinguish basic language constructs" $ \dflags -> do
shouldParseTo
"(* 2) <$> (\"abc\", foo)"
[ TkSpecial, TkOperator, TkSpace, TkNumber, TkSpecial
, TkSpace, TkOperator, TkSpace
, TkSpecial, TkString, TkSpecial, TkSpace, TkIdentifier, TkSpecial
]
dflags
shouldParseTo
"let foo' = foo in foo' + foo'"
[ TkKeyword, TkSpace, TkIdentifier
, TkSpace, TkGlyph, TkSpace
, TkIdentifier, TkSpace, TkKeyword, TkSpace
, TkIdentifier, TkSpace, TkOperator, TkSpace, TkIdentifier
]
dflags
shouldParseTo
"square x = y^2 where y = x"
[ TkIdentifier, TkSpace, TkIdentifier
, TkSpace, TkGlyph, TkSpace
, TkIdentifier, TkOperator, TkNumber
, TkSpace, TkKeyword, TkSpace
, TkIdentifier, TkSpace, TkGlyph, TkSpace, TkIdentifier
]
dflags
it "should parse do-notation syntax" $ \dflags -> do
shouldParseTo
"do { foo <- getLine; putStrLn foo }"
[ TkKeyword, TkSpace, TkSpecial, TkSpace
, TkIdentifier, TkSpace, TkGlyph, TkSpace
, TkIdentifier, TkSpecial, TkSpace
, TkIdentifier, TkSpace, TkIdentifier, TkSpace, TkSpecial
]
dflags
shouldParseTo
(unlines
[ "do"
, " foo <- getLine"
, " putStrLn foo"
])
[ TkKeyword, TkSpace, TkIdentifier
, TkSpace, TkGlyph, TkSpace, TkIdentifier, TkSpace
, TkIdentifier, TkSpace, TkIdentifier, TkSpace
]
dflags
where
shouldParseTo :: String -> [TokenType] -> GHC.DynFlags -> Expectation
shouldParseTo str tokens dflags = map tkType (parse dflags "" str) `shouldBe` tokens
| 3,590
|
parseSpec = around withDynFlags $ do
it "is total" $ \dflags ->
property $ \src -> length (parse dflags "" src) `shouldSatisfy` (>= 0)
it "retains file layout" $ \dflags ->
property $ \(NoGhcRewrite src) -> concatMap tkValue (parse dflags "" src) == src
context "when parsing single-line comments" $ do
it "should ignore content until the end of line" $ \dflags ->
shouldParseTo
"-- some very simple comment\nidentifier"
[TkComment, TkSpace, TkIdentifier]
dflags
it "should allow endline escaping" $ \dflags ->
shouldParseTo
"#define first line\\\nsecond line\\\nand another one"
[TkCpp]
dflags
context "when parsing multi-line comments" $ do
it "should support nested comments" $ \dflags ->
shouldParseTo
"{- comment {- nested -} still comment -} {- next comment -}"
[TkComment, TkSpace, TkComment]
dflags
it "should distinguish compiler pragma" $ \dflags ->
shouldParseTo
"{- comment -}{-# LANGUAGE GADTs #-}{- comment -}"
[TkComment, TkPragma, TkComment]
dflags
it "should recognize preprocessor directives" $ \dflags -> do
shouldParseTo
"\n#define foo bar"
[TkSpace, TkCpp]
dflags
shouldParseTo
"x # y"
[TkIdentifier, TkSpace, TkOperator, TkSpace,TkIdentifier]
dflags
it "should distinguish basic language constructs" $ \dflags -> do
shouldParseTo
"(* 2) <$> (\"abc\", foo)"
[ TkSpecial, TkOperator, TkSpace, TkNumber, TkSpecial
, TkSpace, TkOperator, TkSpace
, TkSpecial, TkString, TkSpecial, TkSpace, TkIdentifier, TkSpecial
]
dflags
shouldParseTo
"let foo' = foo in foo' + foo'"
[ TkKeyword, TkSpace, TkIdentifier
, TkSpace, TkGlyph, TkSpace
, TkIdentifier, TkSpace, TkKeyword, TkSpace
, TkIdentifier, TkSpace, TkOperator, TkSpace, TkIdentifier
]
dflags
shouldParseTo
"square x = y^2 where y = x"
[ TkIdentifier, TkSpace, TkIdentifier
, TkSpace, TkGlyph, TkSpace
, TkIdentifier, TkOperator, TkNumber
, TkSpace, TkKeyword, TkSpace
, TkIdentifier, TkSpace, TkGlyph, TkSpace, TkIdentifier
]
dflags
it "should parse do-notation syntax" $ \dflags -> do
shouldParseTo
"do { foo <- getLine; putStrLn foo }"
[ TkKeyword, TkSpace, TkSpecial, TkSpace
, TkIdentifier, TkSpace, TkGlyph, TkSpace
, TkIdentifier, TkSpecial, TkSpace
, TkIdentifier, TkSpace, TkIdentifier, TkSpace, TkSpecial
]
dflags
shouldParseTo
(unlines
[ "do"
, " foo <- getLine"
, " putStrLn foo"
])
[ TkKeyword, TkSpace, TkIdentifier
, TkSpace, TkGlyph, TkSpace, TkIdentifier, TkSpace
, TkIdentifier, TkSpace, TkIdentifier, TkSpace
]
dflags
where
shouldParseTo :: String -> [TokenType] -> GHC.DynFlags -> Expectation
shouldParseTo str tokens dflags = map tkType (parse dflags "" str) `shouldBe` tokens
| 3,572
| false
| true
| 0
| 15
| 1,369
| 683
| 376
| 307
| null | null |
phischu/fragnix
|
builtins/base/Data.Typeable.Internal.hs
|
bsd-3-clause
|
showArgs _ [a] = showsPrec 10 a
| 36
|
showArgs _ [a] = showsPrec 10 a
| 36
|
showArgs _ [a] = showsPrec 10 a
| 36
| false
| false
| 0
| 6
| 11
| 19
| 9
| 10
| null | null |
hvr/time
|
test/Test/TestParseTime.hs
|
bsd-3-clause
|
castFormatString :: FormatString a -> FormatString b
castFormatString (FormatString f) = FormatString f
| 103
|
castFormatString :: FormatString a -> FormatString b
castFormatString (FormatString f) = FormatString f
| 103
|
castFormatString (FormatString f) = FormatString f
| 50
| false
| true
| 0
| 7
| 12
| 33
| 15
| 18
| null | null |
jwiegley/ghc-release
|
libraries/Cabal/cabal/Distribution/Simple/Setup.hs
|
gpl-3.0
|
defaultTestFlags :: TestFlags
defaultTestFlags = TestFlags {
testDistPref = Flag defaultDistPref,
testVerbosity = Flag normal,
testHumanLog = toFlag $ toPathTemplate $ "$pkgid-$test-suite.log",
testMachineLog = toFlag $ toPathTemplate $ "$pkgid.log",
testShowDetails = toFlag Failures,
testKeepTix = toFlag False,
testList = Flag [],
testOptions = []
}
| 411
|
defaultTestFlags :: TestFlags
defaultTestFlags = TestFlags {
testDistPref = Flag defaultDistPref,
testVerbosity = Flag normal,
testHumanLog = toFlag $ toPathTemplate $ "$pkgid-$test-suite.log",
testMachineLog = toFlag $ toPathTemplate $ "$pkgid.log",
testShowDetails = toFlag Failures,
testKeepTix = toFlag False,
testList = Flag [],
testOptions = []
}
| 411
|
defaultTestFlags = TestFlags {
testDistPref = Flag defaultDistPref,
testVerbosity = Flag normal,
testHumanLog = toFlag $ toPathTemplate $ "$pkgid-$test-suite.log",
testMachineLog = toFlag $ toPathTemplate $ "$pkgid.log",
testShowDetails = toFlag Failures,
testKeepTix = toFlag False,
testList = Flag [],
testOptions = []
}
| 381
| false
| true
| 0
| 8
| 103
| 96
| 54
| 42
| null | null |
anton-k/sharc-timbre
|
src/Sharc/Instruments/ContrabassMuted.hs
|
bsd-3-clause
|
note20 :: Note
note20 = Note
(Pitch 103.826 32 "g#2")
21
(Range
(NoteRange
(NoteRangeAmplitude 6437.21 62 9.0e-2)
(NoteRangeHarmonicFreq 1 103.82))
(NoteRange
(NoteRangeAmplitude 103.82 1 3109.0)
(NoteRangeHarmonicFreq 96 9967.29)))
[Harmonic 1 (-1.326) 3109.0
,Harmonic 2 (-2.33) 1483.37
,Harmonic 3 (-2.781) 476.21
,Harmonic 4 0.983 113.74
,Harmonic 5 1.101 305.72
,Harmonic 6 (-1.038) 291.01
,Harmonic 7 2.252 217.83
,Harmonic 8 (-1.082) 371.13
,Harmonic 9 (-4.7e-2) 242.1
,Harmonic 10 (-2.247) 161.36
,Harmonic 11 0.546 134.36
,Harmonic 12 (-2.072) 12.97
,Harmonic 13 (-1.322) 80.12
,Harmonic 14 (-1.238) 108.1
,Harmonic 15 1.665 50.15
,Harmonic 16 1.56 4.55
,Harmonic 17 1.392 24.09
,Harmonic 18 (-7.7e-2) 38.31
,Harmonic 19 (-1.544) 29.5
,Harmonic 20 2.041 40.14
,Harmonic 21 (-1.47) 40.93
,Harmonic 22 (-9.8e-2) 16.25
,Harmonic 23 (-0.876) 27.77
,Harmonic 24 2.569 12.07
,Harmonic 25 (-0.476) 21.44
,Harmonic 26 (-2.064) 4.45
,Harmonic 27 (-1.646) 15.25
,Harmonic 28 (-2.938) 27.44
,Harmonic 29 2.788 14.28
,Harmonic 30 1.112 17.55
,Harmonic 31 2.365 25.91
,Harmonic 32 (-2.716) 11.9
,Harmonic 33 (-2.738) 7.05
,Harmonic 34 (-2.93) 2.23
,Harmonic 35 2.352 9.84
,Harmonic 36 (-1.816) 1.32
,Harmonic 37 1.764 3.7
,Harmonic 38 (-3.011) 4.82
,Harmonic 39 0.82 6.89
,Harmonic 40 (-0.901) 3.66
,Harmonic 41 5.3e-2 7.67
,Harmonic 42 (-0.754) 2.66
,Harmonic 43 (-0.463) 12.34
,Harmonic 44 (-0.521) 2.04
,Harmonic 45 0.227 0.78
,Harmonic 46 3.063 1.64
,Harmonic 47 1.802 1.76
,Harmonic 48 (-0.605) 1.07
,Harmonic 49 1.902 1.99
,Harmonic 50 (-1.522) 3.64
,Harmonic 51 (-0.182) 2.84
,Harmonic 52 (-2.906) 2.28
,Harmonic 53 (-1.94) 1.52
,Harmonic 54 1.603 1.16
,Harmonic 55 2.568 1.19
,Harmonic 56 (-1.477) 1.46
,Harmonic 57 2.802 0.74
,Harmonic 58 (-0.561) 1.86
,Harmonic 59 (-2.595) 0.96
,Harmonic 60 0.18 6.27
,Harmonic 61 2.522 1.97
,Harmonic 62 2.943 9.0e-2
,Harmonic 63 0.809 2.08
,Harmonic 64 1.978 1.32
,Harmonic 65 (-2.356) 2.01
,Harmonic 66 (-1.62) 0.83
,Harmonic 67 0.482 1.44
,Harmonic 68 (-2.303) 1.15
,Harmonic 69 2.035 0.5
,Harmonic 70 2.127 0.23
,Harmonic 71 (-1.569) 0.14
,Harmonic 72 (-0.631) 0.63
,Harmonic 73 2.666 0.83
,Harmonic 74 (-3.104) 0.98
,Harmonic 75 (-1.612) 0.49
,Harmonic 76 1.497 0.72
,Harmonic 77 1.819 0.95
,Harmonic 78 0.78 0.26
,Harmonic 79 1.168 0.51
,Harmonic 80 1.694 0.43
,Harmonic 81 (-0.234) 0.92
,Harmonic 82 1.796 1.17
,Harmonic 83 1.687 0.42
,Harmonic 84 (-0.858) 0.71
,Harmonic 85 (-0.503) 0.51
,Harmonic 86 (-2.753) 0.64
,Harmonic 87 (-0.944) 0.87
,Harmonic 88 1.618 0.32
,Harmonic 89 (-3.081) 0.63
,Harmonic 90 (-2.129) 1.37
,Harmonic 91 3.4e-2 0.6
,Harmonic 92 2.026 1.67
,Harmonic 93 (-1.424) 0.51
,Harmonic 94 0.866 0.72
,Harmonic 95 (-0.641) 0.18
,Harmonic 96 0.787 0.3]
| 3,178
|
note20 :: Note
note20 = Note
(Pitch 103.826 32 "g#2")
21
(Range
(NoteRange
(NoteRangeAmplitude 6437.21 62 9.0e-2)
(NoteRangeHarmonicFreq 1 103.82))
(NoteRange
(NoteRangeAmplitude 103.82 1 3109.0)
(NoteRangeHarmonicFreq 96 9967.29)))
[Harmonic 1 (-1.326) 3109.0
,Harmonic 2 (-2.33) 1483.37
,Harmonic 3 (-2.781) 476.21
,Harmonic 4 0.983 113.74
,Harmonic 5 1.101 305.72
,Harmonic 6 (-1.038) 291.01
,Harmonic 7 2.252 217.83
,Harmonic 8 (-1.082) 371.13
,Harmonic 9 (-4.7e-2) 242.1
,Harmonic 10 (-2.247) 161.36
,Harmonic 11 0.546 134.36
,Harmonic 12 (-2.072) 12.97
,Harmonic 13 (-1.322) 80.12
,Harmonic 14 (-1.238) 108.1
,Harmonic 15 1.665 50.15
,Harmonic 16 1.56 4.55
,Harmonic 17 1.392 24.09
,Harmonic 18 (-7.7e-2) 38.31
,Harmonic 19 (-1.544) 29.5
,Harmonic 20 2.041 40.14
,Harmonic 21 (-1.47) 40.93
,Harmonic 22 (-9.8e-2) 16.25
,Harmonic 23 (-0.876) 27.77
,Harmonic 24 2.569 12.07
,Harmonic 25 (-0.476) 21.44
,Harmonic 26 (-2.064) 4.45
,Harmonic 27 (-1.646) 15.25
,Harmonic 28 (-2.938) 27.44
,Harmonic 29 2.788 14.28
,Harmonic 30 1.112 17.55
,Harmonic 31 2.365 25.91
,Harmonic 32 (-2.716) 11.9
,Harmonic 33 (-2.738) 7.05
,Harmonic 34 (-2.93) 2.23
,Harmonic 35 2.352 9.84
,Harmonic 36 (-1.816) 1.32
,Harmonic 37 1.764 3.7
,Harmonic 38 (-3.011) 4.82
,Harmonic 39 0.82 6.89
,Harmonic 40 (-0.901) 3.66
,Harmonic 41 5.3e-2 7.67
,Harmonic 42 (-0.754) 2.66
,Harmonic 43 (-0.463) 12.34
,Harmonic 44 (-0.521) 2.04
,Harmonic 45 0.227 0.78
,Harmonic 46 3.063 1.64
,Harmonic 47 1.802 1.76
,Harmonic 48 (-0.605) 1.07
,Harmonic 49 1.902 1.99
,Harmonic 50 (-1.522) 3.64
,Harmonic 51 (-0.182) 2.84
,Harmonic 52 (-2.906) 2.28
,Harmonic 53 (-1.94) 1.52
,Harmonic 54 1.603 1.16
,Harmonic 55 2.568 1.19
,Harmonic 56 (-1.477) 1.46
,Harmonic 57 2.802 0.74
,Harmonic 58 (-0.561) 1.86
,Harmonic 59 (-2.595) 0.96
,Harmonic 60 0.18 6.27
,Harmonic 61 2.522 1.97
,Harmonic 62 2.943 9.0e-2
,Harmonic 63 0.809 2.08
,Harmonic 64 1.978 1.32
,Harmonic 65 (-2.356) 2.01
,Harmonic 66 (-1.62) 0.83
,Harmonic 67 0.482 1.44
,Harmonic 68 (-2.303) 1.15
,Harmonic 69 2.035 0.5
,Harmonic 70 2.127 0.23
,Harmonic 71 (-1.569) 0.14
,Harmonic 72 (-0.631) 0.63
,Harmonic 73 2.666 0.83
,Harmonic 74 (-3.104) 0.98
,Harmonic 75 (-1.612) 0.49
,Harmonic 76 1.497 0.72
,Harmonic 77 1.819 0.95
,Harmonic 78 0.78 0.26
,Harmonic 79 1.168 0.51
,Harmonic 80 1.694 0.43
,Harmonic 81 (-0.234) 0.92
,Harmonic 82 1.796 1.17
,Harmonic 83 1.687 0.42
,Harmonic 84 (-0.858) 0.71
,Harmonic 85 (-0.503) 0.51
,Harmonic 86 (-2.753) 0.64
,Harmonic 87 (-0.944) 0.87
,Harmonic 88 1.618 0.32
,Harmonic 89 (-3.081) 0.63
,Harmonic 90 (-2.129) 1.37
,Harmonic 91 3.4e-2 0.6
,Harmonic 92 2.026 1.67
,Harmonic 93 (-1.424) 0.51
,Harmonic 94 0.866 0.72
,Harmonic 95 (-0.641) 0.18
,Harmonic 96 0.787 0.3]
| 3,178
|
note20 = Note
(Pitch 103.826 32 "g#2")
21
(Range
(NoteRange
(NoteRangeAmplitude 6437.21 62 9.0e-2)
(NoteRangeHarmonicFreq 1 103.82))
(NoteRange
(NoteRangeAmplitude 103.82 1 3109.0)
(NoteRangeHarmonicFreq 96 9967.29)))
[Harmonic 1 (-1.326) 3109.0
,Harmonic 2 (-2.33) 1483.37
,Harmonic 3 (-2.781) 476.21
,Harmonic 4 0.983 113.74
,Harmonic 5 1.101 305.72
,Harmonic 6 (-1.038) 291.01
,Harmonic 7 2.252 217.83
,Harmonic 8 (-1.082) 371.13
,Harmonic 9 (-4.7e-2) 242.1
,Harmonic 10 (-2.247) 161.36
,Harmonic 11 0.546 134.36
,Harmonic 12 (-2.072) 12.97
,Harmonic 13 (-1.322) 80.12
,Harmonic 14 (-1.238) 108.1
,Harmonic 15 1.665 50.15
,Harmonic 16 1.56 4.55
,Harmonic 17 1.392 24.09
,Harmonic 18 (-7.7e-2) 38.31
,Harmonic 19 (-1.544) 29.5
,Harmonic 20 2.041 40.14
,Harmonic 21 (-1.47) 40.93
,Harmonic 22 (-9.8e-2) 16.25
,Harmonic 23 (-0.876) 27.77
,Harmonic 24 2.569 12.07
,Harmonic 25 (-0.476) 21.44
,Harmonic 26 (-2.064) 4.45
,Harmonic 27 (-1.646) 15.25
,Harmonic 28 (-2.938) 27.44
,Harmonic 29 2.788 14.28
,Harmonic 30 1.112 17.55
,Harmonic 31 2.365 25.91
,Harmonic 32 (-2.716) 11.9
,Harmonic 33 (-2.738) 7.05
,Harmonic 34 (-2.93) 2.23
,Harmonic 35 2.352 9.84
,Harmonic 36 (-1.816) 1.32
,Harmonic 37 1.764 3.7
,Harmonic 38 (-3.011) 4.82
,Harmonic 39 0.82 6.89
,Harmonic 40 (-0.901) 3.66
,Harmonic 41 5.3e-2 7.67
,Harmonic 42 (-0.754) 2.66
,Harmonic 43 (-0.463) 12.34
,Harmonic 44 (-0.521) 2.04
,Harmonic 45 0.227 0.78
,Harmonic 46 3.063 1.64
,Harmonic 47 1.802 1.76
,Harmonic 48 (-0.605) 1.07
,Harmonic 49 1.902 1.99
,Harmonic 50 (-1.522) 3.64
,Harmonic 51 (-0.182) 2.84
,Harmonic 52 (-2.906) 2.28
,Harmonic 53 (-1.94) 1.52
,Harmonic 54 1.603 1.16
,Harmonic 55 2.568 1.19
,Harmonic 56 (-1.477) 1.46
,Harmonic 57 2.802 0.74
,Harmonic 58 (-0.561) 1.86
,Harmonic 59 (-2.595) 0.96
,Harmonic 60 0.18 6.27
,Harmonic 61 2.522 1.97
,Harmonic 62 2.943 9.0e-2
,Harmonic 63 0.809 2.08
,Harmonic 64 1.978 1.32
,Harmonic 65 (-2.356) 2.01
,Harmonic 66 (-1.62) 0.83
,Harmonic 67 0.482 1.44
,Harmonic 68 (-2.303) 1.15
,Harmonic 69 2.035 0.5
,Harmonic 70 2.127 0.23
,Harmonic 71 (-1.569) 0.14
,Harmonic 72 (-0.631) 0.63
,Harmonic 73 2.666 0.83
,Harmonic 74 (-3.104) 0.98
,Harmonic 75 (-1.612) 0.49
,Harmonic 76 1.497 0.72
,Harmonic 77 1.819 0.95
,Harmonic 78 0.78 0.26
,Harmonic 79 1.168 0.51
,Harmonic 80 1.694 0.43
,Harmonic 81 (-0.234) 0.92
,Harmonic 82 1.796 1.17
,Harmonic 83 1.687 0.42
,Harmonic 84 (-0.858) 0.71
,Harmonic 85 (-0.503) 0.51
,Harmonic 86 (-2.753) 0.64
,Harmonic 87 (-0.944) 0.87
,Harmonic 88 1.618 0.32
,Harmonic 89 (-3.081) 0.63
,Harmonic 90 (-2.129) 1.37
,Harmonic 91 3.4e-2 0.6
,Harmonic 92 2.026 1.67
,Harmonic 93 (-1.424) 0.51
,Harmonic 94 0.866 0.72
,Harmonic 95 (-0.641) 0.18
,Harmonic 96 0.787 0.3]
| 3,163
| false
| true
| 0
| 10
| 871
| 1,313
| 681
| 632
| null | null |
ahodgen/archer-calc
|
src/Infer.hs
|
bsd-2-clause
|
lookupEnv :: Pos -> Name -> Infer Type
lookupEnv p x = do
(TypeEnv env) <- ask
case M.lookup x env of
Nothing -> throwError $ UnboundVariable p x
Just s -> instantiate s
| 200
|
lookupEnv :: Pos -> Name -> Infer Type
lookupEnv p x = do
(TypeEnv env) <- ask
case M.lookup x env of
Nothing -> throwError $ UnboundVariable p x
Just s -> instantiate s
| 200
|
lookupEnv p x = do
(TypeEnv env) <- ask
case M.lookup x env of
Nothing -> throwError $ UnboundVariable p x
Just s -> instantiate s
| 161
| false
| true
| 0
| 11
| 64
| 81
| 37
| 44
| null | null |
haskell-opengl/OpenGLRaw
|
src/Graphics/GL/Functions/F23.hs
|
bsd-3-clause
|
ptr_glResetMemoryObjectParameterNV :: FunPtr (GLuint -> GLenum -> IO ())
ptr_glResetMemoryObjectParameterNV = unsafePerformIO $ getCommand "glResetMemoryObjectParameterNV"
| 171
|
ptr_glResetMemoryObjectParameterNV :: FunPtr (GLuint -> GLenum -> IO ())
ptr_glResetMemoryObjectParameterNV = unsafePerformIO $ getCommand "glResetMemoryObjectParameterNV"
| 171
|
ptr_glResetMemoryObjectParameterNV = unsafePerformIO $ getCommand "glResetMemoryObjectParameterNV"
| 98
| false
| true
| 0
| 10
| 14
| 37
| 18
| 19
| null | null |
neothemachine/monadiccp
|
src/Data/Expr/Data.hs
|
bsd-3-clause
|
compareBoolExpr _ _ (AllDiff _ _) = GT
| 38
|
compareBoolExpr _ _ (AllDiff _ _) = GT
| 38
|
compareBoolExpr _ _ (AllDiff _ _) = GT
| 38
| false
| false
| 0
| 7
| 7
| 21
| 10
| 11
| null | null |
pavelkogan/NeuroSpider
|
src/NeuroSpider/UiManager.hs
|
bsd-3-clause
|
stock CreateEdge = stock_ "Connect"
| 35
|
stock CreateEdge = stock_ "Connect"
| 35
|
stock CreateEdge = stock_ "Connect"
| 35
| false
| false
| 1
| 5
| 4
| 15
| 5
| 10
| null | null |
brendanhay/gogol
|
gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Locations/Agents/Environments/Experiments/List.hs
|
mpl-2.0
|
-- | The maximum number of items to return in a single page. By default 20
-- and at most 100.
plaeelPageSize :: Lens' ProjectsLocationsAgentsEnvironmentsExperimentsList (Maybe Int32)
plaeelPageSize
= lens _plaeelPageSize
(\ s a -> s{_plaeelPageSize = a})
. mapping _Coerce
| 287
|
plaeelPageSize :: Lens' ProjectsLocationsAgentsEnvironmentsExperimentsList (Maybe Int32)
plaeelPageSize
= lens _plaeelPageSize
(\ s a -> s{_plaeelPageSize = a})
. mapping _Coerce
| 192
|
plaeelPageSize
= lens _plaeelPageSize
(\ s a -> s{_plaeelPageSize = a})
. mapping _Coerce
| 103
| true
| true
| 0
| 10
| 54
| 56
| 29
| 27
| null | null |
unisonweb/platform
|
parser-typechecker/src/Unison/Runtime/Builtin.hs
|
mit
|
(-->) :: a -> b -> (a, b)
x --> y = (x, y)
| 42
|
(-->) :: a -> b -> (a, b)
x --> y = (x, y)
| 42
|
x --> y = (x, y)
| 16
| false
| true
| 0
| 10
| 13
| 40
| 22
| 18
| null | null |
ku-fpg/kansas-amber
|
legacy/Shallow/Morse.hs
|
bsd-3-clause
|
morsify :: [Morse] -> [Either Int Int]
morsify = map t
where unit = 300
t Dit = Left $ 1 * unit
t Dah = Left $ 3 * unit
t LBreak = Right $ 3 * unit
t WBreak = Right $ 7 * unit
-- | Finally, turn a full sentence into a sequence of blink on/off codes
| 295
|
morsify :: [Morse] -> [Either Int Int]
morsify = map t
where unit = 300
t Dit = Left $ 1 * unit
t Dah = Left $ 3 * unit
t LBreak = Right $ 3 * unit
t WBreak = Right $ 7 * unit
-- | Finally, turn a full sentence into a sequence of blink on/off codes
| 295
|
morsify = map t
where unit = 300
t Dit = Left $ 1 * unit
t Dah = Left $ 3 * unit
t LBreak = Right $ 3 * unit
t WBreak = Right $ 7 * unit
-- | Finally, turn a full sentence into a sequence of blink on/off codes
| 256
| false
| true
| 4
| 13
| 107
| 106
| 52
| 54
| null | null |
bergey/plots
|
examples/area.hs
|
bsd-3-clause
|
main :: IO ()
main = make $ renderAxis myaxis
| 45
|
main :: IO ()
main = make $ renderAxis myaxis
| 45
|
main = make $ renderAxis myaxis
| 31
| false
| true
| 0
| 6
| 9
| 23
| 11
| 12
| null | null |
fpco/cabal
|
cabal-install/Distribution/Client/Setup.hs
|
bsd-3-clause
|
win32SelfUpgradeCommand :: CommandUI Win32SelfUpgradeFlags
win32SelfUpgradeCommand = CommandUI {
commandName = "win32selfupgrade",
commandSynopsis = "Self-upgrade the executable on Windows",
commandDescription = Nothing,
commandUsage = \pname ->
"Usage: " ++ pname ++ " win32selfupgrade PID PATH\n\n"
++ "Flags for win32selfupgrade:",
commandDefaultFlags = defaultWin32SelfUpgradeFlags,
commandOptions = \_ ->
[optionVerbosity win32SelfUpgradeVerbosity
(\v flags -> flags { win32SelfUpgradeVerbosity = v})
]
}
| 574
|
win32SelfUpgradeCommand :: CommandUI Win32SelfUpgradeFlags
win32SelfUpgradeCommand = CommandUI {
commandName = "win32selfupgrade",
commandSynopsis = "Self-upgrade the executable on Windows",
commandDescription = Nothing,
commandUsage = \pname ->
"Usage: " ++ pname ++ " win32selfupgrade PID PATH\n\n"
++ "Flags for win32selfupgrade:",
commandDefaultFlags = defaultWin32SelfUpgradeFlags,
commandOptions = \_ ->
[optionVerbosity win32SelfUpgradeVerbosity
(\v flags -> flags { win32SelfUpgradeVerbosity = v})
]
}
| 574
|
win32SelfUpgradeCommand = CommandUI {
commandName = "win32selfupgrade",
commandSynopsis = "Self-upgrade the executable on Windows",
commandDescription = Nothing,
commandUsage = \pname ->
"Usage: " ++ pname ++ " win32selfupgrade PID PATH\n\n"
++ "Flags for win32selfupgrade:",
commandDefaultFlags = defaultWin32SelfUpgradeFlags,
commandOptions = \_ ->
[optionVerbosity win32SelfUpgradeVerbosity
(\v flags -> flags { win32SelfUpgradeVerbosity = v})
]
}
| 515
| false
| true
| 0
| 13
| 121
| 100
| 59
| 41
| null | null |
noraesae/line
|
src/Line/Messaging/Webhook.hs
|
bsd-3-clause
|
defaultOnFailure' :: WebhookFailure -> Scotty.ActionM ()
defaultOnFailure' err = do
Scotty.status status400
Scotty.text . TL.pack . show $ err
| 146
|
defaultOnFailure' :: WebhookFailure -> Scotty.ActionM ()
defaultOnFailure' err = do
Scotty.status status400
Scotty.text . TL.pack . show $ err
| 146
|
defaultOnFailure' err = do
Scotty.status status400
Scotty.text . TL.pack . show $ err
| 89
| false
| true
| 0
| 10
| 22
| 57
| 25
| 32
| null | null |
uduki/hsQt
|
Qtc/ClassTypes/Gui.hs
|
bsd-2-clause
|
withQShortcutEventResult :: IO (Ptr (TQShortcutEvent a)) -> IO (QShortcutEvent a)
withQShortcutEventResult f
= withObjectResult qtc_QShortcutEvent_getFinalizer f
| 163
|
withQShortcutEventResult :: IO (Ptr (TQShortcutEvent a)) -> IO (QShortcutEvent a)
withQShortcutEventResult f
= withObjectResult qtc_QShortcutEvent_getFinalizer f
| 163
|
withQShortcutEventResult f
= withObjectResult qtc_QShortcutEvent_getFinalizer f
| 81
| false
| true
| 0
| 10
| 17
| 47
| 22
| 25
| null | null |
spell-music/temporal-music-notation
|
src/Temporal/Music/Score.hs
|
bsd-3-clause
|
-- | @('dropS' t m)@ is equivalent to @('slice' t (dur a) a)@.
dropS :: Dur -> Score a -> Score a
dropS = M.dropT
| 113
|
dropS :: Dur -> Score a -> Score a
dropS = M.dropT
| 50
|
dropS = M.dropT
| 15
| true
| true
| 0
| 7
| 24
| 28
| 14
| 14
| null | null |
iostat/imperator
|
src/Imperator/Util.hs
|
bsd-3-clause
|
False `xor` b = b
| 18
|
False `xor` b = b
| 18
|
False `xor` b = b
| 18
| false
| false
| 0
| 5
| 5
| 14
| 7
| 7
| null | null |
narurien/ganeti-ceph
|
src/Ganeti/HTools/Cluster.hs
|
gpl-2.0
|
possibleMoves MirrorExternal _ True tdx =
[ FailoverToAny tdx ]
| 65
|
possibleMoves MirrorExternal _ True tdx =
[ FailoverToAny tdx ]
| 65
|
possibleMoves MirrorExternal _ True tdx =
[ FailoverToAny tdx ]
| 65
| false
| false
| 1
| 7
| 11
| 22
| 9
| 13
| null | null |
thalerjonathan/phd
|
coding/papers/FrABS/Haskell/prototyping/SIRMonad/src/Main.hs
|
gpl-3.0
|
processAgent :: RandomGen g
=> TimeDelta
-> Agents
-> SIRAgent
-> Rand g SIRAgent
processAgent _ as (Susceptible, _) = susceptibleAgent as
| 194
|
processAgent :: RandomGen g
=> TimeDelta
-> Agents
-> SIRAgent
-> Rand g SIRAgent
processAgent _ as (Susceptible, _) = susceptibleAgent as
| 194
|
processAgent _ as (Susceptible, _) = susceptibleAgent as
| 56
| false
| true
| 0
| 9
| 77
| 51
| 25
| 26
| null | null |
vikraman/ghc
|
compiler/codeGen/StgCmmUtils.hs
|
bsd-3-clause
|
assignTemp :: CmmExpr -> FCode LocalReg
-- Make sure the argument is in a local register.
-- We don't bother being particularly aggressive with avoiding
-- unnecessary local registers, since we can rely on a later
-- optimization pass to inline as necessary (and skipping out
-- on things like global registers can be a little dangerous
-- due to them being trashed on foreign calls--though it means
-- the optimization pass doesn't have to do as much work)
assignTemp (CmmReg (CmmLocal reg)) = return reg
| 505
|
assignTemp :: CmmExpr -> FCode LocalReg
assignTemp (CmmReg (CmmLocal reg)) = return reg
| 87
|
assignTemp (CmmReg (CmmLocal reg)) = return reg
| 47
| true
| true
| 0
| 11
| 85
| 47
| 25
| 22
| null | null |
limaner2002/EPC-tools
|
log-downloader/src/Logs/Core.hs
|
bsd-3-clause
|
updateCookies req (Just cj) = do
ct <- liftIO getCurrentTime
return $ fst $ insertCookiesIntoRequest req cj ct
-- Takes the response and the request that created the response and returns a cookie jar
| 208
|
updateCookies req (Just cj) = do
ct <- liftIO getCurrentTime
return $ fst $ insertCookiesIntoRequest req cj ct
-- Takes the response and the request that created the response and returns a cookie jar
| 208
|
updateCookies req (Just cj) = do
ct <- liftIO getCurrentTime
return $ fst $ insertCookiesIntoRequest req cj ct
-- Takes the response and the request that created the response and returns a cookie jar
| 208
| false
| false
| 0
| 8
| 42
| 46
| 21
| 25
| null | null |
alexander-at-github/eta
|
compiler/ETA/Prelude/PrimOp.hs
|
bsd-3-clause
|
primOpInfo NewArrayArrayOp = mkGenPrimOp (fsLit "newArrayArray#") [deltaTyVar] [intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, mkMutableArrayArrayPrimTy deltaTy]))
| 200
|
primOpInfo NewArrayArrayOp = mkGenPrimOp (fsLit "newArrayArray#") [deltaTyVar] [intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, mkMutableArrayArrayPrimTy deltaTy]))
| 200
|
primOpInfo NewArrayArrayOp = mkGenPrimOp (fsLit "newArrayArray#") [deltaTyVar] [intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, mkMutableArrayArrayPrimTy deltaTy]))
| 200
| false
| false
| 0
| 10
| 16
| 59
| 30
| 29
| null | null |
tekul/cryptonite
|
Crypto/ECC/Simple/Types.hs
|
bsd-3-clause
|
curveSizeBits :: Curve curve => proxy curve -> Int
curveSizeBits proxy =
case curveType proxy of
CurvePrime (CurvePrimeParam p) -> numBits p
CurveBinary (CurveBinaryParam c) -> numBits c - 1
-- | get the size of the curve in bytes
| 253
|
curveSizeBits :: Curve curve => proxy curve -> Int
curveSizeBits proxy =
case curveType proxy of
CurvePrime (CurvePrimeParam p) -> numBits p
CurveBinary (CurveBinaryParam c) -> numBits c - 1
-- | get the size of the curve in bytes
| 253
|
curveSizeBits proxy =
case curveType proxy of
CurvePrime (CurvePrimeParam p) -> numBits p
CurveBinary (CurveBinaryParam c) -> numBits c - 1
-- | get the size of the curve in bytes
| 202
| false
| true
| 0
| 10
| 62
| 82
| 36
| 46
| null | null |
nushio3/ghc
|
compiler/deSugar/Coverage.hs
|
bsd-3-clause
|
guessSourceFile :: LHsBinds Id -> FilePath -> FilePath
guessSourceFile binds orig_file =
-- Try look for a file generated from a .hsc file to a
-- .hs file, by peeking ahead.
let top_pos = catMaybes $ foldrBag (\ (L pos _) rest ->
srcSpanFileName_maybe pos : rest) [] binds
in
case top_pos of
(file_name:_) | ".hsc" `isSuffixOf` unpackFS file_name
-> unpackFS file_name
_ -> orig_file
| 480
|
guessSourceFile :: LHsBinds Id -> FilePath -> FilePath
guessSourceFile binds orig_file =
-- Try look for a file generated from a .hsc file to a
-- .hs file, by peeking ahead.
let top_pos = catMaybes $ foldrBag (\ (L pos _) rest ->
srcSpanFileName_maybe pos : rest) [] binds
in
case top_pos of
(file_name:_) | ".hsc" `isSuffixOf` unpackFS file_name
-> unpackFS file_name
_ -> orig_file
| 480
|
guessSourceFile binds orig_file =
-- Try look for a file generated from a .hsc file to a
-- .hs file, by peeking ahead.
let top_pos = catMaybes $ foldrBag (\ (L pos _) rest ->
srcSpanFileName_maybe pos : rest) [] binds
in
case top_pos of
(file_name:_) | ".hsc" `isSuffixOf` unpackFS file_name
-> unpackFS file_name
_ -> orig_file
| 425
| false
| true
| 0
| 14
| 160
| 124
| 60
| 64
| null | null |
sethfowler/pygmalion
|
src/Pygmalion/RPC/Server.hs
|
bsd-3-clause
|
route :: RPCRequest -> RPCServer (Maybe ByteString)
route (RPCIndexCommand ci mtime) = sendIndex_ $ indexRequestForCommand ci mtime
| 143
|
route :: RPCRequest -> RPCServer (Maybe ByteString)
route (RPCIndexCommand ci mtime) = sendIndex_ $ indexRequestForCommand ci mtime
| 143
|
route (RPCIndexCommand ci mtime) = sendIndex_ $ indexRequestForCommand ci mtime
| 91
| false
| true
| 0
| 8
| 28
| 44
| 21
| 23
| null | null |
Numberartificial/workflow
|
haskell-first-principles/haskell-programming-from-first-principles-master/src/ReaderPractice.hs
|
mit
|
-- zip x and y using 3 as the lookup key
xs :: Maybe Integer
xs = lookup 3 $ zip x y
| 84
|
xs :: Maybe Integer
xs = lookup 3 $ zip x y
| 43
|
xs = lookup 3 $ zip x y
| 23
| true
| true
| 2
| 6
| 22
| 35
| 14
| 21
| null | null |
sdiehl/ghc
|
compiler/GHC/Hs/Expr.hs
|
bsd-3-clause
|
-- Don't print the type; it's only a place-holder before typechecking
pprMatches (XMatchGroup x) = ppr x
| 104
|
pprMatches (XMatchGroup x) = ppr x
| 34
|
pprMatches (XMatchGroup x) = ppr x
| 34
| true
| false
| 0
| 7
| 16
| 19
| 9
| 10
| null | null |
bitrauser/aoc
|
src/AOC2015/Day18.hs
|
bsd-3-clause
|
animateLights :: String -> Int -> Int
animateLights s n = R.sumAllS $ iterate animate (initGrid s) !! n
| 103
|
animateLights :: String -> Int -> Int
animateLights s n = R.sumAllS $ iterate animate (initGrid s) !! n
| 103
|
animateLights s n = R.sumAllS $ iterate animate (initGrid s) !! n
| 65
| false
| true
| 0
| 9
| 18
| 45
| 22
| 23
| null | null |
ComputationWithBoundedResources/jat
|
src/Jat/PState/Heap.hs
|
bsd-3-clause
|
reachableFrom :: Address -> Heap i -> [Address]
reachableFrom adr hp = filter (\ladr -> adr `elem` reachable ladr hp) (Gr.nodes . toGraph $ hp)
| 143
|
reachableFrom :: Address -> Heap i -> [Address]
reachableFrom adr hp = filter (\ladr -> adr `elem` reachable ladr hp) (Gr.nodes . toGraph $ hp)
| 143
|
reachableFrom adr hp = filter (\ladr -> adr `elem` reachable ladr hp) (Gr.nodes . toGraph $ hp)
| 95
| false
| true
| 0
| 9
| 24
| 72
| 36
| 36
| null | null |
ambiata/highlighting-kate
|
Text/Highlighting/Kate/Syntax/Ocaml.hs
|
gpl-2.0
|
parseRules ("Objective Caml","ModuleEnv2") =
(((pRegExpr regex_'5bA'2dZ'5d'5bA'2dZa'2dz'5c0300'2d'5c0326'5c0330'2d'5c0366'5c0370'2d'5c03770'2d9'5f'27'5d'2a >>= withAttribute NormalTok))
<|>
((pDetectSpaces >>= withAttribute NormalTok))
<|>
((pString False "." >>= withAttribute KeywordTok) >>~ (popContext))
<|>
(currentContext >>= \x -> guard (x == ("Objective Caml","ModuleEnv2")) >> pDefault >>= withAttribute NormalTok))
| 444
|
parseRules ("Objective Caml","ModuleEnv2") =
(((pRegExpr regex_'5bA'2dZ'5d'5bA'2dZa'2dz'5c0300'2d'5c0326'5c0330'2d'5c0366'5c0370'2d'5c03770'2d9'5f'27'5d'2a >>= withAttribute NormalTok))
<|>
((pDetectSpaces >>= withAttribute NormalTok))
<|>
((pString False "." >>= withAttribute KeywordTok) >>~ (popContext))
<|>
(currentContext >>= \x -> guard (x == ("Objective Caml","ModuleEnv2")) >> pDefault >>= withAttribute NormalTok))
| 444
|
parseRules ("Objective Caml","ModuleEnv2") =
(((pRegExpr regex_'5bA'2dZ'5d'5bA'2dZa'2dz'5c0300'2d'5c0326'5c0330'2d'5c0366'5c0370'2d'5c03770'2d9'5f'27'5d'2a >>= withAttribute NormalTok))
<|>
((pDetectSpaces >>= withAttribute NormalTok))
<|>
((pString False "." >>= withAttribute KeywordTok) >>~ (popContext))
<|>
(currentContext >>= \x -> guard (x == ("Objective Caml","ModuleEnv2")) >> pDefault >>= withAttribute NormalTok))
| 444
| false
| false
| 0
| 15
| 57
| 123
| 65
| 58
| null | null |
geekingfrog/project-euler
|
Problem011.hs
|
gpl-3.0
|
side :: Int
side = floor . sqrt . fromIntegral $ S.length grid
| 62
|
side :: Int
side = floor . sqrt . fromIntegral $ S.length grid
| 62
|
side = floor . sqrt . fromIntegral $ S.length grid
| 50
| false
| true
| 0
| 7
| 12
| 34
| 15
| 19
| null | null |
zachsully/hakaru
|
haskell/Examples/Examples.hs
|
bsd-3-clause
|
gaussian_process = undefined
| 28
|
gaussian_process = undefined
| 28
|
gaussian_process = undefined
| 28
| false
| false
| 0
| 4
| 2
| 6
| 3
| 3
| null | null |
ghcjs/jsaddle-dom
|
src/JSDOM/Generated/InspectorFrontendHost.hs
|
mit
|
-- | <https://developer.mozilla.org/en-US/docs/Web/API/InspectorFrontendHost.openInNewTab Mozilla InspectorFrontendHost.openInNewTab documentation>
openInNewTab ::
(MonadDOM m, ToJSString url) =>
InspectorFrontendHost -> url -> m ()
openInNewTab self url
= liftDOM (void (self ^. jsf "openInNewTab" [toJSVal url]))
| 345
|
openInNewTab ::
(MonadDOM m, ToJSString url) =>
InspectorFrontendHost -> url -> m ()
openInNewTab self url
= liftDOM (void (self ^. jsf "openInNewTab" [toJSVal url]))
| 196
|
openInNewTab self url
= liftDOM (void (self ^. jsf "openInNewTab" [toJSVal url]))
| 83
| true
| true
| 0
| 12
| 61
| 77
| 37
| 40
| null | null |
lenary/idris-erlang
|
src/IRTS/CodegenErlang.hs
|
bsd-3-clause
|
generateCase expr alts = do expr' <- generateExp expr
alts' <- mapM generateCaseAlt alts
return $ "case " ++ expr' ++ " of\n" ++ (";\n" `intercalate` alts') ++ "\nend"
-- Case Statement Clauses
| 250
|
generateCase expr alts = do expr' <- generateExp expr
alts' <- mapM generateCaseAlt alts
return $ "case " ++ expr' ++ " of\n" ++ (";\n" `intercalate` alts') ++ "\nend"
-- Case Statement Clauses
| 250
|
generateCase expr alts = do expr' <- generateExp expr
alts' <- mapM generateCaseAlt alts
return $ "case " ++ expr' ++ " of\n" ++ (";\n" `intercalate` alts') ++ "\nend"
-- Case Statement Clauses
| 250
| false
| false
| 1
| 11
| 89
| 71
| 32
| 39
| null | null |
kazu-yamamoto/network-uri
|
tests/uri001.hs
|
bsd-3-clause
|
rel = testRelativeSuite
| 24
|
rel = testRelativeSuite
| 24
|
rel = testRelativeSuite
| 24
| false
| false
| 0
| 4
| 3
| 6
| 3
| 3
| null | null |
silkapp/tagsoup
|
dead/parser/Compiler/Parser.hs
|
bsd-3-clause
|
parsePat :: String -> Pat
parsePat "_" = PWildcard
| 50
|
parsePat :: String -> Pat
parsePat "_" = PWildcard
| 50
|
parsePat "_" = PWildcard
| 24
| false
| true
| 0
| 7
| 8
| 24
| 10
| 14
| null | null |
BitFunctor/bitfunctor
|
test/src/Network/BitFunctor/Account/Tests.hs
|
mit
|
prop_accountid_inv_over_accountid :: AccountId -> Bool
prop_accountid_inv_over_accountid accId = (toAccountId . fromAccountId) accId == accId
| 141
|
prop_accountid_inv_over_accountid :: AccountId -> Bool
prop_accountid_inv_over_accountid accId = (toAccountId . fromAccountId) accId == accId
| 141
|
prop_accountid_inv_over_accountid accId = (toAccountId . fromAccountId) accId == accId
| 86
| false
| true
| 0
| 8
| 13
| 32
| 16
| 16
| null | null |
JISNEGRO/Agda-PR
|
Main.hs
|
mit
|
showTs [t] = showT t
| 20
|
showTs [t] = showT t
| 20
|
showTs [t] = showT t
| 20
| false
| false
| 0
| 6
| 4
| 15
| 7
| 8
| null | null |
gnn/Hets
|
OWL2/Parse.hs
|
gpl-2.0
|
parensP :: CharParser st a -> CharParser st a
parensP = between (skipChar '(') (skipChar ')')
| 93
|
parensP :: CharParser st a -> CharParser st a
parensP = between (skipChar '(') (skipChar ')')
| 93
|
parensP = between (skipChar '(') (skipChar ')')
| 47
| false
| true
| 0
| 7
| 15
| 42
| 20
| 22
| null | null |
eijian/raytracer
|
src/Ray/Algebra.hs
|
bsd-3-clause
|
generateRandomDir2 :: IO Direction3
generateRandomDir2 = do
x <- randomRIO (-1.0, 1.0)
y <- randomRIO (-1.0, 1.0)
z <- randomRIO (-1.0, 1.0)
let v = initPos x y z
len = norm v
if len > 1.0 || len == 0.0
then generateRandomDir2
else return $ fromJust $ normalize v
| 287
|
generateRandomDir2 :: IO Direction3
generateRandomDir2 = do
x <- randomRIO (-1.0, 1.0)
y <- randomRIO (-1.0, 1.0)
z <- randomRIO (-1.0, 1.0)
let v = initPos x y z
len = norm v
if len > 1.0 || len == 0.0
then generateRandomDir2
else return $ fromJust $ normalize v
| 287
|
generateRandomDir2 = do
x <- randomRIO (-1.0, 1.0)
y <- randomRIO (-1.0, 1.0)
z <- randomRIO (-1.0, 1.0)
let v = initPos x y z
len = norm v
if len > 1.0 || len == 0.0
then generateRandomDir2
else return $ fromJust $ normalize v
| 251
| false
| true
| 0
| 10
| 73
| 126
| 62
| 64
| null | null |
mwotton/ctkl
|
src/Text/CTK/Sets.hs
|
bsd-3-clause
|
toListSet :: Ord a => Set a -> [a]
toListSet (Set s) = (map fst . toListFM) s
| 86
|
toListSet :: Ord a => Set a -> [a]
toListSet (Set s) = (map fst . toListFM) s
| 86
|
toListSet (Set s) = (map fst . toListFM) s
| 43
| false
| true
| 0
| 8
| 26
| 50
| 24
| 26
| null | null |
kejace/ethereum-client-haskell
|
src/Blockchain/Data/Wire.hs
|
bsd-3-clause
|
wireMessage2Obj (Transactions transactions) = (0x12, RLPArray (rlpEncode <$> transactions))
| 91
|
wireMessage2Obj (Transactions transactions) = (0x12, RLPArray (rlpEncode <$> transactions))
| 91
|
wireMessage2Obj (Transactions transactions) = (0x12, RLPArray (rlpEncode <$> transactions))
| 91
| false
| false
| 0
| 8
| 8
| 31
| 16
| 15
| null | null |
andreagenso/java2scala
|
src/J2s/Ast/Semantic.hs
|
apache-2.0
|
{-
sem_PrimaryNNA_ArrayCreationExpressionPrimitiveType = ArrayCreationExpressionPrimitiveType
sem_PrimaryNNA_ArrayCreationExpressionClassOrInterf = ArrayCreationExpressionClassOrInterf
sem_PrimaryNNA_ArrayCreationExpressionArrInitialPrim = ArrayCreationExpressionArrInitialPrim
sem_PrimaryNNA_ArrayCreationExpressionArrInitialClass = ArrayCreationExpressionArrInitialClass
-}
sem_ArrayInitializer_ArrayInitializer = ArrayInitializer
| 438
|
sem_ArrayInitializer_ArrayInitializer = ArrayInitializer
| 56
|
sem_ArrayInitializer_ArrayInitializer = ArrayInitializer
| 56
| true
| false
| 0
| 4
| 22
| 7
| 4
| 3
| null | null |
SwiftsNamesake/ElegantChess
|
lecture.hs
|
mit
|
-- Currying (partial application)
-- Higher order functions
-- Lambdas
-- newtype, data
-- classes (constraints)
-- monads
-- Entry point
main :: IO ()
main = do
putStrLn "Hola, Mundo!"
print $ take 15 numbers
print $ map' toUpper "Jonatan"
print $ hypotenuse 3 4
| 279
|
main :: IO ()
main = do
putStrLn "Hola, Mundo!"
print $ take 15 numbers
print $ map' toUpper "Jonatan"
print $ hypotenuse 3 4
| 129
|
main = do
putStrLn "Hola, Mundo!"
print $ take 15 numbers
print $ map' toUpper "Jonatan"
print $ hypotenuse 3 4
| 115
| true
| true
| 0
| 8
| 61
| 65
| 32
| 33
| null | null |
grnet/snf-ganeti
|
src/Ganeti/Utils.hs
|
bsd-2-clause
|
{-| Strip a prefix from a string, allowing the last character of the prefix
(which is assumed to be a separator) to be absent from the string if the string
terminates there.
\>>> chompPrefix \"foo:bar:\" \"a:b:c\"
Nothing
\>>> chompPrefix \"foo:bar:\" \"foo:bar:baz\"
Just \"baz\"
\>>> chompPrefix \"foo:bar:\" \"foo:bar:\"
Just \"\"
\>>> chompPrefix \"foo:bar:\" \"foo:bar\"
Just \"\"
\>>> chompPrefix \"foo:bar:\" \"foo:barbaz\"
Nothing
-}
chompPrefix :: String -> String -> Maybe String
chompPrefix pfx str =
if pfx `isPrefixOf` str || str == init pfx
then Just $ drop (length pfx) str
else Nothing
| 616
|
chompPrefix :: String -> String -> Maybe String
chompPrefix pfx str =
if pfx `isPrefixOf` str || str == init pfx
then Just $ drop (length pfx) str
else Nothing
| 169
|
chompPrefix pfx str =
if pfx `isPrefixOf` str || str == init pfx
then Just $ drop (length pfx) str
else Nothing
| 121
| true
| true
| 0
| 9
| 105
| 68
| 35
| 33
| null | null |
jwiegley/ghc-release
|
utils/haddock/src/Haddock/Backends/Xhtml/Decl.hs
|
gpl-3.0
|
ppFixities fs qual = foldr1 (+++) (map ppFix uniq_fs) +++ rightEdge
where
ppFix (ns, p, d) = thespan ! [theclass "fixity"] <<
(toHtml d <+> toHtml (show p) <+> ppNames ns)
ppDir InfixR = "infixr"
ppDir InfixL = "infixl"
ppDir InfixN = "infix"
ppNames = case fs of
_:[] -> const noHtml -- Don't display names for fixities on single names
_ -> concatHtml . intersperse (stringToHtml ", ") . map (ppDocName qual Infix False)
uniq_fs = [ (n, the p, the d') | (n, Fixity p d) <- fs
, let d' = ppDir d
, then group by Down (p,d') using groupWith ]
rightEdge = thespan ! [theclass "rightedge"] << noHtml
| 740
|
ppFixities fs qual = foldr1 (+++) (map ppFix uniq_fs) +++ rightEdge
where
ppFix (ns, p, d) = thespan ! [theclass "fixity"] <<
(toHtml d <+> toHtml (show p) <+> ppNames ns)
ppDir InfixR = "infixr"
ppDir InfixL = "infixl"
ppDir InfixN = "infix"
ppNames = case fs of
_:[] -> const noHtml -- Don't display names for fixities on single names
_ -> concatHtml . intersperse (stringToHtml ", ") . map (ppDocName qual Infix False)
uniq_fs = [ (n, the p, the d') | (n, Fixity p d) <- fs
, let d' = ppDir d
, then group by Down (p,d') using groupWith ]
rightEdge = thespan ! [theclass "rightedge"] << noHtml
| 740
|
ppFixities fs qual = foldr1 (+++) (map ppFix uniq_fs) +++ rightEdge
where
ppFix (ns, p, d) = thespan ! [theclass "fixity"] <<
(toHtml d <+> toHtml (show p) <+> ppNames ns)
ppDir InfixR = "infixr"
ppDir InfixL = "infixl"
ppDir InfixN = "infix"
ppNames = case fs of
_:[] -> const noHtml -- Don't display names for fixities on single names
_ -> concatHtml . intersperse (stringToHtml ", ") . map (ppDocName qual Infix False)
uniq_fs = [ (n, the p, the d') | (n, Fixity p d) <- fs
, let d' = ppDir d
, then group by Down (p,d') using groupWith ]
rightEdge = thespan ! [theclass "rightedge"] << noHtml
| 740
| false
| false
| 2
| 11
| 256
| 283
| 143
| 140
| null | null |
olorin/amazonka
|
amazonka-cloudwatch-logs/gen/Network/AWS/CloudWatchLogs/Types.hs
|
mpl-2.0
|
-- | Prism for InvalidSequenceTokenException' errors.
_InvalidSequenceTokenException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidSequenceTokenException =
_ServiceError . hasCode "InvalidSequenceTokenException"
| 237
|
_InvalidSequenceTokenException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidSequenceTokenException =
_ServiceError . hasCode "InvalidSequenceTokenException"
| 183
|
_InvalidSequenceTokenException =
_ServiceError . hasCode "InvalidSequenceTokenException"
| 92
| true
| true
| 0
| 8
| 25
| 39
| 19
| 20
| null | null |
jmitchell/Idris-dev
|
src/Idris/AbsSyntaxTree.hs
|
bsd-3-clause
|
getShowArgs (_ : xs) = getShowArgs xs
| 37
|
getShowArgs (_ : xs) = getShowArgs xs
| 37
|
getShowArgs (_ : xs) = getShowArgs xs
| 37
| false
| false
| 0
| 7
| 6
| 19
| 9
| 10
| null | null |
fmthoma/ghc
|
compiler/basicTypes/DataCon.hs
|
bsd-3-clause
|
dataConBoxer :: DataCon -> Maybe DataConBoxer
dataConBoxer (MkData { dcRep = DCR { dcr_boxer = boxer } }) = Just boxer
| 118
|
dataConBoxer :: DataCon -> Maybe DataConBoxer
dataConBoxer (MkData { dcRep = DCR { dcr_boxer = boxer } }) = Just boxer
| 118
|
dataConBoxer (MkData { dcRep = DCR { dcr_boxer = boxer } }) = Just boxer
| 72
| false
| true
| 0
| 12
| 20
| 45
| 23
| 22
| null | null |
paulp/unison
|
parser-typechecker/src/Unison/Parser.hs
|
mit
|
takeWhile1 :: String -> (Char -> Bool) -> Parser s String
takeWhile1 msg f = label msg (Parsec.many1 (one msg f))
| 113
|
takeWhile1 :: String -> (Char -> Bool) -> Parser s String
takeWhile1 msg f = label msg (Parsec.many1 (one msg f))
| 113
|
takeWhile1 msg f = label msg (Parsec.many1 (one msg f))
| 55
| false
| true
| 0
| 9
| 20
| 57
| 28
| 29
| null | null |
matklad/raytracer
|
bin/Ray.hs
|
mit
|
mkScene :: [SomeShape] -> Scene
mkScene objs =
let
light1 = PointSource (vec 100 0 100) white
light2 = PointSource (vec (-100) 0 100) white
in Scene { sceneCamera = camera
, sceneShapes = objs
, sceneLights = [SomeLight light1, SomeLight light2]
, sceneColour = black
, sceneLight = scale 0.1 white
}
| 391
|
mkScene :: [SomeShape] -> Scene
mkScene objs =
let
light1 = PointSource (vec 100 0 100) white
light2 = PointSource (vec (-100) 0 100) white
in Scene { sceneCamera = camera
, sceneShapes = objs
, sceneLights = [SomeLight light1, SomeLight light2]
, sceneColour = black
, sceneLight = scale 0.1 white
}
| 391
|
mkScene objs =
let
light1 = PointSource (vec 100 0 100) white
light2 = PointSource (vec (-100) 0 100) white
in Scene { sceneCamera = camera
, sceneShapes = objs
, sceneLights = [SomeLight light1, SomeLight light2]
, sceneColour = black
, sceneLight = scale 0.1 white
}
| 359
| false
| true
| 0
| 13
| 143
| 130
| 67
| 63
| null | null |
foreverbell/project-euler-solutions
|
src/307.hs
|
bsd-3-clause
|
permutation_log :: Int -> Int -> Double
permutation_log n k = logSum (n - k + 1) n
| 82
|
permutation_log :: Int -> Int -> Double
permutation_log n k = logSum (n - k + 1) n
| 82
|
permutation_log n k = logSum (n - k + 1) n
| 42
| false
| true
| 0
| 8
| 17
| 45
| 21
| 24
| null | null |
kim/amazonka
|
amazonka-opsworks/gen/Network/AWS/OpsWorks/UpdateMyUserProfile.hs
|
mpl-2.0
|
-- | 'UpdateMyUserProfileResponse' constructor.
updateMyUserProfileResponse :: UpdateMyUserProfileResponse
updateMyUserProfileResponse = UpdateMyUserProfileResponse
| 164
|
updateMyUserProfileResponse :: UpdateMyUserProfileResponse
updateMyUserProfileResponse = UpdateMyUserProfileResponse
| 116
|
updateMyUserProfileResponse = UpdateMyUserProfileResponse
| 57
| true
| true
| 0
| 4
| 9
| 12
| 7
| 5
| null | null |
olsner/ghc
|
utils/check-ppr/Main.hs
|
bsd-3-clause
|
showSDoc_ :: SDoc -> String
showSDoc_ = normalize_newlines . showSDoc unsafeGlobalDynFlags
| 90
|
showSDoc_ :: SDoc -> String
showSDoc_ = normalize_newlines . showSDoc unsafeGlobalDynFlags
| 90
|
showSDoc_ = normalize_newlines . showSDoc unsafeGlobalDynFlags
| 62
| false
| true
| 0
| 6
| 10
| 22
| 11
| 11
| null | null |
DaMSL/K3
|
src/Language/K3/Interpreter/Evaluation.hs
|
apache-2.0
|
-- | Logical operators
binary OAnd = logic (&&)
| 47
|
binary OAnd = logic (&&)
| 24
|
binary OAnd = logic (&&)
| 24
| true
| false
| 0
| 5
| 8
| 15
| 8
| 7
| null | null |
jtojnar/hulk
|
src/Hulk/Client.hs
|
bsd-3-clause
|
-- | Perform an action with an existing channel, sends error if not exists.
withChannel :: ChannelName -> (Channel -> Hulk ()) -> Hulk ()
withChannel name m = do
chan <- M.lookup name <$> gets stateChannels
case chan of
Nothing -> thisServerReply ERR_NOSUCHCHANNEL [channelNameText name
,"No such channel."]
Just chan' -> m chan'
-- | Send a client reply to everyone in a channel.
| 442
|
withChannel :: ChannelName -> (Channel -> Hulk ()) -> Hulk ()
withChannel name m = do
chan <- M.lookup name <$> gets stateChannels
case chan of
Nothing -> thisServerReply ERR_NOSUCHCHANNEL [channelNameText name
,"No such channel."]
Just chan' -> m chan'
-- | Send a client reply to everyone in a channel.
| 366
|
withChannel name m = do
chan <- M.lookup name <$> gets stateChannels
case chan of
Nothing -> thisServerReply ERR_NOSUCHCHANNEL [channelNameText name
,"No such channel."]
Just chan' -> m chan'
-- | Send a client reply to everyone in a channel.
| 304
| true
| true
| 0
| 13
| 126
| 106
| 49
| 57
| null | null |
ku-fpg/kansas-amber
|
System/Hardware/Haskino/Compiler.hs
|
bsd-3-clause
|
compileProcedure (IterateUnitI8E br iv bf) = do
b <- nextBind
let bb = RemBindI b
i <- nextBind
let bi = RemBindUnit i
j <- nextBind
let bj = RemBindI8 j
_ <- compileIterateProcedure UnitType Int8Type b bb br i bi j bj iv bf
return bj
| 266
|
compileProcedure (IterateUnitI8E br iv bf) = do
b <- nextBind
let bb = RemBindI b
i <- nextBind
let bi = RemBindUnit i
j <- nextBind
let bj = RemBindI8 j
_ <- compileIterateProcedure UnitType Int8Type b bb br i bi j bj iv bf
return bj
| 266
|
compileProcedure (IterateUnitI8E br iv bf) = do
b <- nextBind
let bb = RemBindI b
i <- nextBind
let bi = RemBindUnit i
j <- nextBind
let bj = RemBindI8 j
_ <- compileIterateProcedure UnitType Int8Type b bb br i bi j bj iv bf
return bj
| 266
| false
| false
| 0
| 10
| 78
| 112
| 49
| 63
| null | null |
eggzilla/StockholmAlignment
|
Biobase/StockholmAlignment/Import.hs
|
gpl-3.0
|
tokenToStockholm :: T.Text -> [StockholmToken] -> StockholmAlignment
tokenToStockholm _version _token = StockholmAlignment _version _fileAnnotation _columnAnnotation _sequenceEntries
where _fileAtoken = filter isFileTok _token
_colAtoken = filter isColATok _token
_resAtoken = filter isResATok _token
_seqAtoken = filter isSeqATok _token
_seqtoken = filter isSeqTok _token
_fileAnnotation = mergeFileToken _fileAtoken
_columnAnnotation = mergeColToken _colAtoken
mergedSeqAToken = mergeSeqAToken _seqAtoken
mergedRAToken = mergeResAToken _resAtoken
_sequenceEntries = buildSeqEntries mergedSeqAToken mergedRAToken _seqtoken
| 697
|
tokenToStockholm :: T.Text -> [StockholmToken] -> StockholmAlignment
tokenToStockholm _version _token = StockholmAlignment _version _fileAnnotation _columnAnnotation _sequenceEntries
where _fileAtoken = filter isFileTok _token
_colAtoken = filter isColATok _token
_resAtoken = filter isResATok _token
_seqAtoken = filter isSeqATok _token
_seqtoken = filter isSeqTok _token
_fileAnnotation = mergeFileToken _fileAtoken
_columnAnnotation = mergeColToken _colAtoken
mergedSeqAToken = mergeSeqAToken _seqAtoken
mergedRAToken = mergeResAToken _resAtoken
_sequenceEntries = buildSeqEntries mergedSeqAToken mergedRAToken _seqtoken
| 697
|
tokenToStockholm _version _token = StockholmAlignment _version _fileAnnotation _columnAnnotation _sequenceEntries
where _fileAtoken = filter isFileTok _token
_colAtoken = filter isColATok _token
_resAtoken = filter isResATok _token
_seqAtoken = filter isSeqATok _token
_seqtoken = filter isSeqTok _token
_fileAnnotation = mergeFileToken _fileAtoken
_columnAnnotation = mergeColToken _colAtoken
mergedSeqAToken = mergeSeqAToken _seqAtoken
mergedRAToken = mergeResAToken _resAtoken
_sequenceEntries = buildSeqEntries mergedSeqAToken mergedRAToken _seqtoken
| 628
| false
| true
| 9
| 7
| 137
| 135
| 67
| 68
| null | null |
haskell-opengl/OpenGLRaw
|
RegistryProcessor/src/Main.hs
|
bsd-3-clause
|
supportedExtensions :: API -> Registry -> [(ExtensionName, [Modification])]
supportedExtensions api registry =
[ nameAndMods
| ext <- extensions registry
, api `supports` extensionSupported ext
, nameAndMods@(_, _:_) <- [nameAndModifications ext]
]
where
nameAndModifications :: Extension -> (ExtensionName, [Modification])
nameAndModifications e =
( extensionName e
, [ conditionalModificationModification cm
| cm <- extensionsRequireRemove e
, api `matches` conditionalModificationAPI cm
-- ARB_compatibility has an empty "require" element only
, not .
null .
modificationInterfaceElements . conditionalModificationModification $
cm
])
| 748
|
supportedExtensions :: API -> Registry -> [(ExtensionName, [Modification])]
supportedExtensions api registry =
[ nameAndMods
| ext <- extensions registry
, api `supports` extensionSupported ext
, nameAndMods@(_, _:_) <- [nameAndModifications ext]
]
where
nameAndModifications :: Extension -> (ExtensionName, [Modification])
nameAndModifications e =
( extensionName e
, [ conditionalModificationModification cm
| cm <- extensionsRequireRemove e
, api `matches` conditionalModificationAPI cm
-- ARB_compatibility has an empty "require" element only
, not .
null .
modificationInterfaceElements . conditionalModificationModification $
cm
])
| 748
|
supportedExtensions api registry =
[ nameAndMods
| ext <- extensions registry
, api `supports` extensionSupported ext
, nameAndMods@(_, _:_) <- [nameAndModifications ext]
]
where
nameAndModifications :: Extension -> (ExtensionName, [Modification])
nameAndModifications e =
( extensionName e
, [ conditionalModificationModification cm
| cm <- extensionsRequireRemove e
, api `matches` conditionalModificationAPI cm
-- ARB_compatibility has an empty "require" element only
, not .
null .
modificationInterfaceElements . conditionalModificationModification $
cm
])
| 672
| false
| true
| 0
| 11
| 187
| 179
| 96
| 83
| null | null |
AndrewRademacher/wai
|
wai-extra/Network/Wai/Middleware/Local.hs
|
mit
|
-- | This middleware rejects non-local connections with a specific response.
-- It is useful when supporting web-based local applications, which would
-- typically want to reject external connections.
local :: Response -> Middleware
local resp f r k = case remoteHost r of
SockAddrInet _ h | h == fromIntegral home
-> f r k
#if !defined(mingw32_HOST_OS) && !defined(_WIN32)
SockAddrUnix _ -> f r k
#endif
_ -> k $ resp
where
home :: Integer
home = 127 + (256 * 256 * 256) * 1
| 610
|
local :: Response -> Middleware
local resp f r k = case remoteHost r of
SockAddrInet _ h | h == fromIntegral home
-> f r k
#if !defined(mingw32_HOST_OS) && !defined(_WIN32)
SockAddrUnix _ -> f r k
#endif
_ -> k $ resp
where
home :: Integer
home = 127 + (256 * 256 * 256) * 1
| 403
|
local resp f r k = case remoteHost r of
SockAddrInet _ h | h == fromIntegral home
-> f r k
#if !defined(mingw32_HOST_OS) && !defined(_WIN32)
SockAddrUnix _ -> f r k
#endif
_ -> k $ resp
where
home :: Integer
home = 127 + (256 * 256 * 256) * 1
| 371
| true
| true
| 0
| 12
| 221
| 126
| 61
| 65
| null | null |
Pnom/haskell-ast-pretty
|
Test/examples/Attributes.hs
|
mit
|
usedByEdges LabelFontColor{} = True
| 35
|
usedByEdges LabelFontColor{} = True
| 35
|
usedByEdges LabelFontColor{} = True
| 35
| false
| false
| 0
| 6
| 3
| 13
| 6
| 7
| null | null |
phischu/fragnix
|
builtins/base/Data.Data.hs
|
bsd-3-clause
|
mkIntType :: String -> DataType
mkIntType = mkPrimType IntRep
| 61
|
mkIntType :: String -> DataType
mkIntType = mkPrimType IntRep
| 61
|
mkIntType = mkPrimType IntRep
| 29
| false
| true
| 0
| 7
| 8
| 25
| 10
| 15
| null | null |
BlackBrane/ansigraph
|
src/System/Console/Ansigraph/Examples.hs
|
mit
|
-- | Display an animation of the real function /r(x,t) = cos(x-t)/ in the standard style, i.e. with both
-- positive and negative regions.
waveDemoReal :: IO ()
waveDemoReal = animate rwaves
| 192
|
waveDemoReal :: IO ()
waveDemoReal = animate rwaves
| 51
|
waveDemoReal = animate rwaves
| 29
| true
| true
| 0
| 6
| 33
| 21
| 11
| 10
| null | null |
hectorhon/autotrace2
|
src/TimeSeriesData/Interpolate.hs
|
bsd-3-clause
|
interpolate :: ((NominalDiffTime, Double), (NominalDiffTime, Double))
-> NominalDiffTime
-> Double
interpolate ((t1, y1), (t2, y2)) t =
interpolate' ((realToFrac t1, y1), (realToFrac t2, y2)) (realToFrac t)
| 232
|
interpolate :: ((NominalDiffTime, Double), (NominalDiffTime, Double))
-> NominalDiffTime
-> Double
interpolate ((t1, y1), (t2, y2)) t =
interpolate' ((realToFrac t1, y1), (realToFrac t2, y2)) (realToFrac t)
| 232
|
interpolate ((t1, y1), (t2, y2)) t =
interpolate' ((realToFrac t1, y1), (realToFrac t2, y2)) (realToFrac t)
| 109
| false
| true
| 0
| 10
| 51
| 101
| 56
| 45
| null | null |
pdownen/sequent-core
|
src/Language/SequentCore/Syntax.hs
|
bsd-3-clause
|
-- | True if the given term constitutes a value argument rather than a type
-- argument (see 'Type').
isValueArg :: Term b -> Bool
isValueArg (Type _) = False
| 158
|
isValueArg :: Term b -> Bool
isValueArg (Type _) = False
| 56
|
isValueArg (Type _) = False
| 27
| true
| true
| 0
| 7
| 29
| 29
| 15
| 14
| null | null |
gafiatulin/codewars
|
src/7 kyu/Arpeggio.hs
|
mit
|
arpeggio :: Char -> Maybe String
arpeggio n | n `elem` scale = Just( (\s -> [head s, s!!2, s!!4, s!!7]) . dropWhile (<n) . cycle $ scale )
| otherwise = Nothing
where scale = ['A'..'G']
| 207
|
arpeggio :: Char -> Maybe String
arpeggio n | n `elem` scale = Just( (\s -> [head s, s!!2, s!!4, s!!7]) . dropWhile (<n) . cycle $ scale )
| otherwise = Nothing
where scale = ['A'..'G']
| 207
|
arpeggio n | n `elem` scale = Just( (\s -> [head s, s!!2, s!!4, s!!7]) . dropWhile (<n) . cycle $ scale )
| otherwise = Nothing
where scale = ['A'..'G']
| 174
| false
| true
| 0
| 14
| 58
| 114
| 60
| 54
| null | null |
dysinger/amazonka
|
amazonka-ec2/gen/Network/AWS/EC2/RunInstances.hs
|
mpl-2.0
|
riDryRun :: Lens' RunInstances (Maybe Bool)
riDryRun = lens _riDryRun (\s a -> s { _riDryRun = a })
| 99
|
riDryRun :: Lens' RunInstances (Maybe Bool)
riDryRun = lens _riDryRun (\s a -> s { _riDryRun = a })
| 99
|
riDryRun = lens _riDryRun (\s a -> s { _riDryRun = a })
| 55
| false
| true
| 0
| 9
| 18
| 45
| 24
| 21
| null | null |
mightymoose/liquidhaskell
|
benchmarks/llrbtree-0.1.1/Data/Set/LLRBTree.hs
|
bsd-3-clause
|
-- ensured Black thanks to split
difference t1 (Node _ _ l x r) = merge (difference l' l) (difference r' r)
where
(l',r') = split x t1
| 140
|
difference t1 (Node _ _ l x r) = merge (difference l' l) (difference r' r)
where
(l',r') = split x t1
| 107
|
difference t1 (Node _ _ l x r) = merge (difference l' l) (difference r' r)
where
(l',r') = split x t1
| 107
| true
| false
| 0
| 7
| 33
| 67
| 33
| 34
| null | null |
futtetennista/IntroductionToFunctionalProgramming
|
PiH/src/Compiler.hs
|
mit
|
execC (ADD c) =
addC (execC c)
| 32
|
execC (ADD c) =
addC (execC c)
| 32
|
execC (ADD c) =
addC (execC c)
| 32
| false
| false
| 0
| 6
| 8
| 25
| 11
| 14
| null | null |
takoeight0821/malgo
|
src/Malgo/Rename/Pass.hs
|
bsd-3-clause
|
lookupBox pos String {} = lookupVarName pos "String#"
| 53
|
lookupBox pos String {} = lookupVarName pos "String#"
| 53
|
lookupBox pos String {} = lookupVarName pos "String#"
| 53
| false
| false
| 0
| 6
| 7
| 20
| 9
| 11
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.