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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
import Text.MoodleMD.Types
import Text.MoodleMD.Reader
import Text.MoodleMD.WriterXML
import System.Environment
import Control.Applicative
import System.Console.ArgParser
data Config = Config {input :: FilePath} deriving Show
cliParser :: ParserSpec Config
cliParser = Config
`parsedBy` optPos "" "input-file" `Des... | uulm-ai/moodle-md | src/Main.hs | gpl-3.0 | 666 | 0 | 14 | 115 | 196 | 104 | 92 | 18 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-storage/gen/Network/Google/Resource/Storage/DefaultObjectAccessControls/Insert.hs | mpl-2.0 | 4,860 | 0 | 16 | 1,052 | 551 | 326 | 225 | 91 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Projects/TestIAMPermissions.hs | mpl-2.0 | 6,471 | 0 | 19 | 1,512 | 939 | 545 | 394 | 136 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE... | rueshyna/gogol | gen/src/Gen/Types.hs | mpl-2.0 | 10,817 | 0 | 17 | 3,437 | 2,986 | 1,669 | 1,317 | 287 | 2 |
{-# 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 #-}
-- ... | olorin/amazonka | amazonka-devicefarm/gen/Network/AWS/DeviceFarm/ListArtifacts.hs | mpl-2.0 | 5,486 | 0 | 14 | 1,281 | 847 | 506 | 341 | 104 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ViewPatterns #-}
module TypeTranspiler where
import Data.Char
import Data.List
import Control.Monad
import Control.Applicative
alpha = ['a' .. 'z'] ++ ['A' .. 'Z']
digit = ['0' .. '9']
-------------------------... | ice1000/OI-codes | codewars/authoring/haskell/TypeTranspiler.hs | agpl-3.0 | 3,836 | 0 | 20 | 1,071 | 1,627 | 822 | 805 | 136 | 3 |
import System.Plugins
import API
main = do
m_v <- dynload "../Plugin.o" ["../api"]
[]
"resource_dyn"
case m_v of
LoadFailure es -> mapM_ putStrLn es >> error "didn't compile"
LoadSuccess _ (Interfa... | Changaco/haskell-plugins | testsuite/dynload/poly/prog/Main.hs | lgpl-2.1 | 440 | 0 | 13 | 235 | 106 | 52 | 54 | 11 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Network.Haskoin.Crypto.ExtendedKeys.Units (tests) where
import Test.HUnit (Assertion, assertBool, assertEqual)
import Test.Framework (Test, testGroup)
import Test.Framework.Providers.HUnit (testCase)
import Data.Aeson (decode, encode)
import Data.Maybe (isJust, isNothing, fro... | tphyahoo/haskoin | haskoin-core/tests/Network/Haskoin/Crypto/ExtendedKeys/Units.hs | unlicense | 20,367 | 0 | 14 | 3,386 | 2,869 | 1,624 | 1,245 | 327 | 1 |
module Braxton.A282166 (a282166) where
import Helpers.BraxtonHelper (allSequences, SymmetricRelation(..), ReflexiveRelation(..))
a282166 :: Int -> Integer
a282166 n = minimum $ map sum theSequences where
theSequences = map (map fromIntegral) $ allSequences NonReflexive Symmetric n n
| peterokagey/haskellOEIS | src/Braxton/A282166.hs | apache-2.0 | 287 | 0 | 10 | 37 | 90 | 50 | 40 | 5 | 1 |
{-
Copyright 2019 The CodeWorld Authors. 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicab... | pranjaltale16/codeworld | codeworld-compiler/test/testcase/test_pointType/source.hs | apache-2.0 | 707 | 0 | 8 | 135 | 56 | 33 | 23 | 5 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-
Copyright 2020 The CodeWorld Authors. 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.
You may obtain a copy of the License at
http... | google/codeworld | codeworld-compiler/src/CodeWorld/Compile/Requirements/Language.hs | apache-2.0 | 6,396 | 0 | 19 | 1,295 | 1,639 | 832 | 807 | 129 | 2 |
{-# LANGUAGE StrictData #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
-- | Provides functions that facilitate defining textcase transformations.
-- To see how these can be used used, see the definitions of @addTextCase@
-- in "Citeproc.Pandoc" and "Citproc.CslJson".
module Citeproc.CaseTrans... | jgm/citeproc | src/Citeproc/CaseTransform.hs | bsd-2-clause | 4,574 | 0 | 16 | 984 | 1,180 | 605 | 575 | 125 | 2 |
module Handler.ListLinks where
import Import
import Control.Monad (forM)
import qualified Data.Text as T
findLinks :: UserId -> YesodDB sub App [(Link, [Text])]
findLinks user = do
links <- selectList [LinkOwner ==. user] []
forM links $ \(Entity linkid link) -> do
tags <- map (linkTagsTag . entityVal) <$> se... | MasseR/introitu | Handler/ListLinks.hs | bsd-2-clause | 820 | 0 | 15 | 123 | 231 | 115 | 116 | 19 | 1 |
{-# LANGUAGE QuasiQuotes #-}
-----------------------------------------------------------------------------
--
-- Module : Model.PaperReader.AnnualRev
-- Copyright :
-- License : BSD3
--
-- Maintainer : Hiro Kai
-- Stability : Experimental
-- Portability :
--
--
--
------------------------------------... | hirokai/PaperServer | Parser/Publisher/AnnualRev.hs | bsd-2-clause | 3,774 | 1 | 18 | 915 | 1,096 | 593 | 503 | 87 | 2 |
{-# LANGUAGE BangPatterns #-}
module Database.VCache.VGetInit
( vgetInit
) where
import Data.Bits
import Foreign.Ptr
import Database.VCache.Types
import Database.VCache.VGetAux
-- | For VGet from the database, we start with just a pointer and a
-- size. To process the VGet data, we also need to read addresse... | bitemyapp/haskell-vcache | hsrc_lib/Database/VCache/VGetInit.hs | bsd-2-clause | 2,936 | 0 | 27 | 721 | 564 | 308 | 256 | 46 | 4 |
module Toc1 where
import MyEither
import MyIdentity
import MyMaybe
import Test.HUnit
tests :: Test
tests = TestList
[ myIdentityTests
, myMaybeTests
, myEitherTests
]
myIdentityTests :: Test
myIdentityTests = TestCase $ show (MyIdentity "foo") @?= "MyIdentity \"foo\""
myMaybeTests :: Test
myMaybeTe... | hjwylde/haskell-type-classes-workshop | test/Toc1.hs | bsd-3-clause | 691 | 0 | 11 | 142 | 192 | 103 | 89 | 20 | 1 |
module LSC2012.TestHuffman1 where
import Data.Data
import Test.LazySmallCheck2012
import Benchmarks.Huffman
import System.Environment
instance Serial a => Serial (BTree a) where
series = cons1 Leaf \/ cons2 Fork
bench d = depthCheck (read d) prop_decEnc
| UoYCS-plasma/LazySmallCheck2012 | suite/performance/LSC2012/TestHuffman1.hs | bsd-3-clause | 260 | 0 | 7 | 39 | 81 | 42 | 39 | 8 | 1 |
module Main where
import Prelude hiding (readFile)
import System.IO(hSetBuffering,BufferMode(..),stdout)
import System.IO.UTF8(readFile)
import System.Directory(getDirectoryContents)
import System.FilePath((</>))
import System.Environment(getArgs)
import Data.List(isSuffixOf)
import Control.Monad(foldM,when)
import ... | RayRacine/hs-word2vec | analyze.hs | bsd-3-clause | 1,932 | 0 | 14 | 385 | 652 | 329 | 323 | 50 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Data.Wikipedia.Request
( Request ()
, (<>)
, requestURL
-- | Request properties
, action
, prop
, titles
, plnamespace
, pllimit
, plcontinue
-- | Requests
, queryRequest
, linksRequest
, wikiLinks
) where
... | awagner83/powermap | src/Data/Wikipedia/Request.hs | bsd-3-clause | 1,637 | 0 | 13 | 397 | 449 | 260 | 189 | 42 | 1 |
module TinyScheduler.SubJobs
( convertJobIntoSubJobs
, execSubJobs
) where
import Control.Concurrent
import Control.Concurrent.Async
import Data.Time
import TinyScheduler.Jobs
import Prelude hiding (id)
data SubJob a = SubJob
{ jobId :: Int
, subJobNo :: Int
, delayx :: Int
, job_ :: IO a
}
-- | Conv... | functor-soup/tiny-scheduler | TinyScheduler/SubJobs.hs | bsd-3-clause | 756 | 0 | 12 | 150 | 258 | 141 | 117 | 22 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Stack.Init
( findCabalFiles
, initProject
, InitOpts (..)
, SnapPref (..)
, Method (..)
, makeConcreteResolver
, tryDeprecatedPat... | rrnewton/stack | src/Stack/Init.hs | bsd-3-clause | 14,937 | 0 | 21 | 4,934 | 3,196 | 1,626 | 1,570 | 280 | 8 |
{-# LANGUAGE OverloadedStrings #-}
module Indexer where
import Control.Applicative
import Data.Configurator as Cfg
import Data.Configurator.Types
import Data.Text
main :: IO ()
main = do
cfg <- build =<< load configFiles
putStrLn $ show cfg
| kylcarte/harihara | src/Indexer.hs | bsd-3-clause | 249 | 0 | 9 | 42 | 67 | 37 | 30 | 10 | 1 |
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE Deri... | kylcarte/logics | src/Logic/Herbrand.hs | bsd-3-clause | 3,552 | 0 | 15 | 978 | 1,633 | 827 | 806 | 114 | 4 |
{-# LANGUAGE ScopedTypeVariables #-}
-----------------------------------------------------------------------------
--
-- Tasks running external programs for SysTools
--
-- (c) The GHC Team 2017
--
-----------------------------------------------------------------------------
module SysTools.Tasks where
import Exception... | sdiehl/ghc | compiler/main/SysTools/Tasks.hs | bsd-3-clause | 15,939 | 0 | 22 | 4,339 | 3,335 | 1,704 | 1,631 | 221 | 13 |
module Data.Text.Extra
( upperCaseFirst
, lowerCaseFirst
, dropPrefix
, dropSuffix
, (<+>)
, module T
)
where
import Data.String ( IsString )
import Data.Text as T
import Data.Semigroup
import Data.Char
import Prelude
dropPrefix :: Tex... | expipiplus1/vulkan | generate-new/src/Data/Text/Extra.hs | bsd-3-clause | 1,115 | 0 | 11 | 332 | 405 | 220 | 185 | -1 | -1 |
import Test.Hspec
import Test.QuickCheck
import Control.Exception (evaluate)
-- import Numeric.LinearAlgebra
main :: IO ()
main = hspec .
describe "Prelude.head" $ do
it "returns the first element of a list" $
head [23 ..] `shouldBe` (23 :: Int)
it "returns the first element of an *arbitrary* list" .... | pupuu/deep-neuralnet | test/Spec.hs | bsd-3-clause | 484 | 0 | 13 | 111 | 145 | 76 | 69 | 12 | 1 |
module ListUtil where
{-@ type IncrList a = [a] <{\xi xj -> xi <= xj}> @-}
| raymoo/lh-vfa-stuff | ListUtil.hs | bsd-3-clause | 76 | 0 | 2 | 17 | 5 | 4 | 1 | 1 | 0 |
{-# LANGUAGE TemplateHaskell, QuasiQuotes, TypeFamilies, OverloadedStrings #-}
import Text.Digestive.Forms.Yesod
import Control.Applicative
import Yesod hiding (Html, renderHtml, runFormPost)
import Text.Digestive
import Text.Digestive.Blaze.Html5
import Text.Blaze.Html5 (Html)
import qualified Data.ByteString.Lazy as... | softmechanics/digestive-functors-yesod | examples/simple.hs | bsd-3-clause | 1,603 | 3 | 15 | 293 | 499 | 261 | 238 | 43 | 2 |
{-# OPTIONS -Wall #-}
{-# OPTIONS -fno-warn-unused-do-bind #-}
{-# LANGUAGE OverloadedStrings #-}
module Language.Pck.Tool.Assembler (
-- * Assembler drivers
parseInst
, parseInstFile
-- * Assembler parse examples
-- $parsenote
) where
-- Attoparsec
import Data.Attoparsec... | takenobu-hs/processor-creative-kit | Language/Pck/Tool/Assembler.hs | bsd-3-clause | 11,182 | 0 | 14 | 3,155 | 2,665 | 1,383 | 1,282 | 208 | 2 |
module Main where
import Types
import Parser
testTask = Task "test1" (fromGregorian 2016 01 01) (Just $ fromGregorian 2016 02 01) High "note" setEmpty
main = do
putStrLn "Executable currenty does nothing"
| kvelicka/htodo | src/Main.hs | bsd-3-clause | 210 | 0 | 8 | 37 | 63 | 33 | 30 | 6 | 1 |
module Paths ( hseDirStructure
, cabalConfigLocation
, dotDirName
, constructDotDirName
, insidePathVar
) where
import Data.List (intercalate)
import System.FilePath ((</>))
import System.Directory (getCurrentDirectory)
import Util.IO (getEnvVar)
import... | tmhedberg/hsenv | src/Paths.hs | bsd-3-clause | 2,367 | 0 | 14 | 711 | 445 | 236 | 209 | 49 | 3 |
-- | Values with a @waynodes@ string accessor.
module Data.Geo.OSM.Lens.WaynodesL where
import Data.Geo.OSM.Waynodes
import Control.Lens.Lens
class WaynodesL a where
waynodesL ::
Lens' a Waynodes
| tonymorris/geo-osm | src/Data/Geo/OSM/Lens/WaynodesL.hs | bsd-3-clause | 205 | 0 | 7 | 33 | 42 | 26 | 16 | 6 | 0 |
{-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving #-}
module Clay.Time
(
-- * Time type.
Time
-- * Time constructors.
, sec
, ms
)
where
import Data.Monoid
import Data.Text (pack)
import Clay.Common
import Clay.Property
-------------------------------------------------------------------------------
ne... | bergmark/clay | src/Clay/Time.hs | bsd-3-clause | 913 | 0 | 12 | 180 | 237 | 131 | 106 | 24 | 1 |
-- | Simple value types and functions.
module Analyze.Values where
import Analyze.Common (Data)
import Control.Monad.Catch (Exception, MonadThrow (..))
import Data.Text (Text)
import Data.Typeable (Typeable)
-- | Singleton type for value types.
data ValueTy... | ejconlon/analyze | src/Analyze/Values.hs | bsd-3-clause | 2,569 | 0 | 8 | 587 | 699 | 366 | 333 | 48 | 1 |
{-# LANGUAGE OverloadedStrings, DataKinds, ScopedTypeVariables #-}
module Main (main) where
import Prelude hiding (mod, div)
import Data.Monoid
import Data.Boolean
import Data.Boolean.Numbers
import Data.Default.Class
import System.FilePath ( (</>) )
import Language.Sunroof
import Language.Sunroof.JS.Canvas
import... | ku-fpg/sunroof-examples | examples/clock/Main.hs | bsd-3-clause | 4,421 | 0 | 24 | 1,182 | 1,657 | 867 | 790 | 114 | 1 |
{-# Language OverloadedStrings, GADTs #-}
{-|
Module : Client.Commands.Arguments.Renderer
Description : Interpretation of argument specification as a renderer
Copyright : (c) Eric Mertens, 2017
License : ISC
Maintainer : emertens@gmail.com
-}
module Client.Commands.Arguments.Renderer (render) where
impo... | dolio/irc-core | src/Client/Commands/Arguments/Renderer.hs | isc | 3,175 | 0 | 26 | 931 | 889 | 455 | 434 | 69 | 8 |
{-# LANGUAGE RecordWildCards #-}
-- | Types which are stored in memory.
module Pos.DB.Update.MemState.Types
( MemPool (..)
, UpdateProposals
, LocalVotes
, MemState (..)
, MemVar (..)
, newMemVar
) where
import Universum
import Data.Default (Defa... | input-output-hk/pos-haskell-prototype | db/src/Pos/DB/Update/MemState/Types.hs | mit | 2,087 | 0 | 11 | 544 | 401 | 239 | 162 | 53 | 1 |
sth-echo "\b\b\b\b" | sth-unescape | sth-translit "\b" "x"
>>>
xxxx
>>>= 0
| nbloomf/st-haskell | test/translit/escape.hs | gpl-3.0 | 75 | 6 | 8 | 12 | 45 | 19 | 26 | -1 | -1 |
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
-- Derived from AWS service descriptions, licensed under Apache 2.0.
-- |
-- Module : Network.AWS.SNS
-- Copyright : (c) 2013-2015 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brenda... | fmapfmapfmap/amazonka | amazonka-sns/gen/Network/AWS/SNS.hs | mpl-2.0 | 7,859 | 0 | 5 | 1,514 | 578 | 438 | 140 | 89 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskell #-}
module NLP.Partage.AStar.Item
( Span (..)
, beg
, end
, gap
, Active (..)
, state
, spanA
, Passive (..)
, dagID
, spanP
, isAdjoinedTo
, regular
, auxiliary
, isRoot
-- #ifdef DebugOn
, printActive
, printPassive
-- #e... | kawu/factorized-tag-parser | src/NLP/Partage/AStar/Item.hs | bsd-2-clause | 3,107 | 0 | 14 | 950 | 901 | 481 | 420 | 90 | 2 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP
, NoImplicitPrelude
, ExistentialQuantification
#-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
{-# OPTIONS_HADDOCK not-home #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.IO.Handle.Types
-... | sdiehl/ghc | libraries/base/GHC/IO/Handle/Types.hs | bsd-3-clause | 16,949 | 0 | 13 | 3,978 | 1,360 | 823 | 537 | 141 | 1 |
module Distribution.Server.Features.Core (
CoreFeature,
coreResource,
CoreResource(..),
indexExtras, --FIXME: this is internal state and should not be exported.
initCoreFeature,
basicPackageSection,
withPackageId,
withPackageName,
withPackage,
withPackagePath,
withPackageAll... | isomorphism/hackage2 | Distribution/Server/Features/Core.hs | bsd-3-clause | 15,859 | 0 | 19 | 3,361 | 3,950 | 2,084 | 1,866 | 255 | 4 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
-- FunDeps example
class Foo a b c | a b -> c where
bar :: a -> b -> c
| mpickering/ghc-exactprint | tests/examples/ghc710/FunDeps.hs | bsd-3-clause | 155 | 0 | 6 | 34 | 37 | 21 | 16 | 4 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-route53/gen/Network/AWS/Route53/GetCheckerIpRanges.hs | mpl-2.0 | 3,808 | 0 | 10 | 738 | 421 | 253 | 168 | 55 | 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="sr-SP">
<title>Call Home Add-On</title>
<maps>
<homeID>callhome</homeID>
<mapref locati... | thc202/zap-extensions | addOns/callhome/src/main/javahelp/org/zaproxy/addon/callhome/resources/help_sr_SP/helpset_sr_SP.hs | apache-2.0 | 966 | 77 | 67 | 157 | 413 | 209 | 204 | -1 | -1 |
{-# LANGUAGE CPP, RankNTypes, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-----------------------------------------------------------------------------
-- |
-- Module : Haddock.InterfaceFile
-- Copyright : (c) David Waern 2006-2009,
-- Mateusz Kowalczyk 2013
-- Licens... | lamefun/haddock | haddock-api/src/Haddock/InterfaceFile.hs | bsd-2-clause | 19,191 | 10 | 28 | 6,630 | 5,430 | 2,569 | 2,861 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -optP -C -optP -ffreestanding #-}
#define A 'a'
main :: IO ()
main = putStrLn [A,
-- /*
'b',
-- */
'c']
| forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/driver/T3389.hs | bsd-3-clause | 178 | 0 | 6 | 65 | 33 | 20 | 13 | 6 | 1 |
-- !!! Exporting non-existent datatype transparently
module M(T(K1)) where
x = 'a' -- dummy definition to get round a separate bug
| siddhanathan/ghc | testsuite/tests/module/mod10.hs | bsd-3-clause | 131 | 0 | 5 | 21 | 20 | 14 | 6 | 4 | 1 |
module Language.Haskell.Session.GHC.Util where
import qualified GHC
import Outputable (Outputable)
import qualified Outputable
dshow :: Outputable a => GHC.DynFlags -> a -> String
dshow dflags = Outputable.showSDoc dflags . Outputable.ppr
| pmlodawski/ghc-session | src/Language/Haskell/Session/GHC/Util.hs | mit | 253 | 0 | 7 | 43 | 66 | 38 | 28 | 6 | 1 |
--mkPerson.hs
module MkPerson where
type Name = String
type Age = Integer
data Person = Person Name Age deriving Show
data PersonInvalid = NameEmpty
| AgeTooLow
| PersonInvalidUnknown String
deriving (Eq, Show)
mkPerson :: Name -> Age -> Either PersonInvalid ... | deciduously/Haskell-First-Principles-Exercises | 4-Getting real/13-Building Projects/code/mkPerson.hs | mit | 926 | 0 | 13 | 339 | 295 | 143 | 152 | 26 | 2 |
{-|
Module : BreadU.Pages.Markup.IndexPage
Description : HTML markup for the index page.
Stability : experimental
Portability : POSIX
HTML markup for the index page.
-}
module BreadU.Pages.Markup.IndexPage where
import BreadU.Types ( FoodName, LangCode(..) )
import ... | denisshevchenko/breadu.info | src/lib/BreadU/Pages/Markup/IndexPage.hs | mit | 9,731 | 0 | 19 | 2,973 | 2,030 | 1,028 | 1,002 | -1 | -1 |
module Dianoga.Minification.Css where
| iand675/dianoga | src/Dianoga/Minification/Css.hs | mit | 38 | 0 | 3 | 3 | 7 | 5 | 2 | 1 | 0 |
module Data.Bson
( module Data.Bson.Class
, module Data.Bson.Parser
, module Data.Bson.Types
, module Data.Bson.Utils
) where
-- Instance Binary Document
import Data.Bson.Binary ()
import Data.Bson.Class (ToBson(..), FromBson(..))
import Data.Bson.Parser (Parser, parse, parseMaybe, parseEither)
im... | lambda-llama/bresson | src/Data/Bson.hs | mit | 486 | 2 | 6 | 76 | 159 | 109 | 50 | 11 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
module HttpApp.PlayNow.Api
( module HttpApp.PlayNow.Api.Types
, Protected
) where
import Servant ((:<|>), (:>), Delete, Get, JSON,
Post, ReqBody)
import HttpApp.PlayNo... | rubenmoor/skull | skull-server/src/HttpApp/PlayNow/Api.hs | mit | 567 | 0 | 9 | 174 | 159 | 96 | 63 | 15 | 0 |
module Game.Input.Events where
data InputEvent = Key KeyEvent
| Mouse MouseEvent
| Quit
| NoInput
type KeyEvent = Maybe Key
type MouseEvent = Maybe MouseButton
data Key = KeySpace
| Key1
| Key2
| Key3
deriving (Show, Eq)
data Mouse... | flomerz/SchaffschNie | src/Game/Input/Events.hs | mit | 396 | 0 | 6 | 170 | 93 | 55 | 38 | 15 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-firehoseaction.html
module Stratosphere.ResourceProperties.IoTTopicRuleFirehoseAction where
im... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/IoTTopicRuleFirehoseAction.hs | mit | 2,686 | 0 | 13 | 268 | 356 | 202 | 154 | 34 | 1 |
{-# LANGUAGE OverloadedStrings, TemplateHaskell #-}
module Main
where
import Control.Concurrent
import Control.Exception (SomeException)
import Control.Distributed.Process
import Control.Distributed.Process.Closure
import Control.Distributed.Process.Node
import Control.Distributed.Process.Backend.ZMQ
import Control.... | qnikst/distributed-process-zmq | examples/weather.hs | mit | 1,965 | 0 | 16 | 358 | 629 | 327 | 302 | 49 | 1 |
-- simple function definition in haskell
--
-- funName params = expression
--
-- 1. function can't start with uppercase letter
-- 2. a function can call each other without in particular order
-- 3. function without parameters, use it as a name
-- 4. use let defining variables in function
-- let definition
-- ... | ddki/my_study_project | language/haskell/grammer/base/simpleFunctionDef.hs | mit | 643 | 0 | 8 | 170 | 122 | 65 | 57 | 9 | 2 |
{-# Language GADTs #-}
module Unison.Runtime.Stream where
import Control.Monad
import Data.Either
import Data.Maybe
import Unison.Runtime.Free (Free)
import qualified Unison.Runtime.Free as Free
import Prelude hiding (head)
data StreamF f a r where
Effect :: f r -> StreamF f a r
Emit :: a -> StreamF f a ()
type... | nightscape/platform | node/src/Unison/Runtime/Stream.hs | mit | 1,679 | 0 | 13 | 402 | 950 | 475 | 475 | 43 | 3 |
{-|
Module : Main
Description : Main module for a basic bare-minimum Jupyter kernel created using the @jupyter@ library.
Copyright : (c) Andrew Gibiansky, 2016
License : MIT
Maintainer : andrew.gibiansky@gmail.com
Stability : stable
Portability : POSIX
This module is the Main module for @kernel-stdin@, a... | gibiansky/jupyter-haskell | examples/stdin/Main.hs | mit | 4,193 | 0 | 13 | 978 | 668 | 367 | 301 | 58 | 3 |
-- | Layout routine for Data.Tree
-- $Id$
module Tree
( module Data.Tree
, module Autolib.Dot.Dot
, module Tree.Class
, peng
)
where
import Data.Tree
import Autolib.Dot.Dot
import Autolib.Dot.Dotty
import Tree.Class
import Tree.Dot
| florianpilz/autotool | src/Tree.hs | gpl-2.0 | 242 | 0 | 5 | 43 | 57 | 38 | 19 | 10 | 0 |
module Data.CommandLineParser where
import Options.Applicative
data GlobalOpts = Global GlobalCmd
data GlobalCmd = Config ConfigOpts
| Repo RepoOpts
| Term TermOpts
| Course CourseOpts
| Group GroupOpts
| Project Pr... | AntoineSavage/haskell | turninH/src/Data/CommandLineParser.hs | gpl-2.0 | 6,887 | 0 | 9 | 1,498 | 990 | 573 | 417 | 130 | 0 |
<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE helpset
PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 1.0//EN"
"http://java.sun.com/products/javahelp/helpset_1_0.dtd">
<helpset version="1.0">
<title>My JavaHelp System</title>
<maps>
<mapref location="Map.jhm"/>
... | newrol/ideasbook | MyJavaHelp/HelpSet.hs | gpl-2.0 | 691 | 53 | 43 | 182 | 270 | 138 | 132 | -1 | -1 |
module Main where
import Test.HUnit
import Data.Ix
import Data.SuffixArray
import Data.CountingSort
import qualified Data.Vector as V
testCountOccurences :: (Ix a, Ord a, Bounded a, Show a) => [a] -> [Int] -> Test
testCountOccurences testData answer = TestCase (
assertEqual ("countOccurences " ++ (show testData... | VictorDenisov/suffixarray | Tests/Tests.hs | gpl-2.0 | 3,422 | 0 | 14 | 983 | 1,152 | 654 | 498 | 56 | 1 |
module Util.UnionFind(
Element,
T,
find,
fromElement,
getW,
new,
new_,
putW,
union,
union_,
updateW
) where
import Control.Monad.Trans
import Data.IORef
import Data.Unique
import Monad(when,liftM)
data Element w a = Element a {-# UNPACK #-} !Unique {-# UNPACK #-} !(IORe... | dec9ue/jhc_copygc | src/Util/UnionFind.hs | gpl-2.0 | 2,457 | 0 | 18 | 794 | 1,271 | 614 | 657 | 74 | 2 |
{-# LANGUAGE LambdaCase #-}
module Main where
import BruteForce (bruteForce, bruteForce')
import System.Console.GetOpt
import System.Environment (getArgs)
import System.TimeIt (timeIt)
-- | all possible flags that can be passed to the executable
data Flag = ShowVersion -- ^ displays the version number
... | kmein/brute | Main.hs | gpl-3.0 | 3,316 | 0 | 22 | 985 | 811 | 437 | 374 | 63 | 9 |
import Data.List
hasThreeWovels = (>=3) . length . filter (\c -> c `elem` "aeiou")
pairs s = zip s (tail s)
hasTwoInARow s = 1 <= length [(x,y) | (x, y) <- pairs s, x==y]
doesNotContainUnwantedPattern s = let unwanted_patterns = [('a', 'b'), ('c', 'd'), ('p', 'q'), ('x', 'y')]
... | plilja/adventofcode | 2015/day05/day05.hs | gpl-3.0 | 1,174 | 0 | 12 | 309 | 490 | 253 | 237 | 22 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE RecordWildCards #-}
module Main where
import qualified Data.Vector.Unboxed as VU
import qualified Data.Vector as V
import qualified Data.HashMap.Strict as HM
import qualified Data.IntMap as IM
import qualified Data.List as L
import qualified Sy... | lostbean/Hammer | profile/Benchmark.hs | gpl-3.0 | 6,348 | 0 | 13 | 1,592 | 5,564 | 3,606 | 1,958 | 140 | 1 |
import SimpleEuterpea
--cs Major 4/4
--Surprised that a bit of messing around got me my second section, which I thought would be the hardest to come up with
arp' c a t = arp (pitches c) a t
block' c t = blockChord (pitches c) [0,1,2] t
sarp = [s c0]
earp = [e c0]
qarp = [q c0]
hb = [h c0]
wb = [w c0]
alter ... | WSCU/JSEuterpea | Euterpea Examples/Transformations.hs | gpl-3.0 | 1,745 | 0 | 12 | 468 | 625 | 335 | 290 | 39 | 1 |
-- 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/Grid/GridWorld.hs | gpl-3.0 | 2,384 | 0 | 10 | 485 | 309 | 208 | 101 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Hedgehog
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range
data Foo = Foo { bar :: Int, baz :: Char } deriving (Eq, Show)
newtype Trace = Trace [Foo] deriving (Eq, Show)
randomFoo :: Gen Foo
randomFoo = do
n <- Gen.filter (\x... | capitanbatata/sandbox | hedgehog-vs-qc/test/hedgehog/Main.hs | gpl-3.0 | 4,589 | 0 | 14 | 857 | 1,205 | 630 | 575 | 98 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE TupleSections #-}
module Visuals where
import Prelude hiding (floor, mod, lines)
import LambdaDesigner.Op
import LambdaDesigner.ParsedOps
import LambdaDesigner.Lib
import Data.Char
import Data.IORef
import Data.List.Split
import Data.Maybe... | ulyssesp/oscillare | src/Visuals.hs | gpl-3.0 | 30,638 | 0 | 18 | 7,780 | 9,188 | 4,853 | 4,335 | -1 | -1 |
{-
The Delve Programming Language
Copyright 2009 John Morrice
Distributed under the terms of the GNU General Public License v3, or ( at your option ) any later version.
This file is part of Delve.
Delve is free software: you can redistribute it and/or modify
it under the terms of the GNU Gene... | elginer/Delve | src/VMCompiler.hs | gpl-3.0 | 11,764 | 0 | 19 | 3,587 | 2,871 | 1,428 | 1,443 | -1 | -1 |
module Shiny.Hardware.Serial where
import Shiny.Shiny
import Shiny.Hardware
import System.Hardware.Serialport
import Control.Concurrent (threadDelay)
import qualified Data.ByteString as B
import Data.IORef
mkSerialHardware :: FilePath -> Int -> IO (Hardware)
mkSerialHardware path size = do
port <- openSerial path... | dhrosa/shiny | Shiny/Hardware/Serial.hs | gpl-3.0 | 1,002 | 0 | 16 | 269 | 309 | 153 | 156 | 26 | 1 |
module Robot where
import Linear
import Arm
data Robot = Robot
{ start :: V3 Float
, arms :: [Arm]
}
| dvolk/hobo | src/Robot.hs | gpl-3.0 | 119 | 0 | 9 | 39 | 37 | 23 | 14 | 6 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-ec2/gen/Network/AWS/EC2/DescribeTags.hs | mpl-2.0 | 5,543 | 0 | 11 | 1,233 | 794 | 475 | 319 | 81 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/DeregisterRdsDbInstance.hs | mpl-2.0 | 3,613 | 0 | 9 | 685 | 349 | 214 | 135 | 48 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-compute/gen/Network/Google/Resource/Compute/Routers/Delete.hs | mpl-2.0 | 3,439 | 0 | 16 | 834 | 463 | 276 | 187 | 73 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Regions/Clusters/GetIAMPolicy.hs | mpl-2.0 | 6,021 | 0 | 16 | 1,291 | 781 | 457 | 324 | 121 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- | Arbitrary instances and data types for use in test suites.
module Network.Haskoin.Test.Stratum
( -- * Arbitrary Data
ReqRes(..)
) where
import Control.Applicative
import Test.QuickCheck.Arbitrary
import Test.QuickCheck.Gen
import Data.Ae... | nuttycom/haskoin | Network/Haskoin/Test/Stratum.hs | unlicense | 5,391 | 0 | 15 | 1,626 | 1,562 | 838 | 724 | 122 | 0 |
-- Zipping exercises
myZip :: [a] -> [b] -> [(a, b)]
myZip [] _ = []
myZip _ [] = []
myZip (x:xs) (y:ys) = (x,y):myZip xs ys
myZipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
myZipWith _ [] _ = []
myZipWith _ _ [] = []
myZipWith f (x:xs) (y:ys) = (f x y):myZipWith f xs ys
myZip' :: [a] -> [b] -> [(a, b)]
myZip' = myZi... | dmp1ce/Haskell-Programming-Exercises | Chapter 9/Zipping exercises.hs | unlicense | 330 | 0 | 8 | 79 | 250 | 136 | 114 | 10 | 1 |
{- Copyright 2015 David Farrell <shokku.ra@gmail.com>
- 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... | shockkolate/arata | plugins/Ext/Help.hs | apache-2.0 | 1,543 | 0 | 9 | 374 | 204 | 131 | 73 | 29 | 1 |
{-# LANGUAGE TemplateHaskell, MultiWayIf #-}
module Brain where
import Control.Lens
import Control.Monad.State
import Control.Monad.Reader
import Control.Monad.Writer
import Data.Ord
import Data.Maybe
import Data.List
import Data.Monoid
import qualified Data.Map.Strict as Map
import Debug.Trace
import G... | jhartikainen/hwo2014bot | Brain.hs | apache-2.0 | 14,364 | 0 | 15 | 4,652 | 4,800 | 2,556 | 2,244 | 255 | 5 |
--
-- Copyright : (c) T.Mishima 2014
-- License : Apache-2.0
--
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP, ForeignFunctionInterface #-}
module Main where
import Bindings.OculusRift
import Bindings.OculusRift.Types
import Control.Exception ( bracket )
import Debug.Trace ( traceIO )
import Foreign.C.String ( peek... | tmishima/bindings-Oculus | test/case2/Main.hs | apache-2.0 | 8,738 | 0 | 22 | 2,326 | 2,100 | 1,044 | 1,056 | 183 | 3 |
#!/usr/bin/env stack
-- stack --resolver lts-9.1 runghc --package minio-hs
--
-- Minio Haskell SDK, (C) 2017 Minio, Inc.
--
-- 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://... | donatello/minio-hs | examples/PresignedPutObject.hs | apache-2.0 | 2,035 | 0 | 19 | 473 | 272 | 154 | 118 | 22 | 2 |
{-# LANGUAGE TupleSections, OverloadedStrings #-}
module Handler.Admin where
import Import
getAdminR :: Handler RepHtml
getAdminR = do
(plugins, posts, users) <- runDB $ do
plugins <- count [PluginTitle !=. ""]
posts <- count [EntrySlug !=. ""]
users <- count [UserIdent !=. ""]
ret... | ModernSteward/blog | Handler/Admin.hs | bsd-2-clause | 442 | 0 | 14 | 114 | 132 | 66 | 66 | 13 | 1 |
{-# LANGUAGE TypeFamilies, FlexibleInstances, MultiParamTypeClasses #-}
module Data.Vector.Fixed.Linear where
import Data.Vector.Fixed.Internal
import Linear
type instance Dim V2 = S (S Z)
type instance Dim V3 = S (S (S Z))
type instance Dim V4 = S (S (S (S Z)))
instance Vector V2 a where
construct = Fun V2
inspe... | acowley/fixed-linear | src/Data/Vector/Fixed/Linear.hs | bsd-3-clause | 528 | 0 | 11 | 119 | 247 | 128 | 119 | 16 | 0 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -Wall #-}
-- | Surface chart combinators.
--
-- A common chart is to present a set of rectangles on the XY plane with colour representing values of the underlying data. This library uses the term /surfac... | tonyday567/chart-svg | src/Chart/Surface.hs | bsd-3-clause | 6,973 | 0 | 26 | 1,640 | 1,872 | 1,022 | 850 | 157 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Data.FAlgebra.Tree.Indexed
( module Data.FAlgebra.Base
, module Data.FAlgebra.Annotation
, module Data.FAlgebra.Tree
, module Data.FAlgebra.Tree.Zipper
, idx
, idxSlot
) where
import Prelude hiding (zip)
import ... | bhamrick/fixalgs | Data/FAlgebra/Tree/Indexed.hs | bsd-3-clause | 1,473 | 0 | 18 | 441 | 504 | 269 | 235 | 34 | 4 |
{-# OPTIONS_GHC -Wno-missing-signatures #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
module GCounter where
import Test.QuickCheck ((===))
import CRDT.Cv.GCounter (GCounter (..), increment, query)
import CRDT.Laws (cvrdtLaws)
test_Cv = cvrdtLaws @(GCounter... | cblp/crdt | crdt-test/test/GCounter.hs | bsd-3-clause | 433 | 0 | 8 | 87 | 110 | 63 | 47 | 10 | 1 |
module Dang.ModuleSystem.Env (
NameTrie(),
NameNode(..),
Def(..),
envVal, envType, envMod,
qualify,
insertPName,
lookupVal,
lookupType,
lookupMod,
lookupPName,
openMod,
shadowing,
intersectionWith,
) where
import Dang.Syntax.AST (PName(..))
import Dang.Utils.PP
imp... | elliottt/dang | src/Dang/ModuleSystem/Env.hs | bsd-3-clause | 4,324 | 0 | 20 | 1,287 | 1,691 | 855 | 836 | 118 | 6 |
--------------------------------------------------------------------
-- |
-- Module : Text.Feed.Import
-- Copyright : (c) Galois, Inc. 2008,
-- (c) Sigbjorn Finne 2009-
-- License : BSD3
--
-- Maintainer: Sigbjorn Finne <sof@forkIO.com>
-- Stability : provisional
--
-- Convert from XML to Feeds.
--
---... | seereason/feed | Text/Feed/Import.hs | bsd-3-clause | 3,555 | 0 | 12 | 696 | 484 | 279 | 205 | 41 | 2 |
module Types where
import qualified Data.Map as M
data Result = Sat | Unsat | Unknown | OptFound deriving (Eq,Show)
data Lit = PosLit Var | NegLit Var deriving (Eq,Show)
data Constraint = Geq Lhs Rhs | Eq Lhs Rhs deriving (Show,Eq)
data Term = MkTrm Integer Var deriving (Show,Eq)
type Assignment = M.Map Var Bool
ma... | EJahren/PBCompOutputChecker | src/Types.hs | bsd-3-clause | 617 | 0 | 9 | 145 | 252 | 141 | 111 | 15 | 2 |
module Physics.Falling2d.UnitSphere2d
(
)
where
import System.Random
import Data.Random.Normal
import Data.Vect.Double.Base
import Physics.Falling.Math.UnitSphere
instance UnitSphere Normal2 where
unitSphereSamples = _randomCirclePoints
nUnitSphereSamples n = map (\ang -> toNormalUnsafe $ Vec2 (cos ang) (sin ... | sebcrozet/falling2d | Physics/Falling2d/UnitSphere2d.hs | bsd-3-clause | 728 | 0 | 12 | 159 | 223 | 121 | 102 | 15 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
-------... | tensor5/tensor | src/Data/Tensor/Vector.hs | bsd-3-clause | 20,137 | 0 | 19 | 7,629 | 6,010 | 3,147 | 2,863 | -1 | -1 |
module Main where
import Haste
import Haste.HPlay.View hiding (head)
import Radio.Application
import Control.Monad.IO.Class
import Prelude hiding (div)
import Radio.Util
main :: IO (Maybe ())
main = do
addCss "./bootstrap.min.css"
addCss "./bootstrap-theme.min.css"
embedCss myCss
addJs "./jquery-1.11.2.min.... | Teaspot-Studio/bmstu-radio-problem-haste | Main.hs | bsd-3-clause | 1,348 | 0 | 13 | 321 | 337 | 168 | 169 | 43 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : BParser
-- Copyright : (c) 2005 Lemmih <lemmih@gmail.com>
-- License : BSD3
-- Maintainer : lemmih@gmail.com
-- Stability : stable
-- Portability : portable
--
-- A parsec style parser for BEncoded data
--... | matthewleon/bencode | src/Data/BEncode/Parser.hs | bsd-3-clause | 3,569 | 0 | 15 | 1,334 | 1,080 | 547 | 533 | 83 | 4 |
{-# LANGUAGE OverloadedStrings, NoMonomorphismRestriction #-}
module Network.Torrent.Client (
StorageConfig(..),
StorageCmd(..),
StorageEvent(..),
StoragePiece,
PieceInfo,
storage) where
import Prelude hiding (FilePath)
import Filesystem.Path.CurrentOS
import Control.Monad
import Control.Exception as X
i... | alios/lcars2 | Network/Torrent/Client.hs | bsd-3-clause | 4,764 | 0 | 21 | 1,409 | 1,252 | 644 | 608 | 121 | 4 |
{-# LANGUAGE ConstraintKinds
, ScopedTypeVariables
, TypeOperators #-}
module Rad.QL.Internal.GUnion where
import Data.Monoid ((<>))
import Data.String (fromString)
import GHC.Generics
import Rad.QL.Internal.Types
import Rad.QL.AST
import Rad.QL.Types
type IsUnion m a = (Generic a, GUnion m (... | jqyu/bustle-chi | src/Rad/QL/Internal/GUnion.hs | bsd-3-clause | 2,441 | 0 | 10 | 594 | 926 | 488 | 438 | -1 | -1 |
{-# LANGUAGE RankNTypes #-}
module AdjointFoldAndUnfold where
-- | ref.) http://www.cs.ox.ac.uk/ralf.hinze/SSGIP10/AdjointFolds.pdf
-- https://www.researchgate.net/publication/221440236_Adjoint_Folds_and_Unfolds
{--
import Numeric.Natural
data Stack s = Empty
| Push (Natural, s)
deriv... | cutsea110/aop | src/AdjointFoldAndUnfold.hs | bsd-3-clause | 8,864 | 0 | 2 | 3,527 | 14 | 13 | 1 | 2 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.