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 HJScript.DOM.TextNode
(
TextNode(..),
text, length,
appendData, deleteData, insertData,
replaceData, splitText, substringData
) where
import HJScript.Lang
import HJScript.DOM.NodeTypes
import HJScript.DOM.Node
import Prelude hiding (length)
-------------... | seereason/HJScript | src/HJScript/DOM/TextNode.hs | bsd-3-clause | 1,583 | 0 | 10 | 250 | 352 | 190 | 162 | 28 | 1 |
{-# LANGUAGE CPP, RecordWildCards, NamedFieldPuns, DeriveGeneric #-}
-- | Project configuration, implementation in terms of legacy types.
--
module Distribution.Client.ProjectConfig.Legacy (
-- * Project config in terms of legacy types
LegacyProjectConfig,
parseLegacyProjectConfig,
showLegacyProjectCo... | thomie/cabal | cabal-install/Distribution/Client/ProjectConfig/Legacy.hs | bsd-3-clause | 51,308 | 0 | 24 | 14,947 | 8,535 | 4,874 | 3,661 | 978 | 8 |
-- | Paragon Abstract Syntax Tree. Types.
module Language.Java.Paragon.Syntax.Types
(
module Language.Java.Paragon.Syntax.Types
, module Language.Java.Paragon.Syntax.Names
) where
import Language.Java.Paragon.Syntax.Names
import Language.Java.Paragon.Annotation
import Language.Java.Paragon.Annotated
-- | T... | bvdelft/paragon | src/Language/Java/Paragon/Syntax/Types.hs | bsd-3-clause | 2,238 | 0 | 9 | 572 | 567 | 318 | 249 | 61 | 1 |
{-# LANGUAGE OverloadedStrings, DeriveGeneric, ScopedTypeVariables, NoImplicitPrelude, QuasiQuotes, GeneralizedNewtypeDeriving #-}
{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-unused-matches #-}
-----------------------------------------------------------------------------
-- |
-- Module : Using Alex's Wikipe... | stephenjbarr/parody-bot | src/AlexWPQuery.hs | bsd-3-clause | 1,834 | 0 | 14 | 293 | 326 | 185 | 141 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Main (main) where
import Prelude ()
import Prelude.Compat
import Compare.BufferBuilder ()
import Compare.JsonBuilder ()
import Criterion.Main
import Data.BufferBuilder.Json
import Data.Json.Builder
import Twitter
import Twitter.Manual ()
import Typed.Common
import qualifie... | sol/aeson | benchmarks/Compare.hs | bsd-3-clause | 710 | 0 | 13 | 138 | 190 | 108 | 82 | 23 | 1 |
xxcrypt n ed mc = mc ^ ed `mod` n
encrypt = xxcrypt 138689 13
decrypt = xxcrypt 138689 95497
| YoshikuniJujo/funpaala | samples/05_function/rsa2.hs | bsd-3-clause | 94 | 0 | 6 | 21 | 43 | 22 | 21 | 3 | 1 |
{-# LANGUAGE ViewPatterns #-}
module Figures where
import Config
import qualified Data.Map as Map
import System.Random
-- Tetris figures
type Block = (Int, Int)
data FigureType = Cube | Tank | Stick | Snake1 | Snake2 | Corner1 | Corner2
deriving (Enum, Bounded, Show)
data Rotation = D1 | D2 | D3 | D4
deriving (E... | SkyA1ex/tetris | src/Figures.hs | bsd-3-clause | 2,934 | 0 | 10 | 510 | 1,812 | 1,067 | 745 | 53 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Mental.Unify
( unify
, solve
, UnifyResult
) where
#define DEBUG_UNIFY 0
... | romac/mental | src/Mental/Unify.hs | bsd-3-clause | 2,428 | 0 | 17 | 763 | 849 | 458 | 391 | 67 | 8 |
module Paths_th_instances (
version,
getBinDir, getLibDir, getDataDir, getLibexecDir,
getDataFileName
) where
import Data.Version (Version(..))
import System.Environment (getEnv)
version :: Version
version = Version {versionBranch = [0,1,0,10], versionTags = []}
bindir, libdir, datadir, libexecdir :: F... | jfischoff/th-instances | dist/build/autogen/Paths_th_instances.hs | bsd-3-clause | 1,052 | 0 | 10 | 144 | 283 | 163 | 120 | 22 | 1 |
{-# LANGUAGE DataKinds, FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances, LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses, RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables, TypeFamilies, TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
module Control.Ef... | KolodeznyDiver/loop-effin | Control/Effect/Loop.hs | bsd-3-clause | 3,541 | 0 | 13 | 966 | 1,303 | 673 | 630 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeFamilies #-}
module Api.Monad where
import D... | raptros/chatless-hs | src/Api/Monad.hs | bsd-3-clause | 4,813 | 0 | 14 | 813 | 1,417 | 748 | 669 | 94 | 1 |
-------------------------------------------------------------------------------
-- |
-- Module : System.Hardware.Arduino.SamplePrograms.LCD
-- Copyright : (c) Levent Erkok
-- License : BSD3
-- Maintainer : erkokl@gmail.com
-- Stability : experimental
--
-- Basic demo of an Hitachi HD44780 LCD
-------... | LeventErkok/hArduino | System/Hardware/Arduino/SamplePrograms/LCD.hs | bsd-3-clause | 8,536 | 0 | 32 | 3,727 | 1,745 | 966 | 779 | 107 | 9 |
-- |
-- Module : Crypto.Random.Generator
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : Good
--
module Crypto.Random.Generator
( CPRG(..)
) where
import Data.ByteString (ByteString)
import Crypto.Random.Entropy (EntropyPool)
... | vincenthz/hs-crypto-random | Crypto/Random/Generator.hs | bsd-3-clause | 1,973 | 0 | 9 | 460 | 154 | 104 | 50 | 10 | 0 |
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Language.Haskell.TH
import GHC.Generics
import Sized
import Arbitrary
import TemplateAllv
import TemplateArbitrary
import TemplateSized
import UUTReader
import UUT
import UUTReaderUtilities
import UUTReaderUtilitiesDeep
import System.IO.Unsafe
---------------... | pegartillo95/CaseGenerator | app/Main.hs | bsd-3-clause | 2,738 | 0 | 16 | 1,005 | 193 | 104 | 89 | 24 | 1 |
module MsgDiagram.Transform.UML (
msgDiagram2UML, msgDiaFmtUML, msgDiaExtUML
) where
import Text.PrettyPrint.Leijen as PP
import MsgDiagram.Model
msgDiaFmtUML = "uml"
msgDiaExtUML = ".uml"
msgDiagram2UML :: MsgDiagram -> Doc
msgDiagram2UML md = vsep $ map prettyStep md
prettyStep :: MsgDiagramStep -> Doc
prett... | jfdm/hUML | src/MsgDiagram/Transform/UML.hs | bsd-3-clause | 835 | 0 | 9 | 259 | 182 | 96 | 86 | 18 | 1 |
--
-- Unshipping Docker
--
-- Copyright © 2014 Operational Dynamics Consulting, Pty Ltd and Others
--
-- The code in this file, and the program it is a part of, is
-- made available to you by its authors as open source software:
-- you can redistribute it and/or modify it under the terms of
-- the 3-clause BSD licence.... | afcowie/detour | tests/Experiment.hs | bsd-3-clause | 1,157 | 0 | 10 | 226 | 284 | 159 | 125 | 27 | 1 |
{-# LANGUAGE ExistentialQuantification #-}
module GameObjects.GameObject(
Vector,
GameObject_(..),
GameObject(..),
Type(..),
getColor3f
) where
import Graphics.UI.GLUT
import Data.List
type Vector = (GLfloat, GLfloat)
data Type = PolygonType | BallType deriving (Eq, Ord, Show)
-- | The general ... | Zielon/Bounce | src/GameObjects/GameObject.hs | bsd-3-clause | 1,069 | 0 | 11 | 291 | 362 | 207 | 155 | 28 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
-- | Web server.
module Pos.Web.Server
( serveImpl
, serveDocImpl
, withRoute53HealthCheckApplication
, serveWeb
, servantServer
, application
... | input-output-hk/pos-haskell-prototype | lib/src/Pos/Web/Server.hs | mit | 10,123 | 0 | 17 | 2,442 | 2,276 | 1,242 | 1,034 | -1 | -1 |
{-|
Noun Library
This module just re-exports things from submodules.
-}
module Urbit.Noun
( module Urbit.Atom
, module Data.Word
, module Urbit.Noun.Conversions
, module Urbit.Noun.Convert
, module Urbit.Noun.Core
, module Urbit.Noun.Cue
, module Urbit.Noun.Jam
, module Urbit.No... | jfranklin9000/urbit | pkg/hs/urbit-king/lib/Urbit/Noun.hs | mit | 1,379 | 0 | 13 | 282 | 392 | 222 | 170 | -1 | -1 |
type Writer a = (a, String) | hmemcpy/milewski-ctfp-pdf | src/content/1.8/code/haskell/snippet16.hs | gpl-3.0 | 27 | 0 | 5 | 5 | 14 | 9 | 5 | 1 | 0 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.PreProcess
-- Copyright : (c) 2003-2005, Isaac Jones, Malcolm Wallace
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- This defines a 'PreProcessor' abstraction which ... | jwiegley/ghc-release | libraries/Cabal/cabal/Distribution/Simple/PreProcess.hs | gpl-3.0 | 29,696 | 0 | 29 | 8,593 | 5,465 | 2,972 | 2,493 | 412 | 35 |
{-# 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-s3/gen/Network/AWS/S3/ListObjectVersions.hs | mpl-2.0 | 11,460 | 0 | 24 | 2,548 | 2,133 | 1,239 | 894 | 226 | 1 |
{-
Copyright 2012-2013 Google Inc. 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 applicable law or agreed t... | kustomzone/plush | src/Plush/Run/Annotate.hs | apache-2.0 | 4,695 | 0 | 20 | 1,388 | 1,370 | 696 | 674 | 89 | 8 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Application
( makeApplication
, getApplicationDev
, makeFoundation
) where
import Import
import Settings
import Yesod.Auth
import Yesod.Default.Config
import Yesod.Default.Main
import Yesod.Default.Handlers
import Network.Wai.Middleware.RequestLogger (logStd... | marcotmarcot/mini-scilab-site | Application.hs | bsd-2-clause | 2,087 | 0 | 11 | 390 | 367 | 202 | 165 | -1 | -1 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
-- Based on https://www.haskell.org/haskellwiki/GHC/Type_families#Detailed_definition_of_data_families
module DataFamilies
(
GMap
, GMapKey(type GMapK)
) where
-- Type 1, Top level
data family GMap k :: * -> *
data family Array e
data ... | mpickering/ghc-exactprint | tests/examples/ghc710/DataFamilies.hs | bsd-3-clause | 1,202 | 1 | 9 | 313 | 284 | 165 | 119 | -1 | -1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
-- A simple test to check that defining a custom instance is easily
-- possible and extraction works as expected.
import Language.Haskell.TH
import Language.Haskell.TH.Syntax
import Data.Functor.Identity
instance Quote Identity ... | sdiehl/ghc | testsuite/tests/th/overloaded/TH_overloaded_extract.hs | bsd-3-clause | 671 | 2 | 11 | 128 | 156 | 92 | 64 | -1 | -1 |
{-
Copyright 2017 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... | three/codeworld | codeworld-prediction/src/CodeWorld/Prediction/Trivial.hs | apache-2.0 | 5,118 | 0 | 13 | 1,051 | 1,167 | 624 | 543 | 68 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Router (router) where
import Control.Applicative ((<|>))
import Control.Monad.Trans (liftIO)
import qualified Data.Aeson as Json
import qualified Data.ByteString.UTF8 as Utf8
import Snap.Core
( Snap, MonadSnap, dir, getParam, ifTop, modifyResponse, pass, redirect'
, ro... | inchingforward/elm-lang.org | src/backend/Router.hs | bsd-3-clause | 6,047 | 0 | 17 | 1,282 | 1,608 | 872 | 736 | 166 | 2 |
-- | All types.
module Stack.Types
(module X)
where
import Stack.Types.BuildPlan as X
import Stack.Types.FlagName as X
import Stack.Types.GhcPkgId as X
import Stack.Types.PackageIdentifier as X
import Stack.Types.PackageName as X
import Stack.Types.Version as X
import Stack.Types.Config as X
import Stack.Types.Do... | mathhun/stack | src/Stack/Types.hs | bsd-3-clause | 455 | 0 | 4 | 63 | 109 | 81 | 28 | 14 | 0 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
-- | Definitions of primitive types, the values that inhabit these
-- types, and operations on these values. A primitive value can also
-- be called a scalar.
--
-- Essentially, this module describes the subset of the (internal... | diku-dk/futhark | src/Futhark/IR/Primitive.hs | isc | 58,943 | 0 | 15 | 14,677 | 18,606 | 9,502 | 9,104 | 1,365 | 37 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ConstraintKinds #-}
-- | Safety condition 3 verification.
module Futhark.Optimise.MemoryBlockMerging.Coalescing.SafetyCondition3
( getVarUsesBetween
) where
import qualified Data.Set as S
import... | ihc/futhark | src/Futhark/Optimise/MemoryBlockMerging/Coalescing/SafetyCondition3.hs | isc | 4,833 | 0 | 21 | 1,325 | 990 | 525 | 465 | 91 | 2 |
module VM.Parser where
import Data.Attoparsec.ByteString.Char8
import Control.Applicative
import Data.Char
import qualified Data.Vector as V
import VM.Core
caseChar c = char (toLower c) <|> char (toUpper c)
caseString s = try (mapM caseChar s) <?> "\"" ++ s ++ "\""
spaceSkip = skipMany $ satisfy (`elem` ['\t', ' '... | TravisWhitaker/VM.hs | src/VM/Parser.hs | mit | 2,841 | 0 | 11 | 909 | 948 | 464 | 484 | 109 | 1 |
module DaySpec where
import Test.Hspec
( Spec
, context
, describe
, hspec
, it
, parallel
, pendingWith
, shouldBe
)
import Day
main :: IO ()
main = hspec spec
spec :: Spec
spec = parallel $ describe "Day" $ do
describe "zellers" $ do
context "Happy Path" $ do
it "returns 0" $ zelle... | erlandsona/cal_haskell | test/DaySpec.hs | mit | 1,437 | 0 | 16 | 414 | 479 | 231 | 248 | 39 | 1 |
z = 7
x = y ^ 2
waxOn = x * 5
y = z + 8
-- waxOn = (z + 8) ^ 2 + ( x * 5 ) | younggi/books | haskellbook/practices/test2.hs | mit | 76 | 3 | 5 | 33 | 43 | 19 | 24 | 4 | 1 |
module MinHS.Pretty where
import MinHS.Syntax
import MinHS.TCMonad
import Text.PrettyPrint.ANSI.Leijen
primop = dullyellow . string
keyword = bold . string
datacon = dullgreen . string
typecon = blue . string
numeric = dullcyan . integer
symbol = magenta . string
err = red . string
instance Pretty Bind where
prett... | pierzchalski/cs3161a2 | MinHS/Pretty.hs | mit | 3,827 | 0 | 13 | 1,138 | 1,497 | 723 | 774 | 82 | 1 |
module SimpleJSON
(
JValue(..)
, getString
, getInt
, getDouble
, getBool
, getObject
, getArray
, isNull
) where
data JValue = JString String
| JNumber Double
| JBool Bool
| JNull
| JObject [(String, JValue)]
| JArray... | timtian090/Playground | Haskell/simpleJSON/src/SimpleJSON.hs | mit | 1,025 | 0 | 8 | 336 | 361 | 191 | 170 | 37 | 1 |
-- ----------------------------------------------------------------------------
{- |
Module : Holumbus.Index.Compression
Copyright : Copyright (C) 2008 Timo B. Huebel
License : MIT
Maintainer : Timo B. Huebel (tbh@holumbus.org)
Stability : experimental
Portability: portable
Version : 0.1
... | ichistmeinname/holumbus | src/Holumbus/Index/Compression.hs | mit | 1,941 | 0 | 5 | 289 | 138 | 89 | 49 | 21 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : TestMailbox
-- Copyright : (c) Phil Hargett 2014
-- License : MIT (see LICENSE file)
--
-- Maintainer : phil@haphazardhouse.net
-- Stability : experimental
-- Portability : non-portable (requires STM)
--
... | hargettp/courier | tests/TestMailbox.hs | mit | 3,725 | 0 | 11 | 803 | 908 | 449 | 459 | 75 | 7 |
module Lambency.Utils (
compareZero,
compareClose,
destructMat4,
clamp,
newRange,
newRangeC,
--
CyclicList(..),
advance,
cyclicLength,
cyclicFromList,
cyclicToList,
cycleSingleton,
cycles
) where
--------------------------------------------------------------------------------
import Control... | Mokosha/Lambency | lib/Lambency/Utils.hs | mit | 2,586 | 0 | 14 | 514 | 1,141 | 603 | 538 | 62 | 3 |
{-# LANGUAGE CPP #-}
module Language.Haskell.GhciWrapperSpec (main, spec) where
import Test.Hspec
import System.IO.Silently
import Control.Exception
import Data.List (isSuffixOf, isInfixOf)
import Language.Haskell.GhciWrapper (Interpreter, Config(..), defaultConfig)
... | sol/doctest | ghci-wrapper/test/Language/Haskell/GhciWrapperSpec.hs | mit | 4,588 | 0 | 23 | 1,041 | 1,110 | 556 | 554 | 79 | 1 |
-- Pointfree
-- ref: https://wiki.haskell.org/Pointfree
-- JN.Oliveira: http://www4.di.uminho.pt/~jno/html/jnopub.html
{-
Thomas Yaeger has written a Lambdabot plugin to automatically convert a large subset of Haskell expressions to pointfree form. This tool has made it easier to use the more abstract pointfree encod... | Airtnp/Freshman_Simple_Haskell_Lib | Idioms/Pointfree.hs | mit | 4,247 | 29 | 11 | 1,129 | 471 | 266 | 205 | -1 | -1 |
module Candidate where
import Data.List (isPrefixOf)
class Candidate a where
name :: a -> String
description :: a -> String
isAvailable :: a -> Bool
lookUpCandidates :: (Candidate a) => String -> [a] -> [String] -> Either [a] a
lookUpCandidates arg cs excludes = lookUpCandidatesAcc arg (selectCandidates ... | yamamotoj/alfred-git-workflow | src/Candidate.hs | mit | 865 | 0 | 14 | 237 | 337 | 172 | 165 | 16 | 2 |
module Day23 where
import Assembunny
-- Final, top-level exports
day23 :: String -> Int
day23 = readRegister 'a' . evaluate . writeRegister 'a' 7 . start . parseInput
day23' :: String -> Int
day23' = readRegister 'a' . evaluate . writeRegister 'a' 12 . start . parseInput
-- Input
run :: IO ()
run = do
putStrLn ... | brianshourd/adventOfCode2016 | src/Day23.hs | mit | 465 | 0 | 10 | 103 | 156 | 77 | 79 | 12 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module MPD.Core.CommandStrSpec (spec) where
import MPD.Core
import Data.Text (Text)
import Test.Hspec
spec :: Spec
spec = do
it "singleton" $ do
render "foo_cmd" == "foo_cmd"
it "scalar" $ do
render ("foo_cmd" .+ (10 :: Int)) == "foo_cmd 10"
it "optional/Just" $ do
... | joachifm/nanompd | test/MPD/Core/CommandStrSpec.hs | mit | 675 | 0 | 15 | 146 | 253 | 124 | 129 | 19 | 1 |
{-# LANGUAGE JavaScriptFFI #-}
{-# LANGUAGE UnicodeSyntax #-}
module JavaScript.Famous.Internal where
import JavaScript.Famous.Types
import GHCJS.DOM.HTMLElement
import GHCJS.Types
foreign import javascript unsafe "console.debug($1)"
jsDebug ∷ JSRef a → IO ()
foreign import ja... | eallik/ghcjs-famous | src/JavaScript/Famous/Internal.hs | mit | 1,403 | 27 | 6 | 238 | 288 | 150 | 138 | 26 | 0 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
-- (c) MP-I, CP, IPM (1998/99-2011/12)
-- |The most used pointfree combinators are defined in this module.
module MMM.Core.FuncComb where
import Control.Monad.Identity(Identity)
infix 5 ><
infix 4 -|-
-- Function exponentiation
(^^^) :: (a ... | VictorCMiraldo/mmm | MMM/Core/FuncComb.hs | mit | 5,098 | 0 | 12 | 1,182 | 2,120 | 1,171 | 949 | 104 | 2 |
{- |
Module : Bio.Motions.Engine
Description : Contains the simulation engine.
License : MIT
Stability : experimental
Portability : unportable
-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE FlexibleContexts #-}
module Bio.Motions.Engine where
import Bio.Motions.Types
import Bio.Motions.Representation.Cla... | amharc/motions-playground | src/Bio/Motions/Engine.hs | mit | 1,399 | 0 | 13 | 282 | 316 | 172 | 144 | 28 | 1 |
module Text.Syntax.Parser.Naive where
import Prelude (String, ($), map, (.), (++), const)
import Text.Syntax.Classes (IsoFunctor ((<$>), (<$$>), (<-$>)), ProductFunctor ((<*>)), Alternative ((<|>), empty), Syntax (pure, token))
import Text.Syntax.IsoM (applyM, fromIso)
import Control.Monad (Monad, return, fail, (>>=... | strelec/IPRM-2014 | src/Text/Syntax/Parser/Naive.hs | mit | 1,432 | 0 | 13 | 427 | 622 | 349 | 273 | 37 | 3 |
{-# OPTIONS_GHC -XFlexibleInstances #-}
--
--
--
------------------
-- Exercise 13.12.
------------------
--
--
--
module E'13'12 where
import E'13'11
(
tt
)
-- instance Show (Bool -> Bool) where
--
-- show _ = "Bool -> Bool"
{- GHCi>
let f :: Bool -> Bool ; f = undefined
f
-}
-- Bool -> Bool
--... | pascal-knodel/haskell-craft | Chapter 13/E'13'12.hs | mit | 906 | 0 | 11 | 248 | 87 | 60 | 27 | 7 | 0 |
import Math.NumberTheory.Primes.Factorisation
main = print . maximum . map fst . factorise $ 600851475143
| chrisfosterelli/euler.hs | solutions/003.hs | mit | 106 | 0 | 8 | 14 | 32 | 17 | 15 | 2 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main (main) where
import Ch02KNN.Classify0
import Control.Monad
import qualified Data.List as L
import Data.List.Split
import qualified Data.Map as M
import Data.Maybe
import qualified Data.Vector as V... | rcook/mlutil | ch02-knn/src/Main.hs | mit | 4,474 | 0 | 21 | 1,118 | 1,211 | 623 | 588 | 100 | 2 |
{-|
Module : Data.Niagra.Builder.Buffer
Description : 'Buffer' data structure for 'Builder'.
Copyright : (c) Nathaniel Symer, 2015
License : MIT
Maintainer : nate@symer.io
Stability : stable
Portability : POSIX
Provides a data structure for storing bytes
from 'Char's and strict 'Text's. Can easily be
fro... | fhsjaagshs/niagra | src/Data/Niagra/Builder/Buffer.hs | mit | 4,157 | 0 | 13 | 1,120 | 1,072 | 571 | 501 | 82 | 3 |
--pattern guards
f4 x
| x < 0 = 0
| x > 0 = 1
| otherwise = 2
| rdnetto/H2V | H2V/tests/guards.hs | gpl-2.0 | 83 | 0 | 8 | 41 | 42 | 19 | 23 | 4 | 1 |
{-# LANGUAGE GADTs #-}
module Tombot.Parser.Bot where
-- {{{ Imports
import Control.Applicative
import qualified Data.Attoparsec.Text as Atto
import Data.Char
import Data.Text (Text)
import qualified Data.Text as Text
import qualified Data.Vector as Vec
import Debug.Trace
-- }}}
-- {{{ Data
data Syntax where
... | Shou/Tombot | Tombot/Parser/Bot.hs | gpl-2.0 | 1,755 | 0 | 10 | 376 | 517 | 266 | 251 | -1 | -1 |
module Control.Gruppe.DB where
-- $Id$
import Control.SQL
import Control.Types
import Control.Gruppe.Typ
import Prelude hiding ( all )
qq = Select
$ map reed [ "gruppe.GNr as GNr"
, "gruppe.VNr as VNr"
, "gruppe.Name as Name"
, "gruppe.MaxStudents as MaxStudents"
, "gruppe.Referent as Referent"
... | marcellussiegburg/autotool | db/src/Control/Gruppe/DB.hs | gpl-2.0 | 3,700 | 36 | 16 | 1,115 | 1,240 | 619 | 621 | 106 | 2 |
{-# LANGUAGE OverloadedStrings, CPP, ViewPatterns, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-deprecations #-}
{-
Copyright (C) 2006-2015 John MacFarlane <jgm@berkeley.edu>
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
t... | poxu/pandoc | src/Text/Pandoc/Writers/HTML.hs | gpl-2.0 | 42,653 | 0 | 29 | 17,005 | 10,931 | 5,517 | 5,414 | 759 | 55 |
module Handler.ResultatePflicht where
import Import
import Handler.Studenten (Aufgaben(PflichtAufgaben), studentenListe)
getResultatePflichtR :: VorlesungId -> Handler Html
getResultatePflichtR = studentenListe PflichtAufgaben
| marcellussiegburg/autotool | yesod/Handler/ResultatePflicht.hs | gpl-2.0 | 230 | 0 | 6 | 22 | 46 | 27 | 19 | 5 | 1 |
module Language.Java.Jdi.VirtualMachine
( VirtualMachine
, runVirtualMachine
, name
, description
, version
, allClasses
, allThreads
, canAddMethod
, canBeModified
, canGetBytecodes
, canGetCurrentContendedMonitor
, canGetMonitorInfo
, canGetOwnedMonitorInfo
, canGetSourceDebugExtension
, canGetSynteticAttribute
, can... | VictorDenisov/jdi | src/Language/Java/Jdi/VirtualMachine.hs | gpl-2.0 | 1,563 | 0 | 7 | 213 | 246 | 151 | 95 | 38 | 1 |
--------------------------------------------------------------------------------
-- This file is part of diplomarbeit ("Diplomarbeit Johannes Weiß"). --
-- --
-- diplomarbeit is free software: you can redistribute it and/or modify ... | weissi/diplomarbeit | lib/Functionality/SetupPhase.hs | gpl-3.0 | 4,880 | 0 | 10 | 1,241 | 720 | 407 | 313 | 56 | 1 |
main = mapM_ putStrLn
[ "\t\t\t<i y=\"" ++ show y ++ "\" x=\"" ++ show x ++
"\" r=\"0\" z=\"0.0\" o=\"snow02\" stackpos=\"0\"></i>"
| y <- [-60..(60 :: Double)]
, x <- [-60..(60 :: Double)]
]
| skangas/zombieswtf | maps/MakeSnow.hs | gpl-3.0 | 238 | 0 | 11 | 81 | 78 | 41 | 37 | 5 | 1 |
{-# LANGUAGE UnicodeSyntax #-}
{-# LANGUAGE OverloadedStrings #-}
module Game.Osu.OszLoader.OsuParser.Colours where
import Control.Applicative
import Data.Attoparsec.Text
import Data.Map
import Game.Osu.OszLoader.Types
import Game.Osu.OszLoader.OsuParser.Utils
coloursSection ∷ Parser Colours
coloursSection = do
_ ←... | Fuuzetsu/osz-loader | src/Game/Osu/OszLoader/OsuParser/Colours.hs | gpl-3.0 | 796 | 0 | 11 | 163 | 240 | 135 | 105 | 22 | 1 |
module Database.Tansu.Backend.BerkeleyDb
(withBerkeleyDb) where
import Control.Exception (catch)
import Database.Berkeley.Db
import Data.ByteString (ByteString)
import System.Directory (createDirectoryIfMissing)
import Database.Tansu.Internal
catchIO :: IO a -> IO (Either TansuError a)
catchIO mote = fmap r... | aisamanra/tansu-berkeleydb | Database/Tansu/Backend/BerkeleyDb.hs | gpl-3.0 | 1,732 | 0 | 14 | 441 | 568 | 284 | 284 | 38 | 3 |
-- build with -threaded or forkIO does nothing
-- TODO: Optionally allow custom remote username for a server
-- TODO: Allow different key algorithms and/or custom key locations
-- BUG: Probably upstream - segfault when cwd not included in relative path UPDATE: Yeah this is libssh2 being difficult
-- Timeouts now work e... | madgodofmagic/fregging-janitor | MultiSSH.hs | gpl-3.0 | 4,887 | 0 | 18 | 1,075 | 1,267 | 643 | 624 | 79 | 4 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-discovery/gen/Network/Google/Resource/Discovery/APIs/GetRest.hs | mpl-2.0 | 2,908 | 0 | 14 | 721 | 380 | 228 | 152 | 60 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Bind.hs | mpl-2.0 | 7,224 | 0 | 17 | 1,578 | 673 | 409 | 264 | 95 | 1 |
module Machine where
import ST
newtype Machine input output = Machine(input -> output)
type Stage = Maybe Char
type Input = Maybe Char
type Transition = Stage -> Input -> Stage
type Transition2 = (Stage,Input,Stage)
data DFA = DFA [Stage] [Input] [Transition] Stage [Stage]
toTransition :: Char -> Char -> Char -... | cwlmyjm/haskell | Learning/Machine.hs | mpl-2.0 | 901 | 0 | 16 | 488 | 207 | 117 | 90 | 19 | 5 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
-- Module : Khan.CLI.Certificate
-- Copyright : (c) 2013 Brendan Hay <brendan.g.hay@gmail.com>
-- License : This Source Code Form is subject to the terms of
-- the Mozilla Public License, v... | brendanhay/khan | khan-cli/Khan/CLI/Certificate.hs | mpl-2.0 | 3,193 | 0 | 11 | 783 | 653 | 339 | 314 | 80 | 1 |
module Handler.PasteNewSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
describe "getPasteNewR" $ do
error "Spec not implemented: getPasteNewR"
describe "postPasteNewR" $ do
error "Spec not implemented: postPasteNewR"
| learnyou/lypaste | test/Handler/PasteNewSpec.hs | agpl-3.0 | 268 | 0 | 11 | 62 | 60 | 29 | 31 | 8 | 1 |
module IntegerTriangles.A338201Spec (main, spec) where
import Test.Hspec
import IntegerTriangles.A338201 (a338201)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A338201" $
it "correctly computes the first 10 elements" $
take 10 (map a338201 [1..]) `shouldBe` expectedValue where
expectedVal... | peterokagey/haskellOEIS | test/IntegerTriangles/A338201Spec.hs | apache-2.0 | 347 | 0 | 10 | 59 | 130 | 75 | 55 | 10 | 1 |
module HelperSequences.A272036 (a272036, a272036_list) where
import HelperSequences.A116416 (a116416)
import HelperSequences.A116417 (a116417)
a272036 :: Int -> Integer
a272036 = (a272036_list !!)
a272036_list :: [Integer]
a272036_list = filter (\n -> a116416 n == a116417 n) [0..]
| peterokagey/haskellOEIS | src/HelperSequences/A272036.hs | apache-2.0 | 284 | 0 | 9 | 36 | 91 | 53 | 38 | 7 | 1 |
-- Copyright (c) 2013-2014 PivotCloud, Inc.
--
-- Aws.Lambda.Commands.ListEventSources
--
-- Please feel free to contact us at licensing@pivotmail.com with any
-- contributions, additions, or other feedback; we would love to hear from
-- you.
--
-- Licensed under the Apache License, Version 2.0 (the "License"); you may... | alephcloud/hs-aws-lambda | src/Aws/Lambda/Commands/ListEventSources.hs | apache-2.0 | 4,103 | 0 | 14 | 713 | 544 | 322 | 222 | 78 | 1 |
-----------------------------------------------------------------------------
-- Copyright 2012 Microsoft Corporation.
--
-- This is free software; you can redistribute it and/or modify it under the
-- terms of the Apache License, Version 2.0. A copy of the License can be
-- found in the file "license.txt" at the root ... | lpeterse/koka | src/Type/Unify.hs | apache-2.0 | 17,877 | 0 | 22 | 5,839 | 5,030 | 2,523 | 2,507 | 323 | 7 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
module Api where
import Data.Proxy
import Data.Text
import Database.Persist
import Models
import Servant
type API = "users" :> Get '[JSON] [Us... | prt2121/haskell-practice | try-servant/src/Api.hs | apache-2.0 | 420 | 0 | 11 | 89 | 104 | 60 | 44 | 15 | 1 |
import Test.Hspec
import Test.QuickCheck
import Control.Exception (evaluate)
import Control.Monad
import Control.GroupWith
import Data.Map (Map)
import Data.Maybe (fromJust)
import Data.List (sort)
import qualified Data.Map as Map
multimapElemEq :: (Eq k, Ord v) => (k,[v]) -> (k,[v]) -> Bool
multimapElemEq (k1,v1) (k2... | ulikoehler/group-with | GroupWithTest.hs | apache-2.0 | 6,123 | 0 | 19 | 1,968 | 1,759 | 973 | 786 | 106 | 1 |
myLast :: [t] -> t
myLast [] = error "Empty list has no last element"
myLast [x] = x
myLast (_:xs) = myLast xs | alephnil/h99 | 01.hs | apache-2.0 | 110 | 0 | 7 | 23 | 55 | 28 | 27 | 4 | 1 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RecordWildCards, PatternGuards, BangPatterns #-}
-----------------------------------------------------------------------------
--
-- Module : AI.Network.RNN.RNN
-- Copyright : (c) JP Moresmau
... | JPMoresmau/rnn | src/AI/Network/RNN/RNN.hs | bsd-2-clause | 6,955 | 0 | 16 | 1,690 | 1,807 | 960 | 847 | 155 | 2 |
module Test.Kibr.Xml where
import Test.Framework (Test)
import Test.Framework.Providers.HUnit (testCase)
import Test.Framework.TH (testGroupGenerator)
import Test.HUnit (Assertion)
import Test.HUnit.Diff ((@?==))
import Test.Kibr.Fixture
import Text.Kibr.... | dag/kibr | src/Test/Kibr/Xml.hs | bsd-2-clause | 544 | 0 | 8 | 136 | 118 | 71 | 47 | -1 | -1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE FlexibleContexts #-}
module Embed where
import Syntax
import qualified Data.Map.Strict as Map
import Data.Maybe (isJust)
import Data.List (subsequences, find)
-... | kajigor/uKanren_transformations | src/Embed.hs | bsd-3-clause | 4,758 | 0 | 17 | 1,243 | 2,104 | 1,057 | 1,047 | 103 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
module Lib.Text (
showT
, safeDecode
, (+@)
, removeTrailingNewLine
, leadingZeros
, lineSplit
, lineSplitAfter
, textToAText
, subAText
) where
----------------------------------------------------------------... | da-x/fancydiff | src/Lib/Text.hs | bsd-3-clause | 2,283 | 0 | 15 | 659 | 730 | 406 | 324 | 52 | 3 |
{-# LANGUAGE UndecidableSuperClasses #-}
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE TypeFamilyDependencies #-}
{-# LANGUAGE TypeApplications #-}
module Functor
where
import qualified Prelude as P
import Lattice
import LocalPrelude
import Topology2
import qualified Data.ByteString.L... | mikeizbicki/homoiconic | old/Functor.hs | bsd-3-clause | 4,690 | 0 | 11 | 1,164 | 876 | 520 | 356 | -1 | -1 |
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE FlexibleInstances #-}
----------------------------------------------------------------------------
-- |
-- Module : Language.Core.Util
-- Copyright : (c) Carlos López-Camey, University of Freiburg
-- License : BSD-3
--
-- ... | kmels/dart-haskell | src/Language/Core/Util.hs | bsd-3-clause | 8,584 | 0 | 15 | 2,012 | 2,288 | 1,171 | 1,117 | 119 | 4 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE Rank2Types #-}
--------------------------------------------------------------------------------
-- |
-- Module : FRP.Yampa.Random
-- Copyright : (c) Antony Courtney and Henrik Nilsson, Yale University, 2003
-- License : BSD-style (see th... | ivanperez-keera/Yampa | yampa/src/FRP/Yampa/Random.hs | bsd-3-clause | 4,307 | 0 | 18 | 1,121 | 591 | 344 | 247 | 33 | 3 |
{-# OPTIONS_GHC -fno-warn-tabs #-}
import Common
import Hex
import Xor
import Data.Function
main = do
putStrLn "=== Challange2 ==="
putStrLn $ hexEncode $ (xorBytes `on` hexDecode)
"1c0111001f010100061a024b53535009181c" "686974207468652062756c6c277320657965"
| andrewcchen/matasano-cryptopals-solutions | set1/Challange2.hs | bsd-3-clause | 266 | 2 | 10 | 35 | 54 | 29 | 25 | 9 | 1 |
{-# LANGUAGE QuasiQuotes, OverloadedStrings, UnicodeSyntax #-}
{-# OPTIONS_GHC -F -pgmF frquotes #-}
{-# OPTIONS -Wall -fno-warn-missing-signatures -fno-warn-unused-imports #-}
-- The writer monad is used to get the "do" notation
-- for writing environments like slides or itemizes.
import Control.Monad.Writer
import ... | np/hlatex | templates/beamer-one-file/slides.hs | bsd-3-clause | 3,518 | 94 | 19 | 737 | 1,083 | 566 | 517 | -1 | -1 |
{-|
Module : Idris.IBC
Description : Core representations and code to generate IBC files.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module Idris.IBC (loadIBC, loadPkgIndex,
writeIBC,... | ben-schulz/Idris-dev | src/Idris/IBC.hs | bsd-3-clause | 101,581 | 0 | 21 | 56,145 | 27,793 | 12,774 | 15,019 | 2,429 | 17 |
-- File created: 2009-07-21 22:13:29
module Haschoo.Evaluator.Standard.PairsLists (procedures, scmAppend) where
import Control.Applicative ((<$>))
import Control.Arrow ((&&&))
import Control.Monad (join, replicateM, (>=>))
import Control.Monad.Loops (dropWhileM, firstM)
import Data.Foldable (foldrM)... | Deewiant/haschoo | Haschoo/Evaluator/Standard/PairsLists.hs | bsd-3-clause | 10,972 | 2 | 21 | 3,595 | 4,187 | 2,125 | 2,062 | 238 | 10 |
{-# OPTIONS -fno-warn-orphans #-}
module UReader.Rendering.Feed.Atom where
import Data.List as L
import Text.PrettyPrint.ANSI.Leijen hiding ((<$>), (<>))
import Text.Atom.Feed
import UReader.Rendering.HTML
import UReader.Rendering.XHTML
instance Pretty TextContent where
pretty (TextString s) = text s
pretty (H... | pxqr/ureader | src/UReader/Rendering/Feed/Atom.hs | bsd-3-clause | 2,080 | 1 | 15 | 550 | 648 | 320 | 328 | -1 | -1 |
module Data.GraphQL.AST where
import Data.Int (Int32)
import Data.Text (Text, pack)
import Data.String
-- * Name
type Name = Text
-- * Document
newtype Document = Document [Definition] deriving (Eq,Show)
data Definition = DefinitionOperation OperationDefinition
| DefinitionFragment FragmentDefini... | timmytofu/graphql-haskell | Data/GraphQL/AST.hs | bsd-3-clause | 4,666 | 0 | 8 | 1,399 | 983 | 565 | 418 | 94 | 0 |
{-# LANGUAGE TemplateHaskell, FlexibleContexts, PolyKinds #-}
-- |
-- Module : Data.Binding.Hobbits.QQ
-- Copyright : (c) 2011 Edwin Westbrook, Nicolas Frisby, and Paul Brauner
--
-- License : BSD3
--
-- Maintainer : emw4@rice.edu
-- Stability : experimental
-- Portability : GHC
--
-- Defines a quasi-quo... | eddywestbrook/hobbits | src/Data/Binding/Hobbits/QQ.hs | bsd-3-clause | 7,408 | 0 | 14 | 1,484 | 1,672 | 932 | 740 | 86 | 5 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Test.Examples.ZControlSpec
( spec
) where
import Test.Hspec (Spec, describe)
import Test.QuickCheck (Property, counterexample)
import Universum
import Test.Arbitrary ()
import Test... | Martoon-00/toy-compiler | test/Test/Examples/ZControlSpec.hs | bsd-3-clause | 1,711 | 0 | 14 | 508 | 413 | 233 | 180 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
module Network.HTTP2.Arch.Queue where
import Control.Concurrent (forkIO)
import Control.Concurrent.STM
import Control.Exception (bracket)
import Imports
import Network.HTTP2.Arch.Manager
import Network.HTTP2.Arch.Types
{-# INLINE forkAndEnqueueWhenReady #-}
forkAndEnqueueWhenReady :... | kazu-yamamoto/http2 | Network/HTTP2/Arch/Queue.hs | bsd-3-clause | 962 | 0 | 10 | 156 | 256 | 133 | 123 | 22 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE RebindableSyntax #-}
module HLearn.History.DisplayMethods
where
-- import Control.Monad.Identity
import Control.Monad.Random
import Control.Monad.State.Strict (get,put,runStateT)
-- import Control.Monad.Trans
import Data.Dynamic
import Data.List hiding (concat,elem,maximum,m... | ehlemur/HLearn | src/HLearn/History/DisplayMethods.hs | bsd-3-clause | 29,243 | 173 | 46 | 9,486 | 7,547 | 3,858 | 3,689 | -1 | -1 |
-- http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_1_A
-- Hello World
-- No input
main = putStrLn "Hello World"
| ku00/aoj-haskell | src/ITP1_1_A.hs | bsd-3-clause | 128 | 0 | 5 | 15 | 12 | 7 | 5 | 1 | 1 |
module Main where
import Control.Eff
import Control.Eff.Lift (runLift)
import Control.Eff.Random
import qualified Control.Monad.Random as R
main :: IO ()
main = do
print $ take 100 $ run $ evalRand (mkStdGen 12121) $ getRandomRs (10, 100 :: Int)
print $ take 100 $ R.evalRand (R.ge... | konn/random-eff | examples/random.hs | bsd-3-clause | 365 | 0 | 11 | 90 | 137 | 75 | 62 | 9 | 1 |
module Data.VPTree.MetricSpace
(
MetricSpace(..)
) where
class MetricSpace a where
distance :: a -> a -> Double
instance MetricSpace Int where
distance a b = fromIntegral $ abs (a - b)
| tixxit/hillside | src/Data/VPTree/MetricSpace.hs | bsd-3-clause | 209 | 0 | 9 | 55 | 70 | 38 | 32 | 7 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ViewPatterns #-}
-- | Main stack tool entry point.
module Main where
import Control.Exception
import ... | kairuku/stack | src/main/Main.hs | bsd-3-clause | 41,096 | 0 | 30 | 15,083 | 8,307 | 4,213 | 4,094 | -1 | -1 |
{-|
Functionality to export different parts of the orgmode data structure tree.
All parts have functions to export them separately.
-}
module Database.OrgMode.Export.Text where
import Database.OrgMode.Export.OrgParse (exportDocument)
import Database.OrgMode.Internal.Convert.OrgParse (toText)
impor... | rzetterberg/orgmode-sql | lib/Database/OrgMode/Export/Text.hs | bsd-3-clause | 800 | 0 | 9 | 153 | 112 | 69 | 43 | 10 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies, GADTs, DataKinds #-}
module Pact.Types.Scheme
( PPKScheme(..)
, defPPKScheme
, SPPKScheme(..)
) where
import GHC.Generics
import Control.DeepSeq
import Data.Serialize
import Data.A... | kadena-io/pact | src/Pact/Types/Scheme.hs | bsd-3-clause | 1,198 | 0 | 10 | 218 | 286 | 157 | 129 | 37 | 1 |
module Mud.ShowHistory
( showHistoryCommand
) where
import Control.Monad
import Data.Time
import Mud.Common
import Mud.History
import Mud.Printer
showHistoryCommand :: String -> Mud ()
showHistoryCommand projectName = do
configs <- parseConfigFiles projectName
paths <- workingBasePaths configs
forM_ pat... | thoferon/mud | src/Mud/ShowHistory.hs | bsd-3-clause | 1,179 | 0 | 15 | 298 | 377 | 189 | 188 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE Strict #-}
-- | Definition of a polymorphic (generic) pass that can work with
-- programs of any rep.
module Futhark.Pass
( PassM,
runPassM,
liftEither,
liftEitherM,
Pass (..),
passLongOption,
parPass,
... | diku-dk/futhark | src/Futhark/Pass.hs | isc | 4,126 | 0 | 17 | 832 | 947 | 504 | 443 | 79 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.