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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d0kt0r0/Tidal | src/Sound/Tidal/Core.hs | gpl-3.0 | in102 :: Pattern Double
in102 = cF 0 "102" | 42 | in102 :: Pattern Double
in102 = cF 0 "102" | 42 | in102 = cF 0 "102" | 18 | false | true | 1 | 5 | 8 | 24 | 9 | 15 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 1765 = 1764 | 11 | 1765 = 1764 | 11 | 1765 = 1764 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
zackp30/programs | hs/Hello.hs | apache-2.0 | greet :: Sample -> IO ()
greet (Sample h False) = putStrLn $ "Hello, " ++ h | 75 | greet :: Sample -> IO ()
greet (Sample h False) = putStrLn $ "Hello, " ++ h | 75 | greet (Sample h False) = putStrLn $ "Hello, " ++ h | 50 | false | true | 0 | 7 | 16 | 39 | 19 | 20 | null | null |
sw17ch/gator | examples/halfAdder.hs | bsd-3-clause | logic :: StateT Logic IO ()
logic = do
inA <- newInputN "A"
inB <- newInputN "B"
outS <- newOutputN "S"
outC <- newOutputN "C"
(xor,and) <- halfAdder inA inB
connect xor outS
connect and outC
{-
- A Half Adder.
- See: http://en.wikipedia.org/wiki/Adder_(electronics)#Half_adder
-} | 314 | logic :: StateT Logic IO ()
logic = do
inA <- newInputN "A"
inB <- newInputN "B"
outS <- newOutputN "S"
outC <- newOutputN "C"
(xor,and) <- halfAdder inA inB
connect xor outS
connect and outC
{-
- A Half Adder.
- See: http://en.wikipedia.org/wiki/Adder_(electronics)#Half_adder
-} | 314 | logic = do
inA <- newInputN "A"
inB <- newInputN "B"
outS <- newOutputN "S"
outC <- newOutputN "C"
(xor,and) <- halfAdder inA inB
connect xor outS
connect and outC
{-
- A Half Adder.
- See: http://en.wikipedia.org/wiki/Adder_(electronics)#Half_adder
-} | 286 | false | true | 0 | 8 | 78 | 95 | 42 | 53 | null | null |
urbanslug/cs194 | Src/Week8/HW08.hs | gpl-3.0 | battleResults [] _ = mempty | 27 | battleResults [] _ = mempty | 27 | battleResults [] _ = mempty | 27 | false | false | 0 | 5 | 4 | 15 | 6 | 9 | null | null |
IreneKnapp/Faction | faction/Distribution/Client/Config.hs | bsd-3-clause | ppSection :: String -> String -> [FieldDescr a] -> a -> a -> Disp.Doc
ppSection name arg fields def cur =
Disp.text name <+> Disp.text arg
$$ Disp.nest 2 (ppFields fields def cur) | 186 | ppSection :: String -> String -> [FieldDescr a] -> a -> a -> Disp.Doc
ppSection name arg fields def cur =
Disp.text name <+> Disp.text arg
$$ Disp.nest 2 (ppFields fields def cur) | 186 | ppSection name arg fields def cur =
Disp.text name <+> Disp.text arg
$$ Disp.nest 2 (ppFields fields def cur) | 116 | false | true | 2 | 10 | 39 | 86 | 41 | 45 | null | null |
yuttie/ghc-mod | Language/Haskell/GhcMod/Browse.hs | bsd-3-clause | showThing _ _ = Nothing | 38 | showThing _ _ = Nothing | 38 | showThing _ _ = Nothing | 38 | false | false | 0 | 5 | 19 | 11 | 5 | 6 | null | null |
abayley/netpoll | test/TestUDP.hs | gpl-3.0 | test_word2Words :: HUnit.Test
test_word2Words = "test_word2Words" ~: HUnit.TestCase $ do
UDP.word2Words 0 @?= [0]
UDP.word2Words 1 @?= [1]
UDP.word2Words 128 @?= [128]
UDP.word2Words 256 @?= [1, 0]
UDP.word2Words maxBound @?= [255, 255, 255, 255, 255, 255, 255, 255] | 286 | test_word2Words :: HUnit.Test
test_word2Words = "test_word2Words" ~: HUnit.TestCase $ do
UDP.word2Words 0 @?= [0]
UDP.word2Words 1 @?= [1]
UDP.word2Words 128 @?= [128]
UDP.word2Words 256 @?= [1, 0]
UDP.word2Words maxBound @?= [255, 255, 255, 255, 255, 255, 255, 255] | 286 | test_word2Words = "test_word2Words" ~: HUnit.TestCase $ do
UDP.word2Words 0 @?= [0]
UDP.word2Words 1 @?= [1]
UDP.word2Words 128 @?= [128]
UDP.word2Words 256 @?= [1, 0]
UDP.word2Words maxBound @?= [255, 255, 255, 255, 255, 255, 255, 255] | 256 | false | true | 0 | 10 | 57 | 122 | 63 | 59 | null | null |
Zimmi48/gps-bank-data-analysis | XmlInputReader.hs | mpl-2.0 | -- splitOn always returns a non-empty list so there is no problem with this definition
-- returns a list of couples of a node and its text content
to_nodes_and_texts :: String -> [String]
to_nodes_and_texts = splitOneOf "<>" | 225 | to_nodes_and_texts :: String -> [String]
to_nodes_and_texts = splitOneOf "<>" | 77 | to_nodes_and_texts = splitOneOf "<>" | 36 | true | true | 0 | 8 | 37 | 29 | 14 | 15 | null | null |
ksaveljev/hake-2 | src/Render/Fast/Light.hs | bsd-3-clause | recursiveLightPoint :: MNodeChild -> V3 Float -> V3 Float -> Quake Int
recursiveLightPoint (MLeafChildReference _) _ _ = return (-1) | 132 | recursiveLightPoint :: MNodeChild -> V3 Float -> V3 Float -> Quake Int
recursiveLightPoint (MLeafChildReference _) _ _ = return (-1) | 132 | recursiveLightPoint (MLeafChildReference _) _ _ = return (-1) | 61 | false | true | 0 | 8 | 19 | 53 | 25 | 28 | null | null |
acowley/ghc | compiler/prelude/THNames.hs | bsd-3-clause | typeTyConKey = mkPreludeTyConUnique 212 | 50 | typeTyConKey = mkPreludeTyConUnique 212 | 50 | typeTyConKey = mkPreludeTyConUnique 212 | 50 | false | false | 0 | 5 | 14 | 9 | 4 | 5 | null | null |
isomorphism/webgl | src/Graphics/Rendering/WebGL/Constants.hs | mit | gl_TRANSFORM_FEEDBACK_BUFFER_START :: GLenum
gl_TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84 | 88 | gl_TRANSFORM_FEEDBACK_BUFFER_START :: GLenum
gl_TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84 | 88 | gl_TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84 | 43 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
capn-freako/lambda-ccc | src/LambdaCCC/Monomorphize.hs | bsd-3-clause | -- TODO: Rethink these three names
-- | e ==> abst (repr e). In Core, abst is
-- abst ty $hasRepTy ty' (Eq# * ty' (Rep ty) (sym (co :: Rep ty ~ ty'))),
-- where e :: ty, and co normalizes Rep ty to ty'.
abstReprR :: ReExpr
abstReprR = do meth <- hasRepMethodT . exprTypeT
meth "abst" . meth "repr"
-- Do one unfolding, and then a second one only if the function name starts with
-- "$", as in the case of a method lifted to the top level. | 456 | abstReprR :: ReExpr
abstReprR = do meth <- hasRepMethodT . exprTypeT
meth "abst" . meth "repr"
-- Do one unfolding, and then a second one only if the function name starts with
-- "$", as in the case of a method lifted to the top level. | 251 | abstReprR = do meth <- hasRepMethodT . exprTypeT
meth "abst" . meth "repr"
-- Do one unfolding, and then a second one only if the function name starts with
-- "$", as in the case of a method lifted to the top level. | 231 | true | true | 0 | 8 | 109 | 41 | 22 | 19 | null | null |
zmthy/http-media | test/Network/HTTP/Media/Charset/Tests.hs | mit | testFromString :: TestTree
testFromString = testProperty "fromString" $ do
enc <- genCharset
return $ enc === fromString (show enc)
------------------------------------------------------------------------------ | 220 | testFromString :: TestTree
testFromString = testProperty "fromString" $ do
enc <- genCharset
return $ enc === fromString (show enc)
------------------------------------------------------------------------------ | 220 | testFromString = testProperty "fromString" $ do
enc <- genCharset
return $ enc === fromString (show enc)
------------------------------------------------------------------------------ | 193 | false | true | 0 | 12 | 29 | 53 | 23 | 30 | null | null |
bacchanalia/KitchenSink | KitchenSink/Qualified.hs | gpl-3.0 | -- |'VP.maximum'
vp_maximum = VP.maximum | 40 | vp_maximum = VP.maximum | 23 | vp_maximum = VP.maximum | 23 | true | false | 0 | 5 | 4 | 9 | 5 | 4 | null | null |
bergey/plots | src/Plots/Themes.hs | bsd-3-clause | corperateTheme :: (TypeableFloat n, Renderable (Path V2 n) b) => Theme b V2 n
corperateTheme = constructTheme $
coolThemeConstructor
& constructorColours .~ corperateColours | 179 | corperateTheme :: (TypeableFloat n, Renderable (Path V2 n) b) => Theme b V2 n
corperateTheme = constructTheme $
coolThemeConstructor
& constructorColours .~ corperateColours | 179 | corperateTheme = constructTheme $
coolThemeConstructor
& constructorColours .~ corperateColours | 101 | false | true | 0 | 8 | 28 | 55 | 28 | 27 | null | null |
wouwouwou/2017_module_8 | src/haskell/PP-project-2017/Checker.hs | apache-2.0 | -- Check if a variable name is not used in an expression
nameCheck :: AST -> String -> Bool
nameCheck (ASTVar varName _) id = varName /= id | 147 | nameCheck :: AST -> String -> Bool
nameCheck (ASTVar varName _) id = varName /= id | 90 | nameCheck (ASTVar varName _) id = varName /= id | 55 | true | true | 0 | 10 | 35 | 43 | 20 | 23 | null | null |
nikita-volkov/hasql | library/Hasql/Private/Decoders/Row.hs | mit | value :: Value.Value a -> Row (Maybe a)
value valueDec =
{-# SCC "value" #-}
Row $ ReaderT $ \(Env result row columnsAmount integerDatetimes columnRef) -> ExceptT $ do
col <- readIORef columnRef
writeIORef columnRef (succ col)
if col < columnsAmount
then do
valueMaybe <- {-# SCC "getvalue'" #-} LibPQ.getvalue' result row col
pure $
case valueMaybe of
Nothing ->
Right Nothing
Just value ->
fmap Just $ mapLeft ValueError $
{-# SCC "decode" #-} A.valueParser (Value.run valueDec integerDatetimes) value
else pure (Left EndOfInput)
-- |
-- Next value, decoded using the provided value decoder.
| 715 | value :: Value.Value a -> Row (Maybe a)
value valueDec =
{-# SCC "value" #-}
Row $ ReaderT $ \(Env result row columnsAmount integerDatetimes columnRef) -> ExceptT $ do
col <- readIORef columnRef
writeIORef columnRef (succ col)
if col < columnsAmount
then do
valueMaybe <- {-# SCC "getvalue'" #-} LibPQ.getvalue' result row col
pure $
case valueMaybe of
Nothing ->
Right Nothing
Just value ->
fmap Just $ mapLeft ValueError $
{-# SCC "decode" #-} A.valueParser (Value.run valueDec integerDatetimes) value
else pure (Left EndOfInput)
-- |
-- Next value, decoded using the provided value decoder.
| 715 | value valueDec =
{-# SCC "value" #-}
Row $ ReaderT $ \(Env result row columnsAmount integerDatetimes columnRef) -> ExceptT $ do
col <- readIORef columnRef
writeIORef columnRef (succ col)
if col < columnsAmount
then do
valueMaybe <- {-# SCC "getvalue'" #-} LibPQ.getvalue' result row col
pure $
case valueMaybe of
Nothing ->
Right Nothing
Just value ->
fmap Just $ mapLeft ValueError $
{-# SCC "decode" #-} A.valueParser (Value.run valueDec integerDatetimes) value
else pure (Left EndOfInput)
-- |
-- Next value, decoded using the provided value decoder.
| 675 | false | true | 4 | 20 | 216 | 198 | 93 | 105 | null | null |
yuvallanger/yasamsim | Setup.hs | agpl-3.0 | main = defaultMain | 18 | main = defaultMain | 18 | main = defaultMain | 18 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
andrey013/pluginstest | Plugins/Gallery/Gallery/Manual35.hs | mit | burst = mconcat . take 13 . iterate (rotateBy (-1/13)) $ spike | 62 | burst = mconcat . take 13 . iterate (rotateBy (-1/13)) $ spike | 62 | burst = mconcat . take 13 . iterate (rotateBy (-1/13)) $ spike | 62 | false | false | 0 | 12 | 11 | 39 | 19 | 20 | null | null |
markflorisson/hpack | testrepo/bytestring-0.10.2.0/bench/BenchAll.hs | bsd-3-clause | benchB :: String -> a -> (a -> Builder) -> Benchmark
benchB name x b =
bench (name ++" (" ++ show nRepl ++ ")") $
whnf (L.length . toLazyByteString . b) x | 166 | benchB :: String -> a -> (a -> Builder) -> Benchmark
benchB name x b =
bench (name ++" (" ++ show nRepl ++ ")") $
whnf (L.length . toLazyByteString . b) x | 166 | benchB name x b =
bench (name ++" (" ++ show nRepl ++ ")") $
whnf (L.length . toLazyByteString . b) x | 113 | false | true | 0 | 10 | 44 | 80 | 40 | 40 | null | null |
mightymoose/liquidhaskell | benchmarks/bytestring-0.9.2.1/Data/ByteString/Char8.hs | bsd-3-clause | ------------------------------------------------------------------------
-- | /O(1)/ Convert a 'Char' into a 'ByteString'
singleton :: Char -> ByteString
singleton = B.singleton . c2w | 184 | singleton :: Char -> ByteString
singleton = B.singleton . c2w | 61 | singleton = B.singleton . c2w | 29 | true | true | 0 | 6 | 20 | 23 | 13 | 10 | null | null |
expipiplus1/vulkan | examples/rays/Pipeline.hs | bsd-3-clause | createRayGenerationShader
:: V (ReleaseKey, SomeStruct PipelineShaderStageCreateInfo)
createRayGenerationShader = do
let code = $(compileShaderQ (Just "spirv1.4") "rgen" Nothing [glsl|
#version 460
#extension GL_EXT_ray_tracing : require
layout(binding = 0, set = 0) uniform accelerationStructureEXT topLevelAS;
layout(binding = 1, set = 0, rgba8) uniform writeonly image2D image;
layout(location = 0) rayPayloadEXT vec3 prd;
layout(set = 0, binding = 3) uniform CameraBuffer
{
mat4x4 viewInverse;
mat4x4 projInverse;
};
void main()
{
const vec2 pixelCenter = vec2(gl_LaunchIDEXT.xy) + vec2(0.5);
const vec2 inUV = pixelCenter/vec2(gl_LaunchSizeEXT.xy);
const vec2 scr = inUV * 2.0 - 1.0;
const vec3 origin = (viewInverse * vec4(0,0,0,1)).xyz;
const vec3 direction =
normalize((viewInverse * vec4((projInverse * vec4(scr,1,1)).xyz, 0)).xyz);
const uint rayFlags = gl_RayFlagsOpaqueEXT;
const float tMin = 0.001;
const float tMax = 10e10;
const uint cullMask = 0xff;
const uint sbtRecordOffset = 0;
const uint sbtRecordStride = 1;
const uint missIndex = 0;
traceRayEXT(topLevelAS,
rayFlags,
cullMask,
sbtRecordOffset,
sbtRecordStride,
missIndex,
origin.xyz,
tMin,
direction.xyz,
tMax,
0);
imageStore(image, ivec2(gl_LaunchIDEXT.xy), vec4(prd, 1.0));
}
|])
(key, module') <- withShaderModule' zero { code }
let shaderStageCreateInfo =
zero { stage = SHADER_STAGE_RAYGEN_BIT_KHR, module', name = "main" }
pure (key, SomeStruct shaderStageCreateInfo) | 2,017 | createRayGenerationShader
:: V (ReleaseKey, SomeStruct PipelineShaderStageCreateInfo)
createRayGenerationShader = do
let code = $(compileShaderQ (Just "spirv1.4") "rgen" Nothing [glsl|
#version 460
#extension GL_EXT_ray_tracing : require
layout(binding = 0, set = 0) uniform accelerationStructureEXT topLevelAS;
layout(binding = 1, set = 0, rgba8) uniform writeonly image2D image;
layout(location = 0) rayPayloadEXT vec3 prd;
layout(set = 0, binding = 3) uniform CameraBuffer
{
mat4x4 viewInverse;
mat4x4 projInverse;
};
void main()
{
const vec2 pixelCenter = vec2(gl_LaunchIDEXT.xy) + vec2(0.5);
const vec2 inUV = pixelCenter/vec2(gl_LaunchSizeEXT.xy);
const vec2 scr = inUV * 2.0 - 1.0;
const vec3 origin = (viewInverse * vec4(0,0,0,1)).xyz;
const vec3 direction =
normalize((viewInverse * vec4((projInverse * vec4(scr,1,1)).xyz, 0)).xyz);
const uint rayFlags = gl_RayFlagsOpaqueEXT;
const float tMin = 0.001;
const float tMax = 10e10;
const uint cullMask = 0xff;
const uint sbtRecordOffset = 0;
const uint sbtRecordStride = 1;
const uint missIndex = 0;
traceRayEXT(topLevelAS,
rayFlags,
cullMask,
sbtRecordOffset,
sbtRecordStride,
missIndex,
origin.xyz,
tMin,
direction.xyz,
tMax,
0);
imageStore(image, ivec2(gl_LaunchIDEXT.xy), vec4(prd, 1.0));
}
|])
(key, module') <- withShaderModule' zero { code }
let shaderStageCreateInfo =
zero { stage = SHADER_STAGE_RAYGEN_BIT_KHR, module', name = "main" }
pure (key, SomeStruct shaderStageCreateInfo) | 2,017 | createRayGenerationShader = do
let code = $(compileShaderQ (Just "spirv1.4") "rgen" Nothing [glsl|
#version 460
#extension GL_EXT_ray_tracing : require
layout(binding = 0, set = 0) uniform accelerationStructureEXT topLevelAS;
layout(binding = 1, set = 0, rgba8) uniform writeonly image2D image;
layout(location = 0) rayPayloadEXT vec3 prd;
layout(set = 0, binding = 3) uniform CameraBuffer
{
mat4x4 viewInverse;
mat4x4 projInverse;
};
void main()
{
const vec2 pixelCenter = vec2(gl_LaunchIDEXT.xy) + vec2(0.5);
const vec2 inUV = pixelCenter/vec2(gl_LaunchSizeEXT.xy);
const vec2 scr = inUV * 2.0 - 1.0;
const vec3 origin = (viewInverse * vec4(0,0,0,1)).xyz;
const vec3 direction =
normalize((viewInverse * vec4((projInverse * vec4(scr,1,1)).xyz, 0)).xyz);
const uint rayFlags = gl_RayFlagsOpaqueEXT;
const float tMin = 0.001;
const float tMax = 10e10;
const uint cullMask = 0xff;
const uint sbtRecordOffset = 0;
const uint sbtRecordStride = 1;
const uint missIndex = 0;
traceRayEXT(topLevelAS,
rayFlags,
cullMask,
sbtRecordOffset,
sbtRecordStride,
missIndex,
origin.xyz,
tMin,
direction.xyz,
tMax,
0);
imageStore(image, ivec2(gl_LaunchIDEXT.xy), vec4(prd, 1.0));
}
|])
(key, module') <- withShaderModule' zero { code }
let shaderStageCreateInfo =
zero { stage = SHADER_STAGE_RAYGEN_BIT_KHR, module', name = "main" }
pure (key, SomeStruct shaderStageCreateInfo) | 1,929 | false | true | 1 | 15 | 752 | 121 | 62 | 59 | null | null |
vollmerm/accelerate-apart | Data/Array/Accelerate/Apart/Type.hs | bsd-3-clause | nonNumTypeToC (TypeCUChar _) = [cty|unsigned char|] | 51 | nonNumTypeToC (TypeCUChar _) = [cty|unsigned char|] | 51 | nonNumTypeToC (TypeCUChar _) = [cty|unsigned char|] | 51 | false | false | 0 | 6 | 5 | 20 | 11 | 9 | null | null |
wilbowma/accelerate | Data/Array/Accelerate/Pretty/Traverse.hs | bsd-3-clause | labelForPrimFun (PrimLt _) = "PrimLt" | 49 | labelForPrimFun (PrimLt _) = "PrimLt" | 49 | labelForPrimFun (PrimLt _) = "PrimLt" | 49 | false | false | 0 | 6 | 16 | 16 | 7 | 9 | null | null |
frantisekfarka/ghc-dsi | testsuite/tests/profiling/should_run/T3001-2.hs | bsd-3-clause | etZ :: Get S
getZ = Get (\s -> (s, s))
| 41 | getZ :: Get S
getZ = Get (\s -> (s, s)) | 41 | getZ = Get (\s -> (s, s)) | 27 | false | true | 1 | 8 | 13 | 34 | 17 | 17 | null | null |
kawamuray/ganeti | src/Ganeti/Constants.hs | gpl-2.0 | htFake :: String
htFake = Types.hypervisorToRaw Fake | 52 | htFake :: String
htFake = Types.hypervisorToRaw Fake | 52 | htFake = Types.hypervisorToRaw Fake | 35 | false | true | 0 | 6 | 6 | 16 | 8 | 8 | null | null |
alexvong1995/pandoc | src/Text/Pandoc/Readers/Docx/Parse.hs | gpl-2.0 | archiveToNotes :: Archive -> Notes
archiveToNotes zf =
let fnElem = findEntryByPath "word/footnotes.xml" zf
>>= (parseXMLDoc . UTF8.toStringLazy . fromEntry)
enElem = findEntryByPath "word/endnotes.xml" zf
>>= (parseXMLDoc . UTF8.toStringLazy . fromEntry)
fn_namespaces = case fnElem of
Just e -> elemToNameSpaces e
Nothing -> []
en_namespaces = case enElem of
Just e -> elemToNameSpaces e
Nothing -> []
ns = unionBy (\x y -> fst x == fst y) fn_namespaces en_namespaces
fn = fnElem >>= (elemToNotes ns "footnote")
en = enElem >>= (elemToNotes ns "endnote")
in
Notes ns fn en | 679 | archiveToNotes :: Archive -> Notes
archiveToNotes zf =
let fnElem = findEntryByPath "word/footnotes.xml" zf
>>= (parseXMLDoc . UTF8.toStringLazy . fromEntry)
enElem = findEntryByPath "word/endnotes.xml" zf
>>= (parseXMLDoc . UTF8.toStringLazy . fromEntry)
fn_namespaces = case fnElem of
Just e -> elemToNameSpaces e
Nothing -> []
en_namespaces = case enElem of
Just e -> elemToNameSpaces e
Nothing -> []
ns = unionBy (\x y -> fst x == fst y) fn_namespaces en_namespaces
fn = fnElem >>= (elemToNotes ns "footnote")
en = enElem >>= (elemToNotes ns "endnote")
in
Notes ns fn en | 679 | archiveToNotes zf =
let fnElem = findEntryByPath "word/footnotes.xml" zf
>>= (parseXMLDoc . UTF8.toStringLazy . fromEntry)
enElem = findEntryByPath "word/endnotes.xml" zf
>>= (parseXMLDoc . UTF8.toStringLazy . fromEntry)
fn_namespaces = case fnElem of
Just e -> elemToNameSpaces e
Nothing -> []
en_namespaces = case enElem of
Just e -> elemToNameSpaces e
Nothing -> []
ns = unionBy (\x y -> fst x == fst y) fn_namespaces en_namespaces
fn = fnElem >>= (elemToNotes ns "footnote")
en = enElem >>= (elemToNotes ns "endnote")
in
Notes ns fn en | 644 | false | true | 0 | 13 | 193 | 209 | 104 | 105 | null | null |
wolftune/yesodweb.com | Handler/Blog.hs | bsd-2-clause | getContent :: Post -> IO Html
getContent post = do
contentRaw <- S.readFile $ F.encodeString $ blogRoot F.</> postFP post
return $
if F.hasExtension (postFP post) "md"
then markdown def { msXssProtect = False } $ fromStrict $ decodeUtf8 contentRaw
else unsafeByteString contentRaw | 320 | getContent :: Post -> IO Html
getContent post = do
contentRaw <- S.readFile $ F.encodeString $ blogRoot F.</> postFP post
return $
if F.hasExtension (postFP post) "md"
then markdown def { msXssProtect = False } $ fromStrict $ decodeUtf8 contentRaw
else unsafeByteString contentRaw | 320 | getContent post = do
contentRaw <- S.readFile $ F.encodeString $ blogRoot F.</> postFP post
return $
if F.hasExtension (postFP post) "md"
then markdown def { msXssProtect = False } $ fromStrict $ decodeUtf8 contentRaw
else unsafeByteString contentRaw | 290 | false | true | 0 | 13 | 82 | 102 | 49 | 53 | null | null |
hvr/vector | Data/Vector/Unboxed.hs | bsd-3-clause | fold1M = G.fold1M | 17 | fold1M = G.fold1M | 17 | fold1M = G.fold1M | 17 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
spechub/Hets | Proofs/HideTheoremShift.hs | gpl-2.0 | compMaybeMorphisms :: Maybe GMorphism -> Maybe GMorphism -> Maybe GMorphism
compMaybeMorphisms morph1 morph2 =
case (morph1, morph2) of
(Just m1, Just m2) -> resultToMaybe $ compInclusion logicGraph m1 m2
-- This should be compInclusion, but this would need the logic graph
_ -> Nothing | 303 | compMaybeMorphisms :: Maybe GMorphism -> Maybe GMorphism -> Maybe GMorphism
compMaybeMorphisms morph1 morph2 =
case (morph1, morph2) of
(Just m1, Just m2) -> resultToMaybe $ compInclusion logicGraph m1 m2
-- This should be compInclusion, but this would need the logic graph
_ -> Nothing | 303 | compMaybeMorphisms morph1 morph2 =
case (morph1, morph2) of
(Just m1, Just m2) -> resultToMaybe $ compInclusion logicGraph m1 m2
-- This should be compInclusion, but this would need the logic graph
_ -> Nothing | 227 | false | true | 3 | 7 | 60 | 79 | 39 | 40 | null | null |
allanderek/ipclib | Language/Ptrees/Evaluate.hs | gpl-2.0 | evaluateTranslation :: Environment a -> ModelTree
-> TranslateTarget -> IOMainControl Result
evaluateTranslation env modelTree (JavaSimulator) =
do eModelTree <- evaluateModelTree env modelTree
(mFile,model) <- getModel env eModelTree
liftMC $ staticAnalyseModel model
simpResult <- liftMC $ Simplify.simplify [] model
let simpModel = Simplify.simplifiedModel simpResult
-- So actually we of course don't actually want the state space.
fullSpace <- liftMC $ States.getModelStateSpace genOpts simpModel
noVanishing <- liftMC $ States.removeImmediateStates fullSpace
let javaFile = Ptrees.resultOfModelFile ".java" mFile
className = File.takeBaseName javaFile
contents = JavaSimulator.statespaceToSimulator className noVanishing
return $ FileResult javaFile contents
where
genOpts = Ipc.getSpaceGenerationOptions $ envCliOpts env | 945 | evaluateTranslation :: Environment a -> ModelTree
-> TranslateTarget -> IOMainControl Result
evaluateTranslation env modelTree (JavaSimulator) =
do eModelTree <- evaluateModelTree env modelTree
(mFile,model) <- getModel env eModelTree
liftMC $ staticAnalyseModel model
simpResult <- liftMC $ Simplify.simplify [] model
let simpModel = Simplify.simplifiedModel simpResult
-- So actually we of course don't actually want the state space.
fullSpace <- liftMC $ States.getModelStateSpace genOpts simpModel
noVanishing <- liftMC $ States.removeImmediateStates fullSpace
let javaFile = Ptrees.resultOfModelFile ".java" mFile
className = File.takeBaseName javaFile
contents = JavaSimulator.statespaceToSimulator className noVanishing
return $ FileResult javaFile contents
where
genOpts = Ipc.getSpaceGenerationOptions $ envCliOpts env | 945 | evaluateTranslation env modelTree (JavaSimulator) =
do eModelTree <- evaluateModelTree env modelTree
(mFile,model) <- getModel env eModelTree
liftMC $ staticAnalyseModel model
simpResult <- liftMC $ Simplify.simplify [] model
let simpModel = Simplify.simplifiedModel simpResult
-- So actually we of course don't actually want the state space.
fullSpace <- liftMC $ States.getModelStateSpace genOpts simpModel
noVanishing <- liftMC $ States.removeImmediateStates fullSpace
let javaFile = Ptrees.resultOfModelFile ".java" mFile
className = File.takeBaseName javaFile
contents = JavaSimulator.statespaceToSimulator className noVanishing
return $ FileResult javaFile contents
where
genOpts = Ipc.getSpaceGenerationOptions $ envCliOpts env | 830 | false | true | 0 | 11 | 212 | 215 | 99 | 116 | null | null |
denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs | bsd-3-clause | -- | 'v1APIResourceShortNames' Lens
v1APIResourceShortNamesL :: Lens_' V1APIResource (Maybe [Text])
v1APIResourceShortNamesL f V1APIResource{..} = (\v1APIResourceShortNames -> V1APIResource { v1APIResourceShortNames, ..} ) <$> f v1APIResourceShortNames | 252 | v1APIResourceShortNamesL :: Lens_' V1APIResource (Maybe [Text])
v1APIResourceShortNamesL f V1APIResource{..} = (\v1APIResourceShortNames -> V1APIResource { v1APIResourceShortNames, ..} ) <$> f v1APIResourceShortNames | 216 | v1APIResourceShortNamesL f V1APIResource{..} = (\v1APIResourceShortNames -> V1APIResource { v1APIResourceShortNames, ..} ) <$> f v1APIResourceShortNames | 152 | true | true | 1 | 8 | 23 | 64 | 32 | 32 | null | null |
kejace/ethereum-client-haskell | exec_src/Main.hs | bsd-3-clause | doit::EthCryptM ContextM ()
doit = do
liftIO $ putStrLn "Connected"
lift $ lift $ addCode B.empty --This is probably a bad place to do this, but I can't think of a more natural place to do it.... Empty code is used all over the place, and it needs to be in the database.
sendMsg =<< (liftIO mkHello)
lift (lift . setStateRoot . blockDataStateRoot . blockBlockData =<< getBestBlock)
--signedTx <- createTransaction simpleTX
--signedTx <- createTransaction outOfGasTX
--signedTx <- createTransaction simpleStorageTX
--signedTx <- createTransaction createContractTX
--signedTx <- createTransaction sendMessageTX
--signedTx <- createTransaction createContractTX
--signedTx <- createTransaction paymentContract
--signedTx <- createTransaction sendCoinTX
--signedTx <- createTransaction keyValuePublisher
--signedTx <- createTransaction sendKeyVal
--liftIO $ print $ whoSignedThisTransaction signedTx
--sendMessage socket $ Transactions [signedTx]
--signedTxs <- createTransactions [createMysteryContract]
--liftIO $ sendMessage socket $ Transactions signedTxs
readAndOutput | 1,142 | doit::EthCryptM ContextM ()
doit = do
liftIO $ putStrLn "Connected"
lift $ lift $ addCode B.empty --This is probably a bad place to do this, but I can't think of a more natural place to do it.... Empty code is used all over the place, and it needs to be in the database.
sendMsg =<< (liftIO mkHello)
lift (lift . setStateRoot . blockDataStateRoot . blockBlockData =<< getBestBlock)
--signedTx <- createTransaction simpleTX
--signedTx <- createTransaction outOfGasTX
--signedTx <- createTransaction simpleStorageTX
--signedTx <- createTransaction createContractTX
--signedTx <- createTransaction sendMessageTX
--signedTx <- createTransaction createContractTX
--signedTx <- createTransaction paymentContract
--signedTx <- createTransaction sendCoinTX
--signedTx <- createTransaction keyValuePublisher
--signedTx <- createTransaction sendKeyVal
--liftIO $ print $ whoSignedThisTransaction signedTx
--sendMessage socket $ Transactions [signedTx]
--signedTxs <- createTransactions [createMysteryContract]
--liftIO $ sendMessage socket $ Transactions signedTxs
readAndOutput | 1,142 | doit = do
liftIO $ putStrLn "Connected"
lift $ lift $ addCode B.empty --This is probably a bad place to do this, but I can't think of a more natural place to do it.... Empty code is used all over the place, and it needs to be in the database.
sendMsg =<< (liftIO mkHello)
lift (lift . setStateRoot . blockDataStateRoot . blockBlockData =<< getBestBlock)
--signedTx <- createTransaction simpleTX
--signedTx <- createTransaction outOfGasTX
--signedTx <- createTransaction simpleStorageTX
--signedTx <- createTransaction createContractTX
--signedTx <- createTransaction sendMessageTX
--signedTx <- createTransaction createContractTX
--signedTx <- createTransaction paymentContract
--signedTx <- createTransaction sendCoinTX
--signedTx <- createTransaction keyValuePublisher
--signedTx <- createTransaction sendKeyVal
--liftIO $ print $ whoSignedThisTransaction signedTx
--sendMessage socket $ Transactions [signedTx]
--signedTxs <- createTransactions [createMysteryContract]
--liftIO $ sendMessage socket $ Transactions signedTxs
readAndOutput | 1,114 | false | true | 0 | 12 | 203 | 100 | 54 | 46 | null | null |
Happy0/haskellscrabble | test/Tests/FullGameTest.hs | gpl-3.0 | setupGame :: IO (Either ScrabbleError Game)
setupGame =
do
bag <- letterBag
dict <- testDictionary
return $ resultGame bag dict
where
resultGame bag dict =
do
dc <- dict
let [player1, player2,player3,player4] = map makePlayer ["a","b","c","d"]
makeGame (player1, player2, Just (player3, Just player4)) bag dc | 402 | setupGame :: IO (Either ScrabbleError Game)
setupGame =
do
bag <- letterBag
dict <- testDictionary
return $ resultGame bag dict
where
resultGame bag dict =
do
dc <- dict
let [player1, player2,player3,player4] = map makePlayer ["a","b","c","d"]
makeGame (player1, player2, Just (player3, Just player4)) bag dc | 398 | setupGame =
do
bag <- letterBag
dict <- testDictionary
return $ resultGame bag dict
where
resultGame bag dict =
do
dc <- dict
let [player1, player2,player3,player4] = map makePlayer ["a","b","c","d"]
makeGame (player1, player2, Just (player3, Just player4)) bag dc | 354 | false | true | 0 | 13 | 138 | 137 | 69 | 68 | null | null |
apyrgio/ganeti | src/Ganeti/Metad/WebServer.hs | bsd-2-clause | handleMetadata params GET "ganeti" "latest" "os/parameters.json" =
do remoteAddr <- ByteString.unpack . rqRemoteAddr <$> getRequest
instanceParams <- liftIO $ do
Logging.logInfo $ "OS parameters for " ++ show remoteAddr
readMVar params
serveOsParams remoteAddr instanceParams `catchError`
\err -> do
liftIO . Logging.logWarning $ "Could not serve OS parameters: " ++ err
error404 | 431 | handleMetadata params GET "ganeti" "latest" "os/parameters.json" =
do remoteAddr <- ByteString.unpack . rqRemoteAddr <$> getRequest
instanceParams <- liftIO $ do
Logging.logInfo $ "OS parameters for " ++ show remoteAddr
readMVar params
serveOsParams remoteAddr instanceParams `catchError`
\err -> do
liftIO . Logging.logWarning $ "Could not serve OS parameters: " ++ err
error404 | 431 | handleMetadata params GET "ganeti" "latest" "os/parameters.json" =
do remoteAddr <- ByteString.unpack . rqRemoteAddr <$> getRequest
instanceParams <- liftIO $ do
Logging.logInfo $ "OS parameters for " ++ show remoteAddr
readMVar params
serveOsParams remoteAddr instanceParams `catchError`
\err -> do
liftIO . Logging.logWarning $ "Could not serve OS parameters: " ++ err
error404 | 431 | false | false | 0 | 14 | 102 | 106 | 49 | 57 | null | null |
stgm/prac-testing | week6/Week6.hs | mit | m25 = 2^21701-1 | 15 | m25 = 2^21701-1 | 15 | m25 = 2^21701-1 | 15 | false | false | 0 | 6 | 2 | 14 | 7 | 7 | null | null |
brendanhay/gogol | gogol-tagmanager/gen/Network/Google/TagManager/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'Account' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aPath'
--
-- * 'aShareData'
--
-- * 'aFingerprint'
--
-- * 'aAccountId'
--
-- * 'aName'
--
-- * 'aTagManagerURL'
account
:: Account
account =
Account'
{ _aPath = Nothing
, _aShareData = Nothing
, _aFingerprint = Nothing
, _aAccountId = Nothing
, _aName = Nothing
, _aTagManagerURL = Nothing
} | 494 | account
:: Account
account =
Account'
{ _aPath = Nothing
, _aShareData = Nothing
, _aFingerprint = Nothing
, _aAccountId = Nothing
, _aName = Nothing
, _aTagManagerURL = Nothing
} | 213 | account =
Account'
{ _aPath = Nothing
, _aShareData = Nothing
, _aFingerprint = Nothing
, _aAccountId = Nothing
, _aName = Nothing
, _aTagManagerURL = Nothing
} | 190 | true | true | 0 | 7 | 118 | 74 | 48 | 26 | null | null |
facebookincubator/duckling | Duckling/Time/DA/Rules.hs | bsd-3-clause | ruleHalloweenDay :: Rule
ruleHalloweenDay = Rule
{ name = "halloween day"
, pattern =
[ regex "hall?owe?en"
]
, prod = \_ -> tt $ monthDay 10 31
} | 162 | ruleHalloweenDay :: Rule
ruleHalloweenDay = Rule
{ name = "halloween day"
, pattern =
[ regex "hall?owe?en"
]
, prod = \_ -> tt $ monthDay 10 31
} | 162 | ruleHalloweenDay = Rule
{ name = "halloween day"
, pattern =
[ regex "hall?owe?en"
]
, prod = \_ -> tt $ monthDay 10 31
} | 137 | false | true | 0 | 10 | 44 | 55 | 30 | 25 | null | null |
rjwright/js-typeomatic | DeclarationGraph.hs | apache-2.0 | xprGetVarDecs (LabTernary ex1 ex2 ex3, n, sourceFragment) =
(exprGetVarDecs ex1)
++ (exprGetVarDecs ex2)
++ (exprGetVarDecs ex3)
| 141 | exprGetVarDecs (LabTernary ex1 ex2 ex3, n, sourceFragment) =
(exprGetVarDecs ex1)
++ (exprGetVarDecs ex2)
++ (exprGetVarDecs ex3) | 141 | exprGetVarDecs (LabTernary ex1 ex2 ex3, n, sourceFragment) =
(exprGetVarDecs ex1)
++ (exprGetVarDecs ex2)
++ (exprGetVarDecs ex3) | 141 | false | false | 4 | 7 | 28 | 53 | 26 | 27 | null | null |
bjornbm/astro | src/Astro/Place/Topocentric.hs | bsd-3-clause | -- | Compute azimuth in the topocentric coordinate system
-- defined by the geodetic place. The input position should be defined
-- in the geocentric coordinate system.
azimuth' :: RealFloat a => GeodeticPlace a -> Coord ECR a -> Angle a
azimuth' gs = azimuth . ecrToTopocentric gs | 281 | azimuth' :: RealFloat a => GeodeticPlace a -> Coord ECR a -> Angle a
azimuth' gs = azimuth . ecrToTopocentric gs | 112 | azimuth' gs = azimuth . ecrToTopocentric gs | 43 | true | true | 1 | 9 | 47 | 55 | 25 | 30 | null | null |
buildsome/buildsome | src/Lib/Fifo.hs | gpl-2.0 | dequeue (Fifo new []) =
case reverse new of
[] -> Nothing
(o:os) -> Just (Fifo [] os, o) | 94 | dequeue (Fifo new []) =
case reverse new of
[] -> Nothing
(o:os) -> Just (Fifo [] os, o) | 94 | dequeue (Fifo new []) =
case reverse new of
[] -> Nothing
(o:os) -> Just (Fifo [] os, o) | 94 | false | false | 0 | 11 | 24 | 64 | 31 | 33 | null | null |
Chatanga/codingame-hs | src/Codingame/SourcePackager.hs | mit | getModuleName :: ModuleName SrcSpanInfo -> String
getModuleName (ModuleName _ moduleName) = moduleName | 102 | getModuleName :: ModuleName SrcSpanInfo -> String
getModuleName (ModuleName _ moduleName) = moduleName | 102 | getModuleName (ModuleName _ moduleName) = moduleName | 52 | false | true | 0 | 7 | 11 | 29 | 14 | 15 | null | null |
diminishedprime/.org | reading-list/haskell_programming_from_first_principles/09_12.hs | mit | squish (x:xs) = x ++ squish xs | 30 | squish (x:xs) = x ++ squish xs | 30 | squish (x:xs) = x ++ squish xs | 30 | false | false | 0 | 7 | 6 | 23 | 11 | 12 | null | null |
sukhmel/experiments.haskell | searchProblem.hs | mit | array :: Array Int
array = [] | 29 | array :: Array Int
array = [] | 29 | array = [] | 10 | false | true | 0 | 6 | 6 | 22 | 9 | 13 | null | null |
mainland/nikola | src/Foreign/CUDA/Internal/C2HS.hs | bsd-3-clause | -- Tests whether the given bit mask is contained in the given bit pattern
-- (i.e., all bits set in the mask are also set in the pattern).
--
containsBitMask :: (Num a, Bits a, Enum b) => a -> b -> Bool
bits `containsBitMask` bm = let bm' = fromIntegral . fromEnum $ bm
in
bm' .&. bits == bm' | 348 | containsBitMask :: (Num a, Bits a, Enum b) => a -> b -> Bool
bits `containsBitMask` bm = let bm' = fromIntegral . fromEnum $ bm
in
bm' .&. bits == bm' | 206 | bits `containsBitMask` bm = let bm' = fromIntegral . fromEnum $ bm
in
bm' .&. bits == bm' | 145 | true | true | 0 | 10 | 116 | 78 | 41 | 37 | null | null |
mcmaniac/ghc | compiler/vectorise/Vectorise/Env.hs | bsd-3-clause | -- |Compute vectorisation information that goes into 'ModGuts' (and is stored in interface files).
-- The incoming 'vectInfo' is that from the 'HscEnv' and 'EPS'. The outgoing one contains only the
-- declarations for the currently compiled module; this includes variables, type constructors, and
-- data constructors referenced in VECTORISE pragmas, even if they are defined in an imported
-- module.
--
-- The variables explicitly include class selectors and dfuns.
--
modVectInfo :: GlobalEnv -> [Id] -> [TyCon] -> [CoreVect]-> VectInfo -> VectInfo
modVectInfo env mg_ids mg_tyCons vectDecls info
= info
{ vectInfoVar = mk_env ids (global_vars env)
, vectInfoTyCon = mk_env tyCons (global_tycons env)
, vectInfoDataCon = mk_env dataCons (global_datacons env)
, vectInfoScalarVars = global_scalar_vars env `minusVarSet` vectInfoScalarVars info
, vectInfoScalarTyCons = global_scalar_tycons env `minusNameSet` vectInfoScalarTyCons info
}
where
vectIds = [id | Vect id _ <- vectDecls] ++
[id | VectInst id <- vectDecls]
vectTypeTyCons = [tycon | VectType _ tycon _ <- vectDecls] ++
[tycon | VectClass tycon <- vectDecls]
vectDataCons = concatMap tyConDataCons vectTypeTyCons
ids = mg_ids ++ vectIds ++ dataConIds ++ selIds
tyCons = mg_tyCons ++ vectTypeTyCons
dataCons = concatMap tyConDataCons mg_tyCons ++ vectDataCons
dataConIds = map dataConWorkId dataCons
selIds = concat [ classAllSelIds cls
| tycon <- tyCons
, cls <- maybeToList . tyConClass_maybe $ tycon]
-- Produce an entry for every declaration that is mentioned in the domain of the 'inspectedEnv'
mk_env decls inspectedEnv
= mkNameEnv [(name, (decl, to))
| decl <- decls
, let name = getName decl
, Just to <- [lookupNameEnv inspectedEnv name]] | 2,071 | modVectInfo :: GlobalEnv -> [Id] -> [TyCon] -> [CoreVect]-> VectInfo -> VectInfo
modVectInfo env mg_ids mg_tyCons vectDecls info
= info
{ vectInfoVar = mk_env ids (global_vars env)
, vectInfoTyCon = mk_env tyCons (global_tycons env)
, vectInfoDataCon = mk_env dataCons (global_datacons env)
, vectInfoScalarVars = global_scalar_vars env `minusVarSet` vectInfoScalarVars info
, vectInfoScalarTyCons = global_scalar_tycons env `minusNameSet` vectInfoScalarTyCons info
}
where
vectIds = [id | Vect id _ <- vectDecls] ++
[id | VectInst id <- vectDecls]
vectTypeTyCons = [tycon | VectType _ tycon _ <- vectDecls] ++
[tycon | VectClass tycon <- vectDecls]
vectDataCons = concatMap tyConDataCons vectTypeTyCons
ids = mg_ids ++ vectIds ++ dataConIds ++ selIds
tyCons = mg_tyCons ++ vectTypeTyCons
dataCons = concatMap tyConDataCons mg_tyCons ++ vectDataCons
dataConIds = map dataConWorkId dataCons
selIds = concat [ classAllSelIds cls
| tycon <- tyCons
, cls <- maybeToList . tyConClass_maybe $ tycon]
-- Produce an entry for every declaration that is mentioned in the domain of the 'inspectedEnv'
mk_env decls inspectedEnv
= mkNameEnv [(name, (decl, to))
| decl <- decls
, let name = getName decl
, Just to <- [lookupNameEnv inspectedEnv name]] | 1,599 | modVectInfo env mg_ids mg_tyCons vectDecls info
= info
{ vectInfoVar = mk_env ids (global_vars env)
, vectInfoTyCon = mk_env tyCons (global_tycons env)
, vectInfoDataCon = mk_env dataCons (global_datacons env)
, vectInfoScalarVars = global_scalar_vars env `minusVarSet` vectInfoScalarVars info
, vectInfoScalarTyCons = global_scalar_tycons env `minusNameSet` vectInfoScalarTyCons info
}
where
vectIds = [id | Vect id _ <- vectDecls] ++
[id | VectInst id <- vectDecls]
vectTypeTyCons = [tycon | VectType _ tycon _ <- vectDecls] ++
[tycon | VectClass tycon <- vectDecls]
vectDataCons = concatMap tyConDataCons vectTypeTyCons
ids = mg_ids ++ vectIds ++ dataConIds ++ selIds
tyCons = mg_tyCons ++ vectTypeTyCons
dataCons = concatMap tyConDataCons mg_tyCons ++ vectDataCons
dataConIds = map dataConWorkId dataCons
selIds = concat [ classAllSelIds cls
| tycon <- tyCons
, cls <- maybeToList . tyConClass_maybe $ tycon]
-- Produce an entry for every declaration that is mentioned in the domain of the 'inspectedEnv'
mk_env decls inspectedEnv
= mkNameEnv [(name, (decl, to))
| decl <- decls
, let name = getName decl
, Just to <- [lookupNameEnv inspectedEnv name]] | 1,518 | true | true | 8 | 16 | 616 | 405 | 211 | 194 | null | null |
bergmark/hlint | src/Settings.hs | bsd-3-clause | getNames [] (InfixApp _ lhs op rhs) | opExp op ~= "==>" = map ("Use "++) names
where
lnames = map f $ childrenS lhs
rnames = map f $ childrenS rhs
names = filter (not . isUnifyVar) $ (rnames \\ lnames) ++ rnames
f (Ident _ x) = x
f (Symbol _ x) = x | 292 | getNames [] (InfixApp _ lhs op rhs) | opExp op ~= "==>" = map ("Use "++) names
where
lnames = map f $ childrenS lhs
rnames = map f $ childrenS rhs
names = filter (not . isUnifyVar) $ (rnames \\ lnames) ++ rnames
f (Ident _ x) = x
f (Symbol _ x) = x | 292 | getNames [] (InfixApp _ lhs op rhs) | opExp op ~= "==>" = map ("Use "++) names
where
lnames = map f $ childrenS lhs
rnames = map f $ childrenS rhs
names = filter (not . isUnifyVar) $ (rnames \\ lnames) ++ rnames
f (Ident _ x) = x
f (Symbol _ x) = x | 292 | false | false | 0 | 11 | 99 | 141 | 69 | 72 | null | null |
gcross/either-unwrap | Data/Either/Unwrap.hs | bsd-3-clause | -- | The 'mapBoth' function takes two functions and applies the first if iff the value
-- takes the form 'Left _' and the second if the value takes the form 'Right _'.
mapBoth :: (a -> c) -> (b -> d) -> Either a b -> Either c d
mapBoth f _ (Left x) = Left (f x) | 261 | mapBoth :: (a -> c) -> (b -> d) -> Either a b -> Either c d
mapBoth f _ (Left x) = Left (f x) | 93 | mapBoth f _ (Left x) = Left (f x) | 33 | true | true | 0 | 8 | 58 | 71 | 36 | 35 | null | null |
kawu/concraft-pl | src/NLP/Concraft/Polish/DAG/Server.hs | bsd-2-clause | parse :: ServerCfg -> W.ActionM ()
parse ServerCfg{..} = flip W.rescue (const W.next) $ do
Request{..} <- W.jsonData
let inp = DB.parseData (L.fromStrict dag)
out = Pol.annoAll annoCfg concraft <$> inp
dagStr = DB.showData showCfg out
ans = Answer { dag = L.toStrict dagStr }
-- W.json $ A.object [ "dag" .= dagStr ]
W.json $ A.toJSON ans | 365 | parse :: ServerCfg -> W.ActionM ()
parse ServerCfg{..} = flip W.rescue (const W.next) $ do
Request{..} <- W.jsonData
let inp = DB.parseData (L.fromStrict dag)
out = Pol.annoAll annoCfg concraft <$> inp
dagStr = DB.showData showCfg out
ans = Answer { dag = L.toStrict dagStr }
-- W.json $ A.object [ "dag" .= dagStr ]
W.json $ A.toJSON ans | 365 | parse ServerCfg{..} = flip W.rescue (const W.next) $ do
Request{..} <- W.jsonData
let inp = DB.parseData (L.fromStrict dag)
out = Pol.annoAll annoCfg concraft <$> inp
dagStr = DB.showData showCfg out
ans = Answer { dag = L.toStrict dagStr }
-- W.json $ A.object [ "dag" .= dagStr ]
W.json $ A.toJSON ans | 330 | false | true | 1 | 15 | 84 | 157 | 74 | 83 | null | null |
neothemachine/monadiccp | src/Control/Monatron/AutoLift.hs | bsd-3-clause | tell :: (Monoid z, WriterM z m) => z -> m ()
tell z = traceX writerModel z | 74 | tell :: (Monoid z, WriterM z m) => z -> m ()
tell z = traceX writerModel z | 74 | tell z = traceX writerModel z | 29 | false | true | 0 | 9 | 17 | 51 | 23 | 28 | null | null |
shlevy/ghc | compiler/types/TyCoRep.hs | bsd-3-clause | tyThingCategory :: TyThing -> String
tyThingCategory (ATyCon tc)
| isClassTyCon tc = "class"
| otherwise = "type constructor" | 135 | tyThingCategory :: TyThing -> String
tyThingCategory (ATyCon tc)
| isClassTyCon tc = "class"
| otherwise = "type constructor" | 135 | tyThingCategory (ATyCon tc)
| isClassTyCon tc = "class"
| otherwise = "type constructor" | 98 | false | true | 0 | 9 | 27 | 50 | 21 | 29 | null | null |
rueshyna/gogol | gogol-logging/gen/Network/Google/Logging/Types/Product.hs | mpl-2.0 | -- | Severity of this log entry.
llSeverity :: Lens' LogLine (Maybe LogLineSeverity)
llSeverity
= lens _llSeverity (\ s a -> s{_llSeverity = a}) | 146 | llSeverity :: Lens' LogLine (Maybe LogLineSeverity)
llSeverity
= lens _llSeverity (\ s a -> s{_llSeverity = a}) | 113 | llSeverity
= lens _llSeverity (\ s a -> s{_llSeverity = a}) | 61 | true | true | 0 | 9 | 25 | 48 | 25 | 23 | null | null |
hsyl20/ViperVM | haskus-system/src/lib/Haskus/System/Linux/Internals/FileSystem.hs | bsd-3-clause | -- | Clone (FICLONE)
ioctlClone :: MonadInIO m => Int -> Handle -> FlowT '[ErrorCode] m ()
ioctlClone = ioctlWrite 0x94 9 | 121 | ioctlClone :: MonadInIO m => Int -> Handle -> FlowT '[ErrorCode] m ()
ioctlClone = ioctlWrite 0x94 9 | 100 | ioctlClone = ioctlWrite 0x94 9 | 30 | true | true | 0 | 10 | 21 | 46 | 23 | 23 | null | null |
thielema/wxhaskell | wxdirect/src/MultiSet.hs | lgpl-2.1 | {--------------------------------------------------------------------
Maps
--------------------------------------------------------------------}
-- | /O(1)/. Convert to a 'Map.Map' from elements to number of occurrences.
toMap :: MultiSet a -> M.Map a Int
toMap (MultiSet m)
= m | 284 | toMap :: MultiSet a -> M.Map a Int
toMap (MultiSet m)
= m | 61 | toMap (MultiSet m)
= m | 24 | true | true | 0 | 9 | 34 | 41 | 19 | 22 | null | null |
mcschroeder/ghc | compiler/hsSyn/HsUtils.hs | bsd-3-clause | hsLTyClDeclBinders (L loc (DataDecl { tcdLName = L _ name, tcdDataDefn = defn }))
= (\ (xs, ys) -> (L loc name : xs, ys)) $ hsDataDefnBinders defn | 151 | hsLTyClDeclBinders (L loc (DataDecl { tcdLName = L _ name, tcdDataDefn = defn }))
= (\ (xs, ys) -> (L loc name : xs, ys)) $ hsDataDefnBinders defn | 151 | hsLTyClDeclBinders (L loc (DataDecl { tcdLName = L _ name, tcdDataDefn = defn }))
= (\ (xs, ys) -> (L loc name : xs, ys)) $ hsDataDefnBinders defn | 151 | false | false | 0 | 12 | 32 | 76 | 41 | 35 | null | null |
tsiliakis/xmobar | src/Commands.hs | bsd-3-clause | tenthSeconds :: Int -> IO ()
tenthSeconds s | s >= x = do threadDelay (x * 100000)
tenthSeconds (s - x)
| otherwise = threadDelay (s * 100000)
where x = (maxBound :: Int) `div` 100000 | 242 | tenthSeconds :: Int -> IO ()
tenthSeconds s | s >= x = do threadDelay (x * 100000)
tenthSeconds (s - x)
| otherwise = threadDelay (s * 100000)
where x = (maxBound :: Int) `div` 100000 | 242 | tenthSeconds s | s >= x = do threadDelay (x * 100000)
tenthSeconds (s - x)
| otherwise = threadDelay (s * 100000)
where x = (maxBound :: Int) `div` 100000 | 213 | false | true | 0 | 10 | 95 | 97 | 48 | 49 | null | null |
tmiw/4peas | Forms/RecipeForm.hs | bsd-2-clause | recipeTextListField :: forall sub. Field sub App [Text]
recipeTextListField = Field
{ fieldParse = validateTextList
, fieldView = \idAttr nameAttr _ eResult _ -> [whamlet|
<div class="dyn_list">
<li id=_tmpl_#{idAttr} style="display: none;">
<input type="text">
<img class="dyn_list_element_icon" src=@{StaticR img_delete_png} onClick="deleteListEntry(this);">
<ol id=#{idAttr}>
$case eResult
$of Left errVal
$if T.null errVal
$else
<li>#{errVal}
$of Right listVal
$forall val <- listVal
<li>
<input name=#{nameAttr} type="text" value=#{val}>
<img class="dyn_list_element_icon" src=@{StaticR img_delete_png} onClick="deleteListEntry(this);">
<input type="button" name=#{idAttr}-add value=_{MsgAddButton} onClick="addGenericListEntry('#{idAttr}', '#{nameAttr}')";>
|]
} | 993 | recipeTextListField :: forall sub. Field sub App [Text]
recipeTextListField = Field
{ fieldParse = validateTextList
, fieldView = \idAttr nameAttr _ eResult _ -> [whamlet|
<div class="dyn_list">
<li id=_tmpl_#{idAttr} style="display: none;">
<input type="text">
<img class="dyn_list_element_icon" src=@{StaticR img_delete_png} onClick="deleteListEntry(this);">
<ol id=#{idAttr}>
$case eResult
$of Left errVal
$if T.null errVal
$else
<li>#{errVal}
$of Right listVal
$forall val <- listVal
<li>
<input name=#{nameAttr} type="text" value=#{val}>
<img class="dyn_list_element_icon" src=@{StaticR img_delete_png} onClick="deleteListEntry(this);">
<input type="button" name=#{idAttr}-add value=_{MsgAddButton} onClick="addGenericListEntry('#{idAttr}', '#{nameAttr}')";>
|]
} | 993 | recipeTextListField = Field
{ fieldParse = validateTextList
, fieldView = \idAttr nameAttr _ eResult _ -> [whamlet|
<div class="dyn_list">
<li id=_tmpl_#{idAttr} style="display: none;">
<input type="text">
<img class="dyn_list_element_icon" src=@{StaticR img_delete_png} onClick="deleteListEntry(this);">
<ol id=#{idAttr}>
$case eResult
$of Left errVal
$if T.null errVal
$else
<li>#{errVal}
$of Right listVal
$forall val <- listVal
<li>
<input name=#{nameAttr} type="text" value=#{val}>
<img class="dyn_list_element_icon" src=@{StaticR img_delete_png} onClick="deleteListEntry(this);">
<input type="button" name=#{idAttr}-add value=_{MsgAddButton} onClick="addGenericListEntry('#{idAttr}', '#{nameAttr}')";>
|]
} | 937 | false | true | 0 | 8 | 299 | 66 | 36 | 30 | null | null |
patrickherrmann/hearts | src/Hearts.hs | mit | passingTarget PassRight = nextPlayer . nextPlayer . nextPlayer | 62 | passingTarget PassRight = nextPlayer . nextPlayer . nextPlayer | 62 | passingTarget PassRight = nextPlayer . nextPlayer . nextPlayer | 62 | false | false | 0 | 6 | 7 | 17 | 8 | 9 | null | null |
nominolo/haddock2 | src/Haddock/Backends/Xhtml/Decl.hs | bsd-2-clause | -- generics only
ppr_mono_ty _ (HsSpliceTy {}) _ = error "ppr_mono_ty HsSpliceTy" | 93 | ppr_mono_ty _ (HsSpliceTy {}) _ = error "ppr_mono_ty HsSpliceTy" | 76 | ppr_mono_ty _ (HsSpliceTy {}) _ = error "ppr_mono_ty HsSpliceTy" | 76 | true | false | 0 | 7 | 23 | 24 | 12 | 12 | null | null |
gnn/Hets | Common/IRI.hs | gpl-2.0 | ipathNoScheme :: IRIParser st String
ipathNoScheme = flat $ isegmentNzc <:> many slashIsegment | 94 | ipathNoScheme :: IRIParser st String
ipathNoScheme = flat $ isegmentNzc <:> many slashIsegment | 94 | ipathNoScheme = flat $ isegmentNzc <:> many slashIsegment | 57 | false | true | 0 | 6 | 12 | 27 | 13 | 14 | null | null |
bumptech/riak-haskell-client | src/Network/Riak/Resolvable/Internal.hs | apache-2.0 | putMany :: (Resolvable a) =>
(Connection -> Bucket -> [(Key, Maybe VClock, a)] -> W -> DW
-> IO [([a], VClock)])
-> Connection -> Bucket -> [(Key, Maybe VClock, a)] -> W -> DW
-> IO [(a, VClock)]
putMany doPut conn bucket puts0 w dw = go (0::Int) [] . zip [(0::Int)..] $ puts0
where
go _ acc [] = return . map snd . sortBy (compare `on` fst) $ acc
go !i acc puts
| i == maxRetries = go i (acc ++ (map unmush puts)) []
| otherwise = do
rs <- doPut conn bucket (map snd puts) w dw
let (conflicts, ok) = partitionEithers $ zipWith mush puts rs
unless (null conflicts) $
debugValues "putMany" "conflicts" conflicts
go (i+1) (ok++acc) conflicts
mush (i,(k,mv,c)) (cs,v) =
case cs of
[x] | i > 0 || isJust mv -> Right (i,(x,v))
(_:_) -> Left (i,(k,Just v, resolveMany' c cs))
[] -> unexError "Network.Riak.Resolvable" "put"
"received empty response from server"
unmush (i, (k, Just v, x)) = (i, (x, v))
| 1,040 | putMany :: (Resolvable a) =>
(Connection -> Bucket -> [(Key, Maybe VClock, a)] -> W -> DW
-> IO [([a], VClock)])
-> Connection -> Bucket -> [(Key, Maybe VClock, a)] -> W -> DW
-> IO [(a, VClock)]
putMany doPut conn bucket puts0 w dw = go (0::Int) [] . zip [(0::Int)..] $ puts0
where
go _ acc [] = return . map snd . sortBy (compare `on` fst) $ acc
go !i acc puts
| i == maxRetries = go i (acc ++ (map unmush puts)) []
| otherwise = do
rs <- doPut conn bucket (map snd puts) w dw
let (conflicts, ok) = partitionEithers $ zipWith mush puts rs
unless (null conflicts) $
debugValues "putMany" "conflicts" conflicts
go (i+1) (ok++acc) conflicts
mush (i,(k,mv,c)) (cs,v) =
case cs of
[x] | i > 0 || isJust mv -> Right (i,(x,v))
(_:_) -> Left (i,(k,Just v, resolveMany' c cs))
[] -> unexError "Network.Riak.Resolvable" "put"
"received empty response from server"
unmush (i, (k, Just v, x)) = (i, (x, v))
| 1,040 | putMany doPut conn bucket puts0 w dw = go (0::Int) [] . zip [(0::Int)..] $ puts0
where
go _ acc [] = return . map snd . sortBy (compare `on` fst) $ acc
go !i acc puts
| i == maxRetries = go i (acc ++ (map unmush puts)) []
| otherwise = do
rs <- doPut conn bucket (map snd puts) w dw
let (conflicts, ok) = partitionEithers $ zipWith mush puts rs
unless (null conflicts) $
debugValues "putMany" "conflicts" conflicts
go (i+1) (ok++acc) conflicts
mush (i,(k,mv,c)) (cs,v) =
case cs of
[x] | i > 0 || isJust mv -> Right (i,(x,v))
(_:_) -> Left (i,(k,Just v, resolveMany' c cs))
[] -> unexError "Network.Riak.Resolvable" "put"
"received empty response from server"
unmush (i, (k, Just v, x)) = (i, (x, v))
| 794 | false | true | 0 | 16 | 313 | 538 | 281 | 257 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_PERFQUERY_SINGLE_CONTEXT_INTEL :: GLbitfield
gl_PERFQUERY_SINGLE_CONTEXT_INTEL = 0x00000000 | 94 | gl_PERFQUERY_SINGLE_CONTEXT_INTEL :: GLbitfield
gl_PERFQUERY_SINGLE_CONTEXT_INTEL = 0x00000000 | 94 | gl_PERFQUERY_SINGLE_CONTEXT_INTEL = 0x00000000 | 46 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/simplCore/SimplEnv.hs | bsd-3-clause | simplNonRecBndr :: SimplEnv -> InBndr -> SimplM (SimplEnv, OutBndr)
-- A non-recursive let binder
simplNonRecBndr env id
= do { let (env1, id1) = substIdBndr env id
; seqId id1 `seq` return (env1, id1) } | 214 | simplNonRecBndr :: SimplEnv -> InBndr -> SimplM (SimplEnv, OutBndr)
simplNonRecBndr env id
= do { let (env1, id1) = substIdBndr env id
; seqId id1 `seq` return (env1, id1) } | 184 | simplNonRecBndr env id
= do { let (env1, id1) = substIdBndr env id
; seqId id1 `seq` return (env1, id1) } | 116 | true | true | 0 | 10 | 45 | 79 | 42 | 37 | null | null |
PROTEINE-INSAIDERS/lev-tolstoy | bench/Bench/Cereal.hs | bsd-3-clause | read12Int64PlusInt32 :: Get Int64
read12Int64PlusInt32 = do
a1 <- getWord64host
a2 <- getWord64host
a3 <- getWord64host
a4 <- getWord64host
a5 <- getWord64host
a6 <- getWord64host
a7 <- getWord64host
a8 <- getWord64host
a9 <- getWord64host
a10 <- getWord64host
a11 <- getWord64host
a12 <- getWord64host
a13 <- getWord32host
return $ (fromIntegral (a1 + a2 + a3 + a4
+ a5 + a6 + a7 + a8
+ a9 + a10 + a11 + a12) :: Int64)
+ fromIntegral a13 | 493 | read12Int64PlusInt32 :: Get Int64
read12Int64PlusInt32 = do
a1 <- getWord64host
a2 <- getWord64host
a3 <- getWord64host
a4 <- getWord64host
a5 <- getWord64host
a6 <- getWord64host
a7 <- getWord64host
a8 <- getWord64host
a9 <- getWord64host
a10 <- getWord64host
a11 <- getWord64host
a12 <- getWord64host
a13 <- getWord32host
return $ (fromIntegral (a1 + a2 + a3 + a4
+ a5 + a6 + a7 + a8
+ a9 + a10 + a11 + a12) :: Int64)
+ fromIntegral a13 | 493 | read12Int64PlusInt32 = do
a1 <- getWord64host
a2 <- getWord64host
a3 <- getWord64host
a4 <- getWord64host
a5 <- getWord64host
a6 <- getWord64host
a7 <- getWord64host
a8 <- getWord64host
a9 <- getWord64host
a10 <- getWord64host
a11 <- getWord64host
a12 <- getWord64host
a13 <- getWord32host
return $ (fromIntegral (a1 + a2 + a3 + a4
+ a5 + a6 + a7 + a8
+ a9 + a10 + a11 + a12) :: Int64)
+ fromIntegral a13 | 459 | false | true | 0 | 22 | 131 | 175 | 81 | 94 | null | null |
mzero/barley | src/Barley/AltLoad.hs | apache-2.0 | unify :: FilePath -> [[Char]] -> [String] -> String -> String -> IO [String]
unify obj incs args ty sym = do
(tmpf,hdl) <- mkTemp
(tmpf1,hdl1) <- mkTemp -- and send .hi file here.
hClose hdl1
let nm = mkModid (basename tmpf)
src = mkTest nm (hierize' . mkModid . hierize $ obj)
(fst $ break (=='.') ty) ty sym
is = map ("-i"++) incs -- api
i = "-i" ++ dirname obj -- plugin
hWrite hdl src
e <- build tmpf tmpf1 (i:is++args++["-fno-code","-ohi "++tmpf1])
mapM_ removeFile [tmpf,tmpf1]
return e
where
-- fix up hierarchical names
hierize [] = []
hierize ('/':cs) = '\\' : hierize cs
hierize (c:cs) = c : hierize cs
hierize'[] = []
hierize' ('\\':cs) = '.' : hierize' cs
hierize' (c:cs) = c : hierize' cs | 983 | unify :: FilePath -> [[Char]] -> [String] -> String -> String -> IO [String]
unify obj incs args ty sym = do
(tmpf,hdl) <- mkTemp
(tmpf1,hdl1) <- mkTemp -- and send .hi file here.
hClose hdl1
let nm = mkModid (basename tmpf)
src = mkTest nm (hierize' . mkModid . hierize $ obj)
(fst $ break (=='.') ty) ty sym
is = map ("-i"++) incs -- api
i = "-i" ++ dirname obj -- plugin
hWrite hdl src
e <- build tmpf tmpf1 (i:is++args++["-fno-code","-ohi "++tmpf1])
mapM_ removeFile [tmpf,tmpf1]
return e
where
-- fix up hierarchical names
hierize [] = []
hierize ('/':cs) = '\\' : hierize cs
hierize (c:cs) = c : hierize cs
hierize'[] = []
hierize' ('\\':cs) = '.' : hierize' cs
hierize' (c:cs) = c : hierize' cs | 983 | unify obj incs args ty sym = do
(tmpf,hdl) <- mkTemp
(tmpf1,hdl1) <- mkTemp -- and send .hi file here.
hClose hdl1
let nm = mkModid (basename tmpf)
src = mkTest nm (hierize' . mkModid . hierize $ obj)
(fst $ break (=='.') ty) ty sym
is = map ("-i"++) incs -- api
i = "-i" ++ dirname obj -- plugin
hWrite hdl src
e <- build tmpf tmpf1 (i:is++args++["-fno-code","-ohi "++tmpf1])
mapM_ removeFile [tmpf,tmpf1]
return e
where
-- fix up hierarchical names
hierize [] = []
hierize ('/':cs) = '\\' : hierize cs
hierize (c:cs) = c : hierize cs
hierize'[] = []
hierize' ('\\':cs) = '.' : hierize' cs
hierize' (c:cs) = c : hierize' cs | 906 | false | true | 0 | 14 | 412 | 365 | 186 | 179 | null | null |
paulkoerbitz/slice-cpp-gen | src/slice-cpp-gen.hs | bsd-3-clause | findInterfaces ns i@(InterfaceDecl (Ident nm) _ _) = Map.singleton (nm:ns) i | 76 | findInterfaces ns i@(InterfaceDecl (Ident nm) _ _) = Map.singleton (nm:ns) i | 76 | findInterfaces ns i@(InterfaceDecl (Ident nm) _ _) = Map.singleton (nm:ns) i | 76 | false | false | 1 | 10 | 10 | 49 | 22 | 27 | null | null |
nomeata/sat-britney | AtomIndex.hs | gpl-2.0 | lookupBin :: AtomIndex -> BinI -> Binary
lookupBin (_ :!: _ :!: m :!: _) (Index i) = (\(BinAtom b) -> b) (m IM.! i) | 115 | lookupBin :: AtomIndex -> BinI -> Binary
lookupBin (_ :!: _ :!: m :!: _) (Index i) = (\(BinAtom b) -> b) (m IM.! i) | 115 | lookupBin (_ :!: _ :!: m :!: _) (Index i) = (\(BinAtom b) -> b) (m IM.! i) | 74 | false | true | 0 | 9 | 24 | 71 | 37 | 34 | null | null |
vaibhavsagar/duffer | duffer/src/Duffer/Loose.hs | bsd-3-clause | (^^) :: GitObject -> Int -> WithRepo (Maybe GitObject)
(^^) (GitCommit object) n = readLooseObject $ commitParentRefs object !! (n-1) | 133 | (^^) :: GitObject -> Int -> WithRepo (Maybe GitObject)
(^^) (GitCommit object) n = readLooseObject $ commitParentRefs object !! (n-1) | 133 | (^^) (GitCommit object) n = readLooseObject $ commitParentRefs object !! (n-1) | 78 | false | true | 0 | 10 | 19 | 66 | 33 | 33 | null | null |
ekmett/text | tests/Tests/Properties.hs | bsd-2-clause | tl_Ord s = (compare s) `eq` (compare (TL.pack s) . TL.pack) | 68 | tl_Ord s = (compare s) `eq` (compare (TL.pack s) . TL.pack) | 68 | tl_Ord s = (compare s) `eq` (compare (TL.pack s) . TL.pack) | 68 | false | false | 0 | 11 | 19 | 41 | 21 | 20 | null | null |
nevrenato/Hets_Fork | OMDoc/DataTypes.hs | gpl-2.0 | cdFromList _ = error "cdFromList: Malformed list. I need exactly 2 elements!" | 77 | cdFromList _ = error "cdFromList: Malformed list. I need exactly 2 elements!" | 77 | cdFromList _ = error "cdFromList: Malformed list. I need exactly 2 elements!" | 77 | false | false | 0 | 4 | 11 | 13 | 5 | 8 | null | null |
poliglot/concraft-de | src/NLP/Concraft/German/Format/Plain.hs | bsd-2-clause | parseSpace "newlines" = NewLine | 31 | parseSpace "newlines" = NewLine | 31 | parseSpace "newlines" = NewLine | 31 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
energyflowanalysis/efa-2.1 | src/EFA/Data/Vector.hs | bsd-3-clause | {-
The Functor constraint could be saved
by merging the fmap with the fold.
'f' is evaluated twice for every sub-maximum.
Does this hurt?
-}
argMaximumKey2 ::
(Functor f, Fold.Foldable f, Fold.Foldable g, Ord b) =>
(a -> b) ->
NonEmpty.T f (NonEmpty.T g a) -> ((Int, Int), a)
argMaximumKey2 f =
(\(n,(m,a)) -> ((n,m), a)) .
argMaximumKey (f . snd) .
fmap (argMaximumKey f) | 391 | argMaximumKey2 ::
(Functor f, Fold.Foldable f, Fold.Foldable g, Ord b) =>
(a -> b) ->
NonEmpty.T f (NonEmpty.T g a) -> ((Int, Int), a)
argMaximumKey2 f =
(\(n,(m,a)) -> ((n,m), a)) .
argMaximumKey (f . snd) .
fmap (argMaximumKey f) | 249 | argMaximumKey2 f =
(\(n,(m,a)) -> ((n,m), a)) .
argMaximumKey (f . snd) .
fmap (argMaximumKey f) | 105 | true | true | 0 | 11 | 83 | 149 | 82 | 67 | null | null |
vikraman/ghc | compiler/prelude/THNames.hs | bsd-3-clause | mkNameG_tcIdKey = mkPreludeMiscIdUnique 208 | 48 | mkNameG_tcIdKey = mkPreludeMiscIdUnique 208 | 48 | mkNameG_tcIdKey = mkPreludeMiscIdUnique 208 | 48 | false | false | 0 | 5 | 8 | 9 | 4 | 5 | null | null |
chadbrewbaker/combinat | Math/Combinat/Numbers/Series.hs | bsd-3-clause | rop_conv1_vs_gen exp1 ser = ( one =!= two ) where
one = convolveWithPSeries1 k1 xs
two = convolveWithPSeries [k1] xs
k1 = fromExp exp1
xs = fromSer ser
| 163 | prop_conv1_vs_gen exp1 ser = ( one =!= two ) where
one = convolveWithPSeries1 k1 xs
two = convolveWithPSeries [k1] xs
k1 = fromExp exp1
xs = fromSer ser | 163 | prop_conv1_vs_gen exp1 ser = ( one =!= two ) where
one = convolveWithPSeries1 k1 xs
two = convolveWithPSeries [k1] xs
k1 = fromExp exp1
xs = fromSer ser | 163 | false | false | 0 | 6 | 39 | 58 | 30 | 28 | null | null |
yaxu/hstexture | Texture/Types.hs | gpl-3.0 | sqr :: Num a => a -> a
sqr x = x * x | 36 | sqr :: Num a => a -> a
sqr x = x * x | 36 | sqr x = x * x | 13 | false | true | 0 | 6 | 13 | 29 | 14 | 15 | null | null |
antivo/Playground | Haskell/Crossing puzzle/a_star_h1.hs | gpl-2.0 | main :: IO ()
main = do
numbers <- getLine
output numbers | 61 | main :: IO ()
main = do
numbers <- getLine
output numbers | 61 | main = do
numbers <- getLine
output numbers | 47 | false | true | 0 | 8 | 15 | 35 | 14 | 21 | null | null |
ducis/haAni | hs/common/Graphics/UI/GLUT/Initialization.hs | gpl-2.0 | setContextVersion :: (Int, Int) -> IO ()
setContextVersion (major, minor) =
glutInitContextVersion (fromIntegral major) (fromIntegral minor) | 143 | setContextVersion :: (Int, Int) -> IO ()
setContextVersion (major, minor) =
glutInitContextVersion (fromIntegral major) (fromIntegral minor) | 143 | setContextVersion (major, minor) =
glutInitContextVersion (fromIntegral major) (fromIntegral minor) | 102 | false | true | 0 | 7 | 18 | 52 | 27 | 25 | null | null |
ku-fpg/hermit-web | driver/Main.hs | bsd-3-clause | hermitWebUsage :: IO ()
hermitWebUsage = mapM_ putStrLn [hermitWebVersion, "", replace "hermit" "hermit-web" usageOutput]
where replace :: String -> String -> String -> String
replace old new = intercalate new . splitOn old | 237 | hermitWebUsage :: IO ()
hermitWebUsage = mapM_ putStrLn [hermitWebVersion, "", replace "hermit" "hermit-web" usageOutput]
where replace :: String -> String -> String -> String
replace old new = intercalate new . splitOn old | 237 | hermitWebUsage = mapM_ putStrLn [hermitWebVersion, "", replace "hermit" "hermit-web" usageOutput]
where replace :: String -> String -> String -> String
replace old new = intercalate new . splitOn old | 213 | false | true | 4 | 7 | 46 | 77 | 38 | 39 | null | null |
io7m/smf | com.io7m.smfj.specification/src/main/resources/com/io7m/smfj/specification/axis_map.hs | isc | axisOrdinal A.PositiveY = 1 | 27 | axisOrdinal A.PositiveY = 1 | 27 | axisOrdinal A.PositiveY = 1 | 27 | false | false | 0 | 6 | 3 | 11 | 5 | 6 | null | null |
tolysz/prepare-ghcjs | spec-lts8/ghci/GHCi/Run.hs | bsd-3-clause | fromSerializableException :: SerializableException -> SomeException
fromSerializableException EUserInterrupt = toException UserInterrupt | 136 | fromSerializableException :: SerializableException -> SomeException
fromSerializableException EUserInterrupt = toException UserInterrupt | 136 | fromSerializableException EUserInterrupt = toException UserInterrupt | 68 | false | true | 0 | 5 | 9 | 21 | 10 | 11 | null | null |
urbanslug/ghc | compiler/deSugar/DsBinds.hs | bsd-3-clause | dsHsWrapper (WpTyLam tv) e = return $ Lam tv e | 51 | dsHsWrapper (WpTyLam tv) e = return $ Lam tv e | 51 | dsHsWrapper (WpTyLam tv) e = return $ Lam tv e | 51 | false | false | 0 | 7 | 14 | 26 | 12 | 14 | null | null |
mcschroeder/ghc | compiler/vectorise/Vectorise/Generic/PData.hs | bsd-3-clause | uildPDataTyConRhs :: Name -> TyCon -> TyCon -> SumRepr -> VM AlgTyConRhs
buildPDataTyConRhs orig_name vect_tc repr_tc repr
= do data_con <- buildPDataDataCon orig_name vect_tc repr_tc repr
return $ DataTyCon { data_cons = [data_con], is_enum = False }
| 259 | buildPDataTyConRhs :: Name -> TyCon -> TyCon -> SumRepr -> VM AlgTyConRhs
buildPDataTyConRhs orig_name vect_tc repr_tc repr
= do data_con <- buildPDataDataCon orig_name vect_tc repr_tc repr
return $ DataTyCon { data_cons = [data_con], is_enum = False } | 259 | buildPDataTyConRhs orig_name vect_tc repr_tc repr
= do data_con <- buildPDataDataCon orig_name vect_tc repr_tc repr
return $ DataTyCon { data_cons = [data_con], is_enum = False } | 185 | false | true | 0 | 10 | 44 | 79 | 40 | 39 | null | null |
MichielDerhaeg/stack | src/Stack/Types/Config.hs | bsd-3-clause | -- | Location of the 01-index.tar.gz file
configPackageIndexGz :: (MonadReader env m, HasConfig env, MonadThrow m) => IndexName -> m (Path Abs File)
configPackageIndexGz = liftM (</> $(mkRelFile "01-index.tar.gz")) . configPackageIndexRoot | 239 | configPackageIndexGz :: (MonadReader env m, HasConfig env, MonadThrow m) => IndexName -> m (Path Abs File)
configPackageIndexGz = liftM (</> $(mkRelFile "01-index.tar.gz")) . configPackageIndexRoot | 197 | configPackageIndexGz = liftM (</> $(mkRelFile "01-index.tar.gz")) . configPackageIndexRoot | 90 | true | true | 0 | 10 | 30 | 74 | 36 | 38 | null | null |
mstksg/auto | src/Control/Auto/Run.hs | mit | interactAuto :: Interval' String String -- ^ 'Interval'' to run interactively
-> IO (Interval' String String) -- ^ final 'Interval'' after it all
interactAuto = interactM (return . runIdentity) f
where
f (Just str) = True <$ putStrLn str
f Nothing = return False
-- | Like 'interact', but instead of taking @'Interval'' 'String'
-- 'String'@, takes any @'Interval'' a b@ as long as @a@ is 'Read' and @b@
-- is 'Show'.
--
-- Will "stop" if either (1) the input is not 'read'-able or (2) the
-- 'Interval'' turns off.
--
-- Outputs the final 'Auto'' when the interaction terminates. | 618 | interactAuto :: Interval' String String -- ^ 'Interval'' to run interactively
-> IO (Interval' String String)
interactAuto = interactM (return . runIdentity) f
where
f (Just str) = True <$ putStrLn str
f Nothing = return False
-- | Like 'interact', but instead of taking @'Interval'' 'String'
-- 'String'@, takes any @'Interval'' a b@ as long as @a@ is 'Read' and @b@
-- is 'Show'.
--
-- Will "stop" if either (1) the input is not 'read'-able or (2) the
-- 'Interval'' turns off.
--
-- Outputs the final 'Auto'' when the interaction terminates. | 579 | interactAuto = interactM (return . runIdentity) f
where
f (Just str) = True <$ putStrLn str
f Nothing = return False
-- | Like 'interact', but instead of taking @'Interval'' 'String'
-- 'String'@, takes any @'Interval'' a b@ as long as @a@ is 'Read' and @b@
-- is 'Show'.
--
-- Will "stop" if either (1) the input is not 'read'-able or (2) the
-- 'Interval'' turns off.
--
-- Outputs the final 'Auto'' when the interaction terminates. | 448 | true | true | 1 | 8 | 138 | 86 | 47 | 39 | null | null |
jtdawso/remote-haxl | tests/Test.hs | bsd-3-clause | runApplicativeApplicativePacket :: RemoteApplicative
runApplicativeApplicativePacket = RemoteApplicative "ApplicativeApplicativePacket"
$ \ tr ref -> A.runApplicative (wrapNT $ runAppP tr ref) | 194 | runApplicativeApplicativePacket :: RemoteApplicative
runApplicativeApplicativePacket = RemoteApplicative "ApplicativeApplicativePacket"
$ \ tr ref -> A.runApplicative (wrapNT $ runAppP tr ref) | 194 | runApplicativeApplicativePacket = RemoteApplicative "ApplicativeApplicativePacket"
$ \ tr ref -> A.runApplicative (wrapNT $ runAppP tr ref) | 141 | false | true | 2 | 9 | 19 | 43 | 21 | 22 | null | null |
jaccokrijnen/leksah | src/IDE/Utils/GUIUtils.hs | gpl-2.0 | chooseSaveFile :: Window -> Text -> Maybe FilePath -> IO (Maybe FilePath)
chooseSaveFile window prompt mbFolder = do
dialog <- fileChooserDialogNew
(Just prompt)
(Just window)
FileChooserActionSave
[("gtk-cancel", ResponseCancel)
,("gtk-save", ResponseAccept)]
when (isJust mbFolder) $ void (fileChooserSetCurrentFolder dialog (fromJust mbFolder))
widgetShow dialog
res <- dialogRun dialog
case res of
ResponseAccept -> do
mbFileName <- fileChooserGetFilename dialog
widgetDestroy dialog
return mbFileName
_ -> do
widgetDestroy dialog
return Nothing | 734 | chooseSaveFile :: Window -> Text -> Maybe FilePath -> IO (Maybe FilePath)
chooseSaveFile window prompt mbFolder = do
dialog <- fileChooserDialogNew
(Just prompt)
(Just window)
FileChooserActionSave
[("gtk-cancel", ResponseCancel)
,("gtk-save", ResponseAccept)]
when (isJust mbFolder) $ void (fileChooserSetCurrentFolder dialog (fromJust mbFolder))
widgetShow dialog
res <- dialogRun dialog
case res of
ResponseAccept -> do
mbFileName <- fileChooserGetFilename dialog
widgetDestroy dialog
return mbFileName
_ -> do
widgetDestroy dialog
return Nothing | 734 | chooseSaveFile window prompt mbFolder = do
dialog <- fileChooserDialogNew
(Just prompt)
(Just window)
FileChooserActionSave
[("gtk-cancel", ResponseCancel)
,("gtk-save", ResponseAccept)]
when (isJust mbFolder) $ void (fileChooserSetCurrentFolder dialog (fromJust mbFolder))
widgetShow dialog
res <- dialogRun dialog
case res of
ResponseAccept -> do
mbFileName <- fileChooserGetFilename dialog
widgetDestroy dialog
return mbFileName
_ -> do
widgetDestroy dialog
return Nothing | 660 | false | true | 0 | 13 | 250 | 190 | 87 | 103 | null | null |
uduki/hsQt | Qtc/Enums/Gui/QStyleOption.hs | bsd-2-clause | eSO_Slider :: OptionType
eSO_Slider
= ieOptionType $ 983041 | 61 | eSO_Slider :: OptionType
eSO_Slider
= ieOptionType $ 983041 | 61 | eSO_Slider
= ieOptionType $ 983041 | 36 | false | true | 2 | 6 | 9 | 23 | 9 | 14 | null | null |
CulpaBS/wbBach | src/Futhark/CodeGen/ImpGen/Kernels.hs | bsd-3-clause | compileKernelSize :: KernelSize
-> ImpGen.ImpM op (Imp.DimSize, Imp.DimSize, Imp.DimSize,
Imp.DimSize, Imp.DimSize, Imp.DimSize)
compileKernelSize (KernelSize num_groups local_size per_thread_elements
num_elements offset_multiple num_threads) = do
num_groups' <- ImpGen.subExpToDimSize num_groups
local_size' <- ImpGen.subExpToDimSize local_size
per_thread_elements' <- ImpGen.subExpToDimSize per_thread_elements
num_elements' <- ImpGen.subExpToDimSize num_elements
offset_multiple' <- ImpGen.subExpToDimSize offset_multiple
num_threads' <- ImpGen.subExpToDimSize num_threads
return (num_groups', local_size', per_thread_elements',
num_elements', offset_multiple', num_threads') | 776 | compileKernelSize :: KernelSize
-> ImpGen.ImpM op (Imp.DimSize, Imp.DimSize, Imp.DimSize,
Imp.DimSize, Imp.DimSize, Imp.DimSize)
compileKernelSize (KernelSize num_groups local_size per_thread_elements
num_elements offset_multiple num_threads) = do
num_groups' <- ImpGen.subExpToDimSize num_groups
local_size' <- ImpGen.subExpToDimSize local_size
per_thread_elements' <- ImpGen.subExpToDimSize per_thread_elements
num_elements' <- ImpGen.subExpToDimSize num_elements
offset_multiple' <- ImpGen.subExpToDimSize offset_multiple
num_threads' <- ImpGen.subExpToDimSize num_threads
return (num_groups', local_size', per_thread_elements',
num_elements', offset_multiple', num_threads') | 776 | compileKernelSize (KernelSize num_groups local_size per_thread_elements
num_elements offset_multiple num_threads) = do
num_groups' <- ImpGen.subExpToDimSize num_groups
local_size' <- ImpGen.subExpToDimSize local_size
per_thread_elements' <- ImpGen.subExpToDimSize per_thread_elements
num_elements' <- ImpGen.subExpToDimSize num_elements
offset_multiple' <- ImpGen.subExpToDimSize offset_multiple
num_threads' <- ImpGen.subExpToDimSize num_threads
return (num_groups', local_size', per_thread_elements',
num_elements', offset_multiple', num_threads') | 592 | false | true | 0 | 9 | 150 | 167 | 82 | 85 | null | null |
fmapfmapfmap/amazonka | amazonka-sqs/gen/Network/AWS/SQS/GetQueueURL.hs | mpl-2.0 | -- | Creates a value of 'GetQueueURL' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'gquQueueOwnerAWSAccountId'
--
-- * 'gquQueueName'
getQueueURL
:: Text -- ^ 'gquQueueName'
-> GetQueueURL
getQueueURL pQueueName_ =
GetQueueURL'
{ _gquQueueOwnerAWSAccountId = Nothing
, _gquQueueName = pQueueName_
} | 410 | getQueueURL
:: Text -- ^ 'gquQueueName'
-> GetQueueURL
getQueueURL pQueueName_ =
GetQueueURL'
{ _gquQueueOwnerAWSAccountId = Nothing
, _gquQueueName = pQueueName_
} | 188 | getQueueURL pQueueName_ =
GetQueueURL'
{ _gquQueueOwnerAWSAccountId = Nothing
, _gquQueueName = pQueueName_
} | 125 | true | true | 0 | 7 | 82 | 49 | 28 | 21 | null | null |
mbakke/ganeti | src/Ganeti/Ssconf.hs | bsd-2-clause | parseIPFamily :: Int -> Result Socket.Family
parseIPFamily fam | fam == AutoConf.pyAfInet4 = Ok Socket.AF_INET
| fam == AutoConf.pyAfInet6 = Ok Socket.AF_INET6
| otherwise = Bad $ "Unknown af_family value: " ++ show fam | 255 | parseIPFamily :: Int -> Result Socket.Family
parseIPFamily fam | fam == AutoConf.pyAfInet4 = Ok Socket.AF_INET
| fam == AutoConf.pyAfInet6 = Ok Socket.AF_INET6
| otherwise = Bad $ "Unknown af_family value: " ++ show fam | 255 | parseIPFamily fam | fam == AutoConf.pyAfInet4 = Ok Socket.AF_INET
| fam == AutoConf.pyAfInet6 = Ok Socket.AF_INET6
| otherwise = Bad $ "Unknown af_family value: " ++ show fam | 210 | false | true | 0 | 9 | 69 | 80 | 36 | 44 | null | null |
anchor/marquise | lib/Marquise/IO/SpoolFile.hs | bsd-3-clause | getAbsoluteDirectoryContents :: FilePath -> IO [FilePath]
getAbsoluteDirectoryContents fp =
map (\rel -> joinPath [fp, rel]) <$> getDirectoryContents fp | 156 | getAbsoluteDirectoryContents :: FilePath -> IO [FilePath]
getAbsoluteDirectoryContents fp =
map (\rel -> joinPath [fp, rel]) <$> getDirectoryContents fp | 156 | getAbsoluteDirectoryContents fp =
map (\rel -> joinPath [fp, rel]) <$> getDirectoryContents fp | 98 | false | true | 0 | 10 | 21 | 51 | 26 | 25 | null | null |
unisonweb/platform | parser-typechecker/src/Unison/Builtin.hs | mit | code = Type.code () | 19 | code = Type.code () | 19 | code = Type.code () | 19 | false | false | 1 | 6 | 3 | 16 | 6 | 10 | null | null |
jtdaugherty/mathblog | src/Main.hs | bsd-3-clause | getIFSState :: BlogInputFS -> BlogOutputFS -> IO BlogInputFSState
getIFSState ifs ofs =
BlogInputFSState <$> indexMod <*> configMod <*> baseline <*> template
where
-- As a fallback timestamp, use a time in the past to ensure
-- things get regenerated if they're missing.
fallback = previousDay <$> getCurrentTime
previousDay t =
t { utctDay = addDays (-1000) (utctDay t) }
indexMod = do
let pth = ifsPostIndexPath ifs
ex <- doesFileExist pth
if ex then getModificationTime pth else fallback
configMod = do
let pth = ifsConfigPath ifs
ex <- doesFileExist pth
if ex then getModificationTime pth else fallback
template = do
contents <- getDirectoryContents $ ifsTemplateDir ifs
let templates = filter (not . flip elem [".", ".."]) contents
templatePath = (ifsTemplateDir ifs </>)
last <$> sort <$>
mapM getModificationTime (templatePath <$> templates)
baseline = do
let indexHtml = ofsIndexHtml ofs
ex <- doesFileExist indexHtml
if ex then getModificationTime indexHtml else fallback | 1,267 | getIFSState :: BlogInputFS -> BlogOutputFS -> IO BlogInputFSState
getIFSState ifs ofs =
BlogInputFSState <$> indexMod <*> configMod <*> baseline <*> template
where
-- As a fallback timestamp, use a time in the past to ensure
-- things get regenerated if they're missing.
fallback = previousDay <$> getCurrentTime
previousDay t =
t { utctDay = addDays (-1000) (utctDay t) }
indexMod = do
let pth = ifsPostIndexPath ifs
ex <- doesFileExist pth
if ex then getModificationTime pth else fallback
configMod = do
let pth = ifsConfigPath ifs
ex <- doesFileExist pth
if ex then getModificationTime pth else fallback
template = do
contents <- getDirectoryContents $ ifsTemplateDir ifs
let templates = filter (not . flip elem [".", ".."]) contents
templatePath = (ifsTemplateDir ifs </>)
last <$> sort <$>
mapM getModificationTime (templatePath <$> templates)
baseline = do
let indexHtml = ofsIndexHtml ofs
ex <- doesFileExist indexHtml
if ex then getModificationTime indexHtml else fallback | 1,267 | getIFSState ifs ofs =
BlogInputFSState <$> indexMod <*> configMod <*> baseline <*> template
where
-- As a fallback timestamp, use a time in the past to ensure
-- things get regenerated if they're missing.
fallback = previousDay <$> getCurrentTime
previousDay t =
t { utctDay = addDays (-1000) (utctDay t) }
indexMod = do
let pth = ifsPostIndexPath ifs
ex <- doesFileExist pth
if ex then getModificationTime pth else fallback
configMod = do
let pth = ifsConfigPath ifs
ex <- doesFileExist pth
if ex then getModificationTime pth else fallback
template = do
contents <- getDirectoryContents $ ifsTemplateDir ifs
let templates = filter (not . flip elem [".", ".."]) contents
templatePath = (ifsTemplateDir ifs </>)
last <$> sort <$>
mapM getModificationTime (templatePath <$> templates)
baseline = do
let indexHtml = ofsIndexHtml ofs
ex <- doesFileExist indexHtml
if ex then getModificationTime indexHtml else fallback | 1,201 | false | true | 0 | 16 | 436 | 297 | 146 | 151 | null | null |
elieux/ghc | compiler/hsSyn/HsUtils.hs | bsd-3-clause | -- Post-typechecking
nlHsDo :: HsStmtContext Name -> [LStmt RdrName (LHsExpr RdrName)]
-> LHsExpr RdrName
nlHsDo ctxt stmts = noLoc (mkHsDo ctxt stmts) | 159 | nlHsDo :: HsStmtContext Name -> [LStmt RdrName (LHsExpr RdrName)]
-> LHsExpr RdrName
nlHsDo ctxt stmts = noLoc (mkHsDo ctxt stmts) | 137 | nlHsDo ctxt stmts = noLoc (mkHsDo ctxt stmts) | 45 | true | true | 0 | 11 | 29 | 61 | 28 | 33 | null | null |
Bodigrim/arithmoi | Math/NumberTheory/Utils.hs | mit | splitOff# p n = go 0## n
where
go k m = case m `quotRemWord#` p of
(# q, 0## #) -> go (k `plusWord#` 1##) q
_ -> (# k, m #)
| 153 | splitOff# p n = go 0## n
where
go k m = case m `quotRemWord#` p of
(# q, 0## #) -> go (k `plusWord#` 1##) q
_ -> (# k, m #)
| 153 | splitOff# p n = go 0## n
where
go k m = case m `quotRemWord#` p of
(# q, 0## #) -> go (k `plusWord#` 1##) q
_ -> (# k, m #)
| 153 | false | false | 0 | 10 | 62 | 74 | 39 | 35 | null | null |
brendanhay/gogol | gogol-books/gen/Network/Google/Books/Types/Product.hs | mpl-2.0 | -- | Resorce type.
dKind :: Lens' Discoveryclusters (Maybe Text)
dKind = lens _dKind (\ s a -> s{_dKind = a}) | 109 | dKind :: Lens' Discoveryclusters (Maybe Text)
dKind = lens _dKind (\ s a -> s{_dKind = a}) | 90 | dKind = lens _dKind (\ s a -> s{_dKind = a}) | 44 | true | true | 1 | 9 | 20 | 49 | 25 | 24 | null | null |
petertseng/adventofcode-hs | bin/06_light_grid.hs | apache-2.0 | parseCoord :: String -> Pos
parseCoord = (read *** read) . splitOnOne ',' | 73 | parseCoord :: String -> Pos
parseCoord = (read *** read) . splitOnOne ',' | 73 | parseCoord = (read *** read) . splitOnOne ',' | 45 | false | true | 0 | 7 | 12 | 29 | 15 | 14 | null | null |
mitar/nxt | src/Status.hs | lgpl-3.0 | isDevice _ = False | 27 | isDevice _ = False | 27 | isDevice _ = False | 27 | false | false | 0 | 4 | 12 | 10 | 4 | 6 | null | null |
tphyahoo/happs-tutorial | src/ControllerStressTests.hs | bsd-3-clause | ddDemo :: Users
ddDemo = Users $ M.fromList [
( UserName . B.pack $ "tphyahoo", UserInfos (B.pack . scramblepass $ "password") tphyahooProfile tphyahooJobs )
, ( UserName . B.pack $ "zzz", UserInfos (B.pack . scramblepass $ "password")
(UserProfile ( B.pack "") ( B.pack "") False ( B.pack "")) serpinskiJobs )
] | 359 | ddDemo :: Users
ddDemo = Users $ M.fromList [
( UserName . B.pack $ "tphyahoo", UserInfos (B.pack . scramblepass $ "password") tphyahooProfile tphyahooJobs )
, ( UserName . B.pack $ "zzz", UserInfos (B.pack . scramblepass $ "password")
(UserProfile ( B.pack "") ( B.pack "") False ( B.pack "")) serpinskiJobs )
] | 359 | ddDemo = Users $ M.fromList [
( UserName . B.pack $ "tphyahoo", UserInfos (B.pack . scramblepass $ "password") tphyahooProfile tphyahooJobs )
, ( UserName . B.pack $ "zzz", UserInfos (B.pack . scramblepass $ "password")
(UserProfile ( B.pack "") ( B.pack "") False ( B.pack "")) serpinskiJobs )
] | 343 | false | true | 0 | 14 | 97 | 134 | 70 | 64 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.