code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module BuiltInFunctions where
myOr :: [Bool] -> Bool
myOr = foldr (||) False
myAny :: (a -> Bool) -> [a] -> Bool
myAny f list = myOr $ map f list
myElem :: Eq a => a -> [a] -> Bool
-- myElem item = myAny (== item)
myElem item list = foldr (||) False $ map (== item) list
myReverse :: [... | mikegehard/haskellBookExercises | chapter10/BuiltInFunctions.hs | mit | 588 | 0 | 10 | 178 | 291 | 160 | 131 | 13 | 2 |
module Handler.GamesJsonSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
describe "getGamesJsonR" $ do
error "Spec not implemented: getGamesJsonR"
| jabaraster/minibas-web | test/Handler/GamesJsonSpec.hs | mit | 183 | 0 | 11 | 39 | 44 | 23 | 21 | 6 | 1 |
import Prelude hiding (lookup)
import Control.Monad.ST
import Data.HashTable.ST.Basic
-- Hashtable parameterized by ST "thread"
type HT s = HashTable s String String
example1 :: ST s (HT s)
example1 = do
ht <- new
insert ht "key" "value1"
return ht
example2 :: HT s -> ST s (Maybe String)
example2 ht = do
va... | riwsky/wiwinwlh | src/hashtables.hs | mit | 421 | 0 | 8 | 85 | 154 | 78 | 76 | 15 | 1 |
module Maskell.Stats where
import Control.Monad
import Data.List
import Data.Maybe
test_mcmath = do
putStrLn "hello from Mcmath"
{-|
The `prank' function calculates percentile ranks of a list of floats.
prank [23.0, 20.0, 20.0, 57.0, 46.0]
-}
prank :: [Float] -> [Float]
prank arr =
map score arr
where
... | blippy/maskell | src/Maskell/Stats.hs | mit | 1,454 | 0 | 12 | 421 | 589 | 306 | 283 | 37 | 3 |
module Nameless.Conversion where
import Named.Data
import Nameless.Data
import Data.List
type NamingContext = [Name] -- Naming context for DeBrujin, head = 0
getFree :: Expression -> NamingContext
getFree (Func b ex) = filter (b /=) (getFree ex)
getFree (Call e1 e2) = union (getFree e1) (getFree e2)
getFree (Var x) ... | mcapodici/haskelllearn | firstlang/simple/src/Nameless/Conversion.hs | mit | 632 | 0 | 10 | 116 | 261 | 135 | 126 | 15 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_HADDOCK prune #-}
module System.Console.Docopt.QQ
(
-- * QuasiQuoter usage parsers
docopt
, docoptFile
) where
import qualified Data.Map as M
import System.Console.Docopt.Types
import System.Console.Docopt.QQ.Instances ()
import System.Console.Docopt.... | docopt/docopt.hs | System/Console/Docopt/QQ.hs | mit | 2,082 | 0 | 11 | 463 | 348 | 209 | 139 | 33 | 2 |
{-# LANGUAGE RankNTypes, OverloadedStrings, DeriveDataTypeable,
ForeignFunctionInterface, JavaScriptFFI, EmptyDataDecls,
TypeFamilies, DataKinds, ScopedTypeVariables,
FlexibleContexts, FlexibleInstances, TypeSynonymInstances,
LambdaCase, MultiParamTypeClasses, DeriveG... | NewByteOrder/ghcjs-base | JavaScript/Web/XMLHttpRequest.hs | mit | 8,721 | 48 | 27 | 2,651 | 2,054 | 1,090 | 964 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Domain.StatText (wordCount) where
import qualified Data.Text.Lazy as T
import Data.Function(on)
import Data.List(sortBy)
import Data.Map.Lazy (Map, empty, insertWith, assocs)
import Debug.Trace
wordCount :: T.Text -> [(T.Text, Integer)]
wordCount = count . filter specialWo... | johangirod/statext | src/server/Domain/StatText.hs | mit | 1,445 | 0 | 13 | 220 | 566 | 348 | 218 | 16 | 1 |
module Main where
import TralaParser
import TralaLexer
import TralaLexerInternal
import Conduit
import System.Environment
main :: IO ()
main = do
filename <- head <$> getArgs
runResult <- runResourceT $ runLexerConduitFromStart $ alexInputsFromFile filename .| tralaTokens .| mapM_C (liftIO . putStrLn . show)
ei... | tilgalas/trala-lala | app/Main.hs | mit | 365 | 0 | 12 | 59 | 107 | 56 | 51 | 11 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module ZipperGalaxy
where
import Control.Monad
import qualified Data.Map as M
import Data.Maybe
import Libaddutil.Named
import Galaxy
import Utils
import qualified Data.Edison.Assoc.StandardMap as E
type GalaxyZipper a = (Galaxy a, Maybe (StarSystem a, Maybe (Star a, [Planet a])))
... | anttisalonen/starrover | src/ZipperGalaxy.hs | mit | 4,557 | 0 | 17 | 1,080 | 2,180 | 1,152 | 1,028 | 105 | 5 |
-- | This transforms the output from ReadRawSpecFile for consumption into the
-- generator.
module Gen.Specifications
( CloudFormationSpec (..)
, specFromRaw
, PropertyType (..)
, Property (..)
, SpecType (..)
, subPropertyTypeNames
, customTypeNames
, AtomicType (..)
, ResourceType (..)
) where
i... | frontrowed/stratosphere | gen/src/Gen/Specifications.hs | mit | 10,530 | 0 | 39 | 1,494 | 2,236 | 1,163 | 1,073 | -1 | -1 |
{-# LANGUAGE BangPatterns #-}
module DBacc where
-- try optimization: cut, accu
import Context
import System.Process (callCommand)
import Data.Char (isUpper)
------------------------------------------------------
-- Sample complex program: graph matching, query and transformation
-----------------------------------... | thiry/DComp | src/DBacc.hs | gpl-2.0 | 2,396 | 0 | 21 | 495 | 847 | 458 | 389 | 41 | 3 |
predecessor = predecessor
-- |comment 0
-- |comment 1
successor :: a
successor = successor
| evolutics/haskell-formatter | testsuite/resources/source/comments/depends_on_displacement/single_annotation/line_pair/before_before/Input.hs | gpl-3.0 | 91 | 0 | 4 | 15 | 18 | 11 | 7 | 3 | 1 |
module NaiveBayes.NaiveBayes where
import Data.List
import Data.Char
data Classifier = Classifier {
wordCategoryStore :: [(String,[(String,Int)])]
}
stopwords = ["a",
"about",
"above",
"after",
"again",
"against",
"all",
"am",
"an",
"and",
"any",
... | rahulaaj/ML-Library | src/NaiveBayes/NaiveBayes.hs | gpl-3.0 | 6,044 | 448 | 14 | 2,124 | 2,203 | 1,265 | 938 | -1 | -1 |
yes :: a -> Bool
yes _ = True | hmemcpy/milewski-ctfp-pdf | src/content/1.5/code/haskell/snippet03.hs | gpl-3.0 | 29 | 0 | 5 | 8 | 18 | 9 | 9 | 2 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
-- | This module is completely exposed by 'Network.Gopher'
module Network.Gopher.Log
( GopherLogStr ()
, makeSensitive
, hideSensitive
, GopherLogLevel (..)
, ToGopherLogStr (..)
, FromGopherLogStr (..)
) where
import Network.Gopher.Ut... | sternenseemann/spacecookie | src/Network/Gopher/Log.hs | gpl-3.0 | 5,825 | 0 | 28 | 1,053 | 1,069 | 600 | 469 | 106 | 2 |
{-# LANGUAGE NoImplicitPrelude, TemplateHaskell #-}
module Lamdu.Sugar.Names.NameGen
( NameGen, initial
, VarInfo(..), existingName, newName
) where
import Prelude.Compat
import Control.Arrow ((&&&))
import qualified Control.Lens as Lens
import Control.Lens.Operators
import ... | da-x/lamdu | Lamdu/Sugar/Names/NameGen.hs | gpl-3.0 | 1,712 | 0 | 12 | 523 | 519 | 284 | 235 | 45 | 3 |
module Main where
import Idme.Config (defaultConfig)
import Idme.Server (runServer)
-- | Startup as blocking process
main :: IO ()
main = runServer defaultConfig
| awagner83/IdMe | src/Idme.hs | gpl-3.0 | 165 | 0 | 6 | 26 | 43 | 25 | 18 | 5 | 1 |
module Language.Nautilus.Bytecode.Interpreter where
import Control.Applicative
import Control.Monad
import Data.Word
import Language.Nautilus.Bytecode.Abstract
import Language.Nautilus.Bytecode.FromNBC
import Language.Nautilus.Bytecode.Machine
fetch :: NBCI Instr
fetch = do
instr <- peekIP
moveIP 1
ret... | Zankoku-Okuno/nautilus-bytecode | src/Language/Nautilus/Bytecode/Interpreter.hs | gpl-3.0 | 1,044 | 0 | 9 | 209 | 371 | 183 | 188 | 35 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import SequenceFormats.FreqSum (FreqSumHeader(..), FreqSumEntry(..), readFreqSumStdIn,
printFreqSumStdOut)
import Control.Error (runScript, tryAssert, scriptIO, Script, tryJust)
import Data.Monoid ((<>))
import Data.Text (pack)
import Data.Version (showVersion)
import qualified... | stschiff/rarecoal-tools | src-downSampleFreqSum/downSampleFreqSum.hs | gpl-3.0 | 2,708 | 0 | 20 | 660 | 875 | 448 | 427 | 51 | 4 |
import Test.Framework.Providers.API
import Test.Framework.Runners.Console
import qualified Math.Test as Math
tests :: [Test]
tests = [
testGroup "Math" Math.tests
]
main :: IO ()
main = defaultMain tests
| sykora/zeta | test/Test.hs | gpl-3.0 | 219 | 0 | 7 | 42 | 64 | 38 | 26 | 8 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-glacier/gen/Network/AWS/Glacier/UploadArchive.hs | mpl-2.0 | 6,869 | 0 | 13 | 1,437 | 698 | 436 | 262 | 90 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-maps-engine/gen/Network/Google/Resource/MapsEngine/Maps/Permissions/BatchDelete.hs | mpl-2.0 | 3,607 | 0 | 15 | 803 | 391 | 235 | 156 | 64 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-shopping-content/gen/Network/Google/Resource/Content/Accounts/Delete.hs | mpl-2.0 | 3,582 | 0 | 14 | 826 | 503 | 296 | 207 | 71 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/DicomStores/Delete.hs | mpl-2.0 | 5,219 | 0 | 15 | 1,134 | 699 | 410 | 289 | 103 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
--------------------------------------------------------------------------------
-- See end of this file for licence information.
--------------------------------------------------------------------------------
-- |
-- Module : Turtle
-- Copyright : (... | DougBurke/swish | src/Swish/RDF/Parser/Turtle.hs | lgpl-2.1 | 31,071 | 0 | 18 | 6,585 | 6,258 | 3,274 | 2,984 | 507 | 4 |
-- file: ch14/Maybe.hs
data Maybe a = Nothing | Just a
instance Monad Maybe where
-- chain
(>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b
Just x >>= fn = fn x
Nothing >>= fn = Nothing
-- inject
return :: a -> Maybe a
return a = Just a
---
(>>) :: Maybe a -> Maybe b -> Maybe b
Just _ >> mb ... | caiorss/Functional-Programming | haskell/rwh/ch14/Maybe.hs | unlicense | 755 | 0 | 10 | 216 | 226 | 113 | 113 | -1 | -1 |
#!/usr/bin/env stack
{-
stack
--resolver lts-11.10
--install-ghc
runghc
--package base
--
-hide-all-packages
-}
-- Copyright 2018 Google LLC. All Rights Reserved.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- Y... | polux/snippets | cps_defunc_evaluator.hs | apache-2.0 | 2,645 | 0 | 17 | 645 | 1,098 | 564 | 534 | 55 | 7 |
sq x = x * x
main = print $ sq 12
| egaburov/funstuff | Haskell/BartoszBofH/2_MyFirstProgram/a.hs | apache-2.0 | 35 | 0 | 6 | 13 | 25 | 12 | 13 | 2 | 1 |
module Main (main) where
import qualified System.Exit as Exit
import Hecate (configure, run)
main :: IO ()
main = configure >>= run >>= Exit.exitWith
| henrytill/hecate | executables/Main.hs | apache-2.0 | 169 | 0 | 6 | 43 | 53 | 32 | 21 | 5 | 1 |
import Data.List
tab = [("black", 0, 0, 0),
("blue", 0, 0,255),
("lime", 0,255, 0),
("aqua", 0,255,255),
("red", 255, 0, 0),
("fuchsia",255, 0,255),
("yellow", 255,255, 0),
("white", 255,255,255)]
h2d x = read ("0x"++x) :: Int
ans x =
let ... | a143753/AOJ | 0176.hs | apache-2.0 | 681 | 0 | 19 | 249 | 403 | 226 | 177 | 22 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import Data.Text as T
import Data.RDF
import Data.RDF.Namespace
globalPrefix :: PrefixMappings
globalPrefix = ns_mappings []
baseURL :: Maybe BaseUrl
baseURL = Just $ BaseUrl "file://"
testURL = "file:///this/is/not/a/palindrome"
tris :: [Triple]
tris = [Triple
(unode tes... | bergey/metastic | src/TestCase.hs | bsd-2-clause | 506 | 0 | 10 | 97 | 147 | 80 | 67 | 18 | 1 |
{-| Implementation of the RAPI client interface.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must re... | mbakke/ganeti | src/Ganeti/HTools/Backend/Rapi.hs | bsd-2-clause | 10,629 | 0 | 15 | 2,179 | 2,538 | 1,269 | 1,269 | 191 | 3 |
module Cube where
import Shader
import Data.Foldable
import Foreign
import Graphics.GL
import Linear
import Mesh
import Shader
data Cube = Cube
{ cubeVAO :: VertexArrayObject
, cubeShader :: GLProgram
, cubeInde... | lukexi/wboit | test/Cube.hs | bsd-2-clause | 5,793 | 0 | 14 | 2,047 | 1,183 | 642 | 541 | 120 | 1 |
{-# OPTIONS -XUndecidableInstances #-}
{-# OPTIONS -XTypeOperators #-}
{-# OPTIONS -XMultiParamTypeClasses #-}
{-# OPTIONS -XFunctionalDependencies #-}
{-# OPTIONS -XFlexibleInstances #-}
module Data.Real.CReal
(CReal, inject, around,
approx, approxRange, integerInterval,
Boun... | robbertkrebbers/fewdigits | Data/Real/CReal.hs | bsd-2-clause | 13,570 | 0 | 16 | 3,127 | 5,192 | 2,710 | 2,482 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -Wno-orphans #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Applicative.Singletons
-- Copyright : (C) 2018... | goldfirere/singletons | singletons-base/src/Control/Applicative/Singletons.hs | bsd-3-clause | 2,271 | 0 | 7 | 380 | 413 | 292 | 121 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeFamilies #-}
-- | Hides away distracting bookkeeping while lambda lifting into a 'LiftM'
-- monad.
module GHC.Stg.Lift.Monad (
decomposeStgBinding, mkStgBinding,
Env (..),
-- * #floats# Handling floats
-- $floats
Floa... | sdiehl/ghc | compiler/GHC/Stg/Lift/Monad.hs | bsd-3-clause | 12,947 | 0 | 16 | 2,556 | 2,332 | 1,256 | 1,076 | 156 | 7 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ARB.SamplerObjects
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portabili... | haskell-opengl/OpenGLRaw | src/Graphics/GL/ARB/SamplerObjects.hs | bsd-3-clause | 1,024 | 0 | 5 | 140 | 96 | 69 | 27 | 22 | 0 |
module Main(main) where
import Weeder
import System.Exit
import System.Environment
import Control.Monad
main :: IO ()
main = do
bad <- weeder =<< getArgs
when (bad > 0) exitFailure
| ndmitchell/weeder | src/Main.hs | bsd-3-clause | 191 | 0 | 9 | 38 | 68 | 37 | 31 | 9 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module ElmBot (eval) where
import qualified System.IO.Silently as Sys
import qualified Environment as Env
import qualified Eval.Code as Elm
eval :: String -> IO String
eval s = fst <$> Sys.capture (run s)
run :: String -> IO ()
run s = Env.run (Env.empty "elm-make" "node") (Elm.ev... | svanderbleek/elm-bot | src/ElmBot.hs | bsd-3-clause | 337 | 0 | 8 | 57 | 121 | 69 | 52 | 9 | 1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
module NotifSpec
( spec
)
where
import Kis
import Control.Concurrent
import Control.Exception.Base
import Control.Monad
import Data.Time.Clock
import System.IO.Temp
import Test.Hspec
import qualified Data.Aeson as J
import qualifie... | lslah/kis-proto | test/NotifSpec.hs | bsd-3-clause | 5,385 | 0 | 28 | 1,914 | 1,463 | 728 | 735 | 109 | 2 |
module Util.HTML
( Html
, Attribute
, Attributable
, renderHtml
, toHtml
, attribute
, empty
, parent
, leaf
, makeAttr
, makePar
, makeLeaf
, (!)
, ($<)
) where
import Data.Monoid
data HtmlM a
= Parent !String -- ^ Tag
!String ... | johanneshilden/liquid-epsilon | Util/HTML.hs | bsd-3-clause | 3,029 | 0 | 12 | 1,116 | 971 | 511 | 460 | -1 | -1 |
{-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable, ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
module Development.Shake.Internal.Rules.Rerun(
defaultRuleRerun, alwaysRerun
) where
import Development.Shake.Internal.Core.Rules
import Development.Shake.Internal.Core.Types
import Development.S... | ndmitchell/shake | src/Development/Shake/Internal/Rules/Rerun.hs | bsd-3-clause | 1,560 | 0 | 9 | 231 | 231 | 140 | 91 | 23 | 1 |
{-# LANGUAGE QuantifiedConstraints #-}
module Error
( Err
, runErr
, throw
, throwMany
, context
, contextShow
, fromEither
, fromEitherShow
, note
, sequenceV
, traverseV
, traverseV_
, forV
, forV_
, HasErr
, Sem
)
where
import Data.Vector as V
... | expipiplus1/vulkan | generate-new/src/Error.hs | bsd-3-clause | 2,402 | 0 | 14 | 712 | 1,059 | 558 | 501 | -1 | -1 |
module Main where
import qualified Web.JWTTests
import qualified Web.JWTInteropTests
import qualified Web.Base64Tests
import qualified Data.Text.ExtendedTests
import Test.Tasty
main :: IO ()
main = defaultMain tests
tests :: TestTree
tests = testGroup "JWT Tests" [
Web.JWTTests.defaultT... | bitemyapp/haskell-jwt | tests/src/TestRunner.hs | mit | 519 | 0 | 7 | 146 | 92 | 57 | 35 | 14 | 1 |
module Data.Kicad.PcbnewExpr
(
-- * Types
PcbnewExpr(..)
-- * Parse
, parse
, parseWithFilename
, fromSExpr
-- * Write
, pretty
, write
)
where
import Data.Kicad.PcbnewExpr.PcbnewExpr
import Data.Kicad.PcbnewExpr.Parse
import Data.Kicad.PcbnewExpr.Write
| kasbah/haskell-kicad-data | Data/Kicad/PcbnewExpr.hs | mit | 256 | 0 | 5 | 33 | 55 | 39 | 16 | 11 | 0 |
module Workspaces where
import XMonad (WorkspaceId)
-- | Workspaces, a 3x3 grid of workspaces
bl = "1: Workflow" -- Bottom Left
bm = "2: Etc" -- Bottom Middle
br = "3: Mail" -- Bottom Right
ml = "4: Terminal" -- Middle Left
mm = "5: Development" -- ... | NorfairKing/sus-depot | shared/shared/xmonad/azerty/Workspaces.hs | gpl-2.0 | 808 | 0 | 5 | 294 | 130 | 86 | 44 | 21 | 1 |
module Nirum.Constructs.TypeExpressionSpec where
import Test.Hspec.Meta
import Nirum.Constructs.TypeExpression (TypeExpression (..), toCode)
spec :: Spec
spec =
describe "toCode TypeExpression" $ do
context "TypeIdentifier" $
it "reverses the given tree to the code string" $ do
... | spoqa/nirum | test/Nirum/Constructs/TypeExpressionSpec.hs | gpl-3.0 | 1,417 | 0 | 15 | 455 | 309 | 153 | 156 | 28 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
module Acquire.Game.Player where
import Acquire.Game.Hotels
import Acquire.Game.Tiles
import Data.Aeson (FromJSON (..), ToJSON (..), Value (..),
... | abailly/hsgames | acquire/src/Acquire/Game/Player.hs | apache-2.0 | 2,371 | 0 | 10 | 692 | 750 | 403 | 347 | 54 | 1 |
{-| Utility functions for the maintenance daemon.
-}
{-
Copyright (C) 2015 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyrigh... | bitemyapp/ganeti | src/Ganeti/MaintD/Utils.hs | bsd-2-clause | 2,013 | 0 | 10 | 302 | 150 | 92 | 58 | 13 | 1 |
-- |
-- Utility functions for Mailchimp
--
module Web.Mailchimp.Util
where
import Control.Monad (mzero)
import Data.Aeson (ToJSON(..), FromJSON(..), Value(..), object)
import Data.Text (pack, unpack)
import Data.Char (isAlpha, toLower, isUpper)
import Data.Time.Clock (UTCTime)
import Data.Time.Format (formatTime... | tlaitinen/mailchimp | Web/Mailchimp/Util.hs | bsd-3-clause | 1,584 | 0 | 12 | 272 | 434 | 238 | 196 | 29 | 3 |
{-# LANGUAGE
DeriveFunctor,
DeriveFoldable,
DeriveTraversable,
NoMonomorphismRestriction,
GeneralizedNewtypeDeriving,
StandaloneDeriving,
TypeFamilies,
ViewPatterns,
MultiParamTypeClasses,
TypeSynonymInstances, -- TODO remove
FlexibleInstances,
OverloadedString... | FranklinChen/music-score | sketch/old/trans/trans.hs | bsd-3-clause | 17,874 | 0 | 13 | 4,750 | 2,783 | 1,528 | 1,255 | 193 | 1 |
{-# LANGUAGE CPP #-}
module System.Console.CmdArgs.Explicit.Type where
import Control.Arrow
import Control.Monad
import Data.Char
import Data.List
import Data.Maybe
#if __GLASGOW_HASKELL__ < 709
import Data.Monoid
#endif
-- | A name, either the name of a flag (@--/foo/@) or the name of a mode.
type Name = String
-... | copland/cmdargs | System/Console/CmdArgs/Explicit/Type.hs | bsd-3-clause | 10,204 | 0 | 14 | 2,422 | 2,312 | 1,254 | 1,058 | 125 | 3 |
{-# LANGUAGE TemplateHaskell #-}
{-| Implementation of the Ganeti data collector types.
-}
{-
Copyright (C) 2012 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of th... | sarahn/ganeti | src/Ganeti/DataCollectors/Types.hs | gpl-2.0 | 1,895 | 0 | 11 | 359 | 227 | 132 | 95 | 21 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIO... | ezyang/ghc | utils/ghc-pkg/Main.hs | bsd-3-clause | 90,493 | 872 | 101 | 25,756 | 15,461 | 8,909 | 6,552 | 1,490 | 32 |
{-# Language FlexibleContexts, ScopedTypeVariables #-}
-- | A multitap looper.
module Csound.Air.Looper (
LoopSpec(..), LoopControl(..),
sigLoop, midiLoop, sfLoop, patchLoop
) where
import Control.Monad
import Data.List
import Data.Default
import Data.Boolean
import Csound.Typed
import Csound.Typed.Gui hiding (but... | isomorphism/csound-expression | src/Csound/Air/Looper.hs | bsd-3-clause | 9,934 | 63 | 19 | 2,071 | 2,592 | 1,405 | 1,187 | 134 | 1 |
-- This is a modification of the calendar program described in section 4.5
-- of Bird and Wadler's ``Introduction to functional programming'', with
-- two ways of printing the calendar ... as in B+W, or like UNIX `cal':
import IO -- 1.3
import System -- 1.3
import List -- 1.3
import Char -- 1.3
-- Picture handling:
... | hvr/jhc | regress/tests/9_nofib/spectral/Calendar.hs | mit | 4,727 | 5 | 12 | 1,891 | 1,653 | 894 | 759 | 90 | 2 |
{-# LANGUAGE BangPatterns, CPP, MagicHash, UnboxedTuples #-}
{-# OPTIONS_GHC -O #-}
-- We always optimise this, otherwise performance of a non-optimised
-- compiler is severely affected
-- -----------------------------------------------------------------------------
--
-- (c) The University of Glasgow, 1997-2006
--
--... | ryantm/ghc | compiler/utils/Encoding.hs | bsd-3-clause | 13,525 | 0 | 29 | 4,017 | 3,646 | 1,856 | 1,790 | -1 | -1 |
-- Check that "->" is an instance of Eval
module ShouldSucceed where
instance Show (a->b) where
show _ = error "attempt to show function"
instance (Eq b) => Eq (a -> b) where
(==) f g = error "attempt to compare functions"
-- Since Eval is a superclass of Num this fails
-- unless -> is an instance of Ev... | forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/typecheck/should_compile/tc088.hs | bsd-3-clause | 715 | 0 | 9 | 310 | 256 | 130 | 126 | 13 | 0 |
-- This one killed GHC 6.4 because it bogusly attributed
-- the CPR property to the construtor T
-- Result: a mkWWcpr crash
-- Needs -prof -auto-all to show it up
module ShouldCompile where
newtype T a = T { unT :: a }
f = unT
test cs = f $ case cs of
[] -> T []
(x:xs) -> T $ test cs
| forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/stranal/should_compile/newtype.hs | bsd-3-clause | 300 | 0 | 10 | 80 | 76 | 44 | 32 | 6 | 2 |
{-# LANGUAGE Trustworthy #-}
module Check03_A (
trace
) where
import qualified Debug.Trace as D
import qualified Data.ByteString.Lazy.Char8 as BS
-- | Allowed declasification
trace :: String -> a -> a
trace s = D.trace $ s ++ show a3
a3 :: BS.ByteString
a3 = BS.take 3 $ BS.repeat 'a'
| urbanslug/ghc | testsuite/tests/safeHaskell/check/Check03_A.hs | bsd-3-clause | 301 | 0 | 7 | 66 | 89 | 52 | 37 | 9 | 1 |
module Tests.Machine (tests) where
import Machine
import Data.Machine
import Test.Framework
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.QuickCheck
import Test.QuickCheck.Property as Property
tests :: [Test]
tests = [ (testProperty "concatenation of result equal to input" prop_groupBy_conc... | danstiner/clod | test/Tests/Machine.hs | mit | 1,504 | 0 | 10 | 285 | 504 | 269 | 235 | 34 | 3 |
{-|
Module : Language.Vigil.Simplify.Top
Description :
Copyright : (c) Jacob Errington and Frederic Lafrance, 2016
License : MIT
Maintainer : goto@mail.jerrington.me
Stability : experimental
Simplifications for the top-level (globals and function declarations).
-}
{-# LANGUAGE OverloadedStrings #-}
mod... | djeik/goto | libgoto/Language/Vigil/Simplify/Top.hs | mit | 5,105 | 0 | 33 | 1,915 | 1,430 | 739 | 691 | 98 | 10 |
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
module Hickory.Graphics.Shader
( loadShader,
loadShaderFromPaths,
useShader,
getAttribLocation,
UniformLoc,
retrieveLoc,
ShaderID,
Shader (..),
)
where
import Control.Monad
import qualif... | asivitz/Hickory | Hickory/Graphics/Shader.hs | mit | 5,182 | 0 | 20 | 1,200 | 1,552 | 771 | 781 | -1 | -1 |
import Data.List
phi :: Int -> Int
phi n = product xs
where
xs = map (\(p, m) -> (p - 1) * p ^ (m - 1)) (primeFactorsMult n)
primeFactorsMult :: Int -> [(Int, Int)]
primeFactorsMult = map encoder . group . primeFactors
where
encoder xs = (head xs, length xs)
primeFactors :: Int -> [Int]
primeFactors n = pr... | curiousily/haskell-99problems | 37.hs | mit | 870 | 0 | 13 | 226 | 466 | 238 | 228 | 28 | 1 |
-- -------------------------------------------------------------------------------------
-- Author: Sourabh S Joshi (cbrghostrider); Copyright - All rights reserved.
-- For email, run on linux (perl v5.8.5):
-- perl -e 'print pack "H*","736f75726162682e732e6a6f73686940676d61696c2e636f6d0... | cbrghostrider/Hacking | HackerRank/FunctionalProgramming/Recursion/filterElements_HashTable_fast.hs | mit | 1,458 | 0 | 17 | 367 | 471 | 230 | 241 | 37 | 3 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Firestone.Player ( drawCard
, summonMinionAt
... | Jinxit/firestone | src/Firestone/Player.hs | mit | 870 | 0 | 16 | 263 | 205 | 107 | 98 | -1 | -1 |
module Test (
testWorldRod
, testWorldCircle
, testWorldRigidSkin
, testWorldBlob
, testWorldGrid
) where
import Data.Tuple
import Control.Monad as M
import Control.Monad.State.Lazy
import Control.Applicative
import Internal
import Vector
import Types
testWorldRod :: World
testWorldRod = exe... | ThatSnail/hs-softbody | Test.hs | mit | 4,841 | 0 | 27 | 2,155 | 1,511 | 757 | 754 | 91 | 1 |
module Main where
import LI11718
import SimulateT6
import AnimateT6
import System.Environment
import Text.Read
main = do
animaT6 (${mapa}) (${pista}) (${frames}) (${players}) | hpacheco/HAAP | examples/plab/oracle/AnimateT6Match.hs | mit | 182 | 4 | 9 | 28 | 59 | 41 | 18 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE OverloadedStrings #-}
import Control.Monad (void)
import Data.Monoid ((<>))
import qualified Data.Vector.Storable.Mutable as V
import Foreign.C.Types
import Foreig... | fpco/inline-c | inline-c/test/tests.hs | mit | 8,498 | 0 | 25 | 2,818 | 2,516 | 1,297 | 1,219 | 196 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
-- | This is a Haskell port of the Hashids library by Ivan Akimov.
-- This is /not/ a cryptographic hashing algorithm. Hashids is typically
-- used to encode numbers to a format suitable for appearance in places
-- like urls.
--
-- See the off... | jkramarz/hashids-haskell | Web/Hashids.hs | mit | 16,464 | 0 | 19 | 4,709 | 2,946 | 1,650 | 1,296 | 237 | 4 |
-- vim: set ts=2 sw=2 sts=0 ff=unix foldmethod=indent:
module Main where
import Test.DocTest
main :: IO ()
main = doctest ["-isrc/lib", "src/cli/Main.hs"]
| eji/mix-kenall-geocode | test/doctest.hs | mit | 159 | 0 | 6 | 26 | 34 | 20 | 14 | 4 | 1 |
module Main where
f::Int -> Int -> Int -> Int
f x1 x2 x3 = if x1 == 1
then x2
else f (x1 - 1) x3 ((x2 * x2) + (x3 * x3))
main = do x1 <- readLn
print (f x1 1 1)
| sebschrader/programmierung-ss2015 | E12/A2b.hs | mit | 202 | 0 | 10 | 86 | 108 | 57 | 51 | 7 | 2 |
{-
Mackerel: a strawman device definition DSL for Barrelfish
Copyright (c) 2007-2011, ETH Zurich.
All rights reserved.
This file is distributed under the terms in the attached LICENSE file.
If you do not find this file, copies can be found by writing to:
ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092... | gandro/mackerel-standalone | src/Main.hs | mit | 6,947 | 0 | 22 | 1,927 | 1,923 | 1,026 | 897 | 149 | 3 |
{-# LANGUAGE RecordWildCards #-}
import Data.Foldable (for_)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import Yacht (yacht, Category(..))
main :: IO ()
main = hspecWith defaultConfig {configFastFail = True} specs
specs :: Spec
spe... | exercism/xhaskell | exercises/practice/yacht/test/Tests.hs | mit | 5,789 | 0 | 10 | 2,850 | 1,434 | 930 | 504 | 128 | 1 |
module Lists where
import System.Random (getStdRandom, randomR)
import Control.Monad
import Data.List (sortBy, groupBy)
{-
- 1 Problem 1
- (*) Find the last element of a list.
-
- Example in Haskell:
- Prelude> myLast [1,2,3,4]
- 4
- Prelude> myLast ['x','y','z']
- 'z'
-}
myLast :: [a] -> a... | yyotti/99Haskell | src/main/Lists.hs | mit | 15,556 | 0 | 13 | 4,302 | 3,115 | 1,594 | 1,521 | 136 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE GADTs #-}
module Bench.Rec where
import Data.Vinyl
import Data.Vinyl.Syntax ()
type Fields = ... | VinylRecords/Vinyl | benchmarks/Bench/Rec.hs | mit | 1,312 | 0 | 21 | 435 | 562 | 296 | 266 | 29 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-|
Module : Web.Facebook.Messenger.Types.Requests.Attachment.Templates.AirlineBoardingPass
Copyright : (c) Felix Paulusma, 2016
License : MIT
Maintainer : felix.paulusma@gmail.com
Stability : semi-experimental
Send a message that contains boarding passes for ... | Vlix/facebookmessenger | src/Web/Facebook/Messenger/Types/Requests/Attachment/Templates/AirlineBoardingPass.hs | mit | 7,456 | 0 | 32 | 1,775 | 1,221 | 693 | 528 | 112 | 1 |
-- | Random AI (RAI) Charles, playing not really randomly.
module RaiCharles (aiRaiCharles) where
import AI
import Yinsh
heuristic :: RaiCharles -> AIValue
heuristic _ = 42 -- yeah..
data RaiCharles = RaiCharles { gs :: GameState
, pl :: Int
}
instance AIPl... | sharkdp/yinsh | src/RaiCharles.hs | mit | 553 | 0 | 8 | 164 | 132 | 77 | 55 | 14 | 1 |
import qualified Data.ByteString.Lazy as BL
import qualified Data.ByteString.Lazy.Char8 as BL8 (putStrLn)
import Data.List (sortBy, intersect)
import Data.Function (on)
import Crypto.Common (genCandidates)
import System.Environment (getArgs)
import Text.Printf (printf)
... | ckw/matasano | set1/challenge3.hs | mit | 1,092 | 0 | 14 | 252 | 255 | 143 | 112 | 16 | 2 |
-- Project Euler Problem 15 lattice paths
--
-- Given a 20x20 grid and only movements down and to the right, how many paths are there from the top left to bottom right.
--
factorial = scanl (*) 1 [1..]
main = do
print (factorial!!40 `div` (factorial!!20)^2)
| yunwilliamyu/programming-exercises | project_euler/p015_lattice_path.hs | cc0-1.0 | 263 | 2 | 12 | 52 | 59 | 34 | 25 | 3 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving, TemplateHaskell, ConstraintKinds, TypeFamilies, DeriveDataTypeable #-}
module Lamdu.CodeEdit.ExpressionEdit.ExpressionGui.Monad
( ExprGuiM, WidgetT, runWidget
, widgetEnv
, Payload(..), SugarExpr
, transaction, localEnv, withFgColor
, getP, assignCursor, assignCursorP... | Mathnerd314/lamdu | src/Lamdu/CodeEdit/ExpressionEdit/ExpressionGui/Monad.hs | gpl-3.0 | 7,882 | 0 | 14 | 1,284 | 2,627 | 1,406 | 1,221 | -1 | -1 |
module LightSource where
import DMX
import Data.Word
data Color = Color Word8 Word8 Word8 deriving (Show)
data Light = Light {
address :: Int
, bus :: Bus
}
setLight (Light addr bus) (Color r g b) = do
setChannel bus (addr+1) (not10 r)
setChannel bus (addr+2) (not10 g)
setChannel bus (addr+3) (... | zouppen/valo | LightSource.hs | gpl-3.0 | 665 | 0 | 9 | 142 | 200 | 104 | 96 | 16 | 1 |
module Main where
import Slash
import Slash.Handler
import Java.AST
import Control.Lens
import Graphics.Vty as G
import Language.Java.Pretty
import Language.Java.Syntax
data ClassPart = ClassName | Class | Done deriving Eq
data Builder = ClassBuilder ClassDecl ClassPart
newClassBuilder :: Builder
newClassBuilder =... | josuf107/Slash | Java.hs | gpl-3.0 | 2,484 | 0 | 14 | 621 | 860 | 444 | 416 | 68 | 9 |
{-# LANGUAGE FlexibleInstances #-}
module Ennel.Dictionary.Data where
import Ennel.Linguistics
import Data.JustParse
import Data.JustParse.Char
import Data.JustParse.Combinator
import Data.Monoid
type Rules = [Rule]
data Rule = Rule { target :: String, signature :: TypeSignature, prebinds :: [Bind], postbind... | trehansiddharth/ennel | Ennel/Dictionary/Data.hs | gpl-3.0 | 934 | 8 | 9 | 155 | 282 | 175 | 107 | 21 | 0 |
-- grid is a game written in Haskell
-- Copyright (C) 2018 karamellpelle@hotmail.com
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the Lice... | karamellpelle/grid | source/Game/Memory/Output/Fancy/SoundMemory.hs | gpl-3.0 | 1,062 | 0 | 8 | 185 | 84 | 56 | 28 | 11 | 1 |
{-# LANGUAGE FlexibleInstances #-}
module Java2js.Mangle ( Manglable(..) ) where
import Java2js.JVM.ClassFile
import Data.ByteString.Lazy.Char8 (unpack, ByteString)
import Data.List (intercalate)
class Manglable a where
mangleMethod :: a -> String
sigToSym :: FieldType -> String
sigToSym SignedByte = "B"
sigToSym C... | ledyba/java.js | lib/Java2js/Mangle.hs | gpl-3.0 | 1,418 | 0 | 10 | 303 | 449 | 233 | 216 | 29 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-bigquery/gen/Network/Google/Resource/BigQuery/DataSets/Update.hs | mpl-2.0 | 3,837 | 0 | 15 | 874 | 468 | 281 | 187 | 73 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-classroom/gen/Network/Google/Resource/Classroom/UserProFiles/GuardianInvitations/Get.hs | mpl-2.0 | 8,012 | 0 | 20 | 1,773 | 951 | 559 | 392 | 141 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-swf/gen/Network/AWS/SWF/RegisterWorkflowType.hs | mpl-2.0 | 11,548 | 0 | 9 | 2,493 | 969 | 602 | 367 | 104 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/RegisterVolume.hs | mpl-2.0 | 4,287 | 0 | 9 | 896 | 519 | 315 | 204 | 61 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-ec2/gen/Network/AWS/EC2/DescribeReservedInstancesOfferings.hs | mpl-2.0 | 13,241 | 0 | 11 | 2,802 | 1,547 | 927 | 620 | 152 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-bigquery/gen/Network/Google/Resource/BigQuery/DataSets/List.hs | mpl-2.0 | 4,562 | 0 | 17 | 1,075 | 657 | 385 | 272 | 93 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-games/gen/Network/Google/Resource/Games/Scores/SubmitMultiple.hs | mpl-2.0 | 5,156 | 0 | 19 | 1,245 | 791 | 459 | 332 | 116 | 1 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="ru-RU">
<title>Directory List v2.3</title>
<maps>
<homeID>directorylistv2_3</homeID>
<m... | secdec/zap-extensions | addOns/directorylistv2_3/src/main/javahelp/help_ru_RU/helpset_ru_RU.hs | apache-2.0 | 978 | 83 | 52 | 157 | 395 | 209 | 186 | -1 | -1 |
{-
- Copyright 2012 Fabio Riga
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to i... | EffeErre/cbladmin | src/CblAdmin.hs | apache-2.0 | 8,639 | 32 | 15 | 2,130 | 2,257 | 1,114 | 1,143 | 184 | 6 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE GADTs #-}
module Duckling.Rules.NB
( defaultRules
, langRules
, localeRules
) where
impor... | facebookincubator/duckling | Duckling/Rules/NB.hs | bsd-3-clause | 1,587 | 0 | 9 | 221 | 458 | 256 | 202 | 36 | 1 |
{-# LANGUAGE ScopedTypeVariables, TemplateHaskell, TypeOperators #-}
module World where
import Data.Label
import Data.Array
import Data.Map (Map)
import qualified Data.Map as Map
type Coord = (Int, Int)
-- operator to add 2 coordinates together
(|+|) :: Coord -> Coord -> Coord
(|+|) (x1, y1) (x2, y2) = (x1 + x2, y1 ... | pfynan/cabbagesandkings | World.hs | bsd-3-clause | 1,616 | 0 | 13 | 683 | 532 | 313 | 219 | 44 | 2 |
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE EmptyDataDecls #-}
module EFA.Application.Optimisation.Balance where
--import qualified EFA.Application.Optimisation.Sweep as Sweep
--import qualified EFA.Application.Optimisation.ReqsAndDofs as ReqsAndDofs
import qualified EFA.Flow.State.Qu... | energyflowanalysis/efa-2.1 | src/EFA/Application/Optimisation/Balance.hs | bsd-3-clause | 5,990 | 0 | 13 | 1,232 | 1,866 | 994 | 872 | -1 | -1 |
{-# LANGUAGE ForeignFunctionInterface #-}
-- Test that the startEventLog interface works as expected.
main :: IO ()
main = do
putStrLn "Starting eventlog..."
c_init_eventlog
putStrLn "done"
foreign import ccall unsafe "init_eventlog"
c_init_eventlog :: IO ()
| sdiehl/ghc | testsuite/tests/rts/InitEventLogging.hs | bsd-3-clause | 269 | 0 | 7 | 45 | 52 | 25 | 27 | 8 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.