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 Crypto.Cipher.Benchmarks
import Crypto.Cipher.AES (AES128, AES192, AES256)
main = defaultMain
[GBlockCipher (undefined :: AES128)
,GBlockCipher (undefined :: AES192)
,GBlockCipher (undefined :: AES256)]
| moonKimura/cipher-aes-0.2.6 | Benchmarks/Benchmarks.hs | bsd-3-clause | 223 | 0 | 8 | 35 | 68 | 40 | 28 | 6 | 1 |
import Control.Monad
memorized_func :: Int -> Integer
memorized_func = (map func [0..] !!)
where
func 0 = 1
func i = (sum [memorized_func x * memorized_func(i - x - 1) | x <-[0..i - 1]]) `mod` 100000007
main = do
n <- getLine
num <- replicateM (read n) ... | EdisonAlgorithms/HackerRank | practice/fp/dp/number-of-binary-search-tree/number-of-binary-search-tree.hs | mit | 406 | 0 | 15 | 136 | 174 | 89 | 85 | 9 | 2 |
{-# LANGUAGE QuasiQuotes #-}
module Vimus.Command.HelpSpec (main, spec) where
import Test.Hspec
import Test.QuickCheck
import Data.String
import Vimus.Command.Help
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "help" $ do
it "strips leading space" $ d... | vimus/vimus | test/Vimus/Command/HelpSpec.hs | mit | 2,964 | 0 | 23 | 815 | 431 | 236 | 195 | 50 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[TcMonoType]{Typechecking user-specified @MonoTypes@}
-}
module ETA.TypeCheck.TcHsType (
tcHsSigType, tcHsSigTypeNC, tcHsDeriv, tcHsVectInst,
tcHsInstHead,
UserTypeCtxt(..),
... | alexander-at-github/eta | compiler/ETA/TypeCheck/TcHsType.hs | bsd-3-clause | 68,945 | 106 | 26 | 20,332 | 12,110 | 6,222 | 5,888 | 793 | 8 |
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses #-}
-- | Free theorems plugin,
-- Don Stewart 2006
module Plugin.FT where
import Plugin
import Plugin.Type (query_ghci)
$(plugin "FT")
instance Module FTModule () where
moduleCmds _ = ["ft"]
moduleHelp _ _ = "ft <ident>. Generate theorems for free"
pr... | zeekay/lambdabot | Plugin/FT.hs | mit | 729 | 0 | 12 | 168 | 231 | 118 | 113 | 18 | 1 |
module Lets.Profunctor (
Profunctor(dimap)
) where
import Lets.Data
-- | A profunctor is a binary functor, with the first argument in contravariant
-- (negative) position and the second argument in covariant (positive) position.
class Profunctor p where
dimap ::
(b -> a)
-> (c -> d)
-> p a c
-> p ... | bitemyapp/lets-lens | src/Lets/Profunctor.hs | bsd-3-clause | 462 | 0 | 10 | 114 | 141 | 75 | 66 | 16 | 0 |
-- This module is always included behind the scenes when compiling.
-- It will not bring any code into the system, but brings several
-- names and type definitions into scope that the compiler expects
-- to exist.
module Jhc.Prim.Prim where
import Jhc.Prim.Bits()
import Jhc.Prim.IO()
import Jhc.Prim.List()
data (->)... | hvr/jhc | lib/jhc-prim/Jhc/Prim/Prim.hs | mit | 823 | 7 | 13 | 218 | 475 | 284 | 191 | -1 | -1 |
{-# LANGUAGE BangPatterns, GADTs, OverloadedStrings, RecordWildCards #-}
-- |
-- Module : Data.Attoparsec.ByteString.Internal
-- Copyright : Bryan O'Sullivan 2007-2014
-- License : BSD3
--
-- Maintainer : bos@serpentine.com
-- Stability : experimental
-- Portability : unknown
--
-- Simple, efficient... | DavidAlphaFox/ghc | utils/haddock/haddock-library/vendor/attoparsec-0.12.1.1/Data/Attoparsec/ByteString/Internal.hs | bsd-3-clause | 15,757 | 0 | 27 | 3,763 | 3,753 | 2,005 | 1,748 | 288 | 3 |
import Test.Cabal.Prelude
-- Test building an executable whose main() function is defined in a C
-- file
main = setupAndCabalTest $ setup_build []
| mydaum/cabal | cabal-testsuite/PackageTests/CMain/setup.test.hs | bsd-3-clause | 147 | 0 | 7 | 23 | 23 | 13 | 10 | 2 | 1 |
module ControlledVisit where
import Control.Monad (filterM)
import System.Directory (Permissions(..), getModificationTime, getPermissions, getDirectoryContents)
import System.Time (ClockTime(..))
import System.FilePath (takeExtension)
import Control.OldException (bracket, handle)
import System.IO (IOMode(..), hClose, ... | pauldoo/scratch | RealWorldHaskell/ch09/ControlledVisit.hs | isc | 1,547 | 0 | 14 | 297 | 563 | 300 | 263 | 37 | 2 |
{-# LANGUAGE ExistentialQuantification #-}
-- {-# LANGUAGE GADTs #-}
-- data C a => T a = Cons a
-- requires DatatypeContext
-- "The designers of Haskell 98 do now think, that it was a bad decision to allow constraints on constructors. GHC as of version 7.2 disallows them by default (turn back on with -XDatatypeCo... | NickAger/LearningHaskell | HaskellProgrammingFromFirstPrinciples/Chapter30/ExistentialTypes.hsproj/Main.hs | mit | 446 | 1 | 4 | 76 | 28 | 18 | 10 | -1 | -1 |
{-# LANGUAGE CPP #-}
module BCM.Visualize.Internal.Types where
#if !MIN_VERSION_base(4,8,0)
import Foreign.ForeignPtr.Safe( ForeignPtr, castForeignPtr )
#else
import Foreign.ForeignPtr( ForeignPtr, castForeignPtr )
#endif
import Control.Monad (when)
import Data.Serialize
import Data.Bits( xor, (.&.), unsafeShiftR )
i... | kaizhang/BCMtools | src/BCM/Visualize/Internal/Types.hs | mit | 6,793 | 0 | 16 | 1,901 | 1,402 | 752 | 650 | 157 | 1 |
module CFDI.Types.PaymentChain where
import CFDI.Chainable
import CFDI.Types.Type
import Data.Text (Text, pack, unpack)
import Text.Regex (mkRegex)
import Text.Regex.Posix (matchTest)
newtype PaymentChain = PaymentChain Text deriving (Eq, Show)
instance Chainable PaymentChain where
chain (PaymentChain... | yusent/cfdis | src/CFDI/Types/PaymentChain.hs | mit | 581 | 0 | 9 | 112 | 177 | 94 | 83 | 15 | 0 |
module Hpcb.Component.Switch (
tact_switch
) where
import Hpcb.Data.Action
import Hpcb.Data.Base
import Hpcb.Data.Circuit
import Hpcb.Data.Effects
import Hpcb.Data.Layer
import Hpcb.Data.FpElement
import Hpcb.Functions
import Data.Monoid
-- | Generic tactile switch
tact_switch :: String -- ^ Reference
... | iemxblog/hpcb | src/Hpcb/Component/Switch.hs | mit | 1,330 | 0 | 25 | 274 | 651 | 336 | 315 | 29 | 1 |
{-# LANGUAGE RecordWildCards #-}
module TestSuite.Counter
( byteCounterArithmetic
, throughputThresholds
, activationCounterPropagation
, byteCounterPropagation
, patternTimeCounterPropagation
, sleepTimeCounterPropagation
, latencyTimeCounterPropagation
, convert... | kosmoskatten/synthetic-web | test/TestSuite/Counter.hs | mit | 5,830 | 0 | 19 | 1,359 | 1,579 | 800 | 779 | 107 | 4 |
-- Based on http://decipheringmusictheory.com/?page_id=46
module Other.Counterpoint where
import Mezzo
v1 = d qn :|: g qn :|: fs qn :|: g en :|: a en :|: bf qn :|: a qn :|: g hn
v2 = d qn :|: ef qn :|: d qn :|: bf_ en :|: a_ en :|: g_ qn :|: fs_ qn :|: g_ hn
sco = score setKeySig g_min
setRuleSet stri... | DimaSamoz/mezzo | examples/src/Other/Counterpoint.hs | mit | 482 | 0 | 12 | 146 | 161 | 76 | 85 | 10 | 1 |
{%-
set imported_module_names =
(["API", "Types"] | map("child_module_name") | list) +
["Data.Time.Calendar", "Servant"]
-%}
{{hs_copyright}}
module {{module_name}}App.App (app) where
{% for m in imported_module_names | sort -%}
import {{m}}
{% endfor %}
isaac :: User
isaac = User "Isaac ... | rcook/ptool-templates | elm-haskell/app_App.hs | mit | 893 | 29 | 9 | 169 | 274 | 154 | 120 | -1 | -1 |
module TypeKwonDo where
f :: Int -> String
f = undefined
g :: String -> Char
g = undefined
h :: Int -> Char
h i = g(f(i))
data A
data B
data C
q :: A -> B
q = undefined
w :: B -> C
w = undefined
m :: A -> C
m a = w(q(a))
munge :: (x -> y) -> (y -> (w, z)) -> x -> w
munge f f1 v = fst $ f1 $ f v
| raventid/coursera_learning | haskell/chpater5/type_kwon_do.hs | mit | 306 | 0 | 9 | 94 | 187 | 103 | 84 | -1 | -1 |
module BinaryTree where
data BinaryTree a =
Leaf
| Node (BinaryTree a) a (BinaryTree a)
deriving (Eq, Ord, Show)
unfold :: (a -> Maybe (a,b,a)) -> a -> BinaryTree b
unfold f b = case f b of
Just (a,b,c) -> Node (unfold f a) b (unfold f c)
Nothing -> Leaf
-- TODO: it would be very nice to add funny pretty p... | raventid/coursera_learning | haskell/chapter12/binary_tree.hs | mit | 710 | 0 | 11 | 232 | 216 | 120 | 96 | 11 | 2 |
module Document.Tests.UnlessExcept where
-- Modules
import Document.Tests.Suite
import Test.UnitTest
test_case :: TestCase
test_case = test
test :: TestCase
test = test_cases
"Unless / except clause"
[ (poCase "test 0, unless/except without indices"
(verify path0 0) resu... | literate-unitb/literate-unitb | src/Document/Tests/UnlessExcept.hs | mit | 1,003 | 0 | 10 | 290 | 165 | 99 | 66 | -1 | -1 |
{-# LANGUAGE FlexibleInstances #-}
module Pyrec.TypeCheckSpec where
import Prelude hiding (map, mapM)
import Control.Applicative
import Control.Monad hiding (mapM, forM)
import Control.Monad.Writer hiding (mapM, forM, sequence)
import ... | kmicklas/pyrec | src/Pyrec/TypeCheckSpec.hs | mit | 4,392 | 0 | 16 | 1,390 | 1,239 | 690 | 549 | -1 | -1 |
module Main where
import Game
import World
import Rooms
import Actions
import Direction
import Movement
import Player
import Item.Item
import Control.Monad.Writer
import Control.Monad.State
import Data.Map
gameWorld = World
(createRooms [
RoomInfo R1 (RoomName "Kitchen") (RoomDesc "It is a small room with whi... | disquieting-silence/adventure | src/Main.hs | mit | 2,171 | 26 | 16 | 465 | 773 | 434 | 339 | 54 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE DeriveGeneric #-}
module Vong where
import Control.Monad (foldM)
import Data.Csv (FromRecord)
import Data.List (isPrefixOf)
import GHC.Generics (Generic)
import System.Random (randomRIO)
type Probability = Float
data Replacement = Replacement
{ search :: String
,... | kmein/1generator | src/Vong.hs | mit | 1,082 | 0 | 14 | 257 | 326 | 179 | 147 | 30 | 3 |
{-# LANGUAGE FlexibleContexts #-}
module TwelfInterface where
import Control.Monad
import Control.Monad.Catch
import Control.Monad.Except
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Data.Typeable
import qualified Data.Map as M
import Syste... | ulrikrasmussen/BoxProver | src/TwelfInterface.hs | mit | 4,782 | 0 | 16 | 1,179 | 1,420 | 735 | 685 | 97 | 3 |
module Main where
import Haste
main = withElem "message"
$ \el -> do
hash <- getHash
let msg = if null hash then "hello"
else hash
setProp el "value" msg
onHashChange
$ \_ msg ->
setProp el "value" msg
| laser/haste-experiment | demos/routing/routing.hs | mit | 251 | 0 | 13 | 88 | 82 | 41 | 41 | 11 | 2 |
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
-- | Internals related to reading and writing an injected executable
-- hash.
module System.Executable.Hash.Internal where
import Control.Exception (SomeException, handle)
import "cryptohash" Crypto.Hash.SHA1... | fpco/executable-hash | System/Executable/Hash/Internal.hs | mit | 2,440 | 0 | 15 | 566 | 321 | 179 | 142 | 38 | 2 |
module Stratosphere.Helpers
( maybeField
, prefixNamer
, prefixFieldRules
, modTemplateJSONField
, NamedItem (..)
, namedItemToJSON
) where
import Control.Lens (set)
import Control.Lens.TH
import Data.Aeson
import Data.Char (isUpper, toLower)
import Data.List (stripPref... | frontrowed/stratosphere | library/Stratosphere/Helpers.hs | mit | 2,039 | 0 | 12 | 420 | 471 | 254 | 217 | 37 | 2 |
-- In diesem Modul werden eine Reihe von \begriff{worker}-Funktionen definiert die alle einen übergebenen Wert verändern und die geänderte
-- Variante zurückliefern.
module System.ArrowVHDL.Circuit.Workers
where
-- Zur Funktionsdefinition werden Funktionen aus folgenden Modulen benötigt.
import Data.List (nub, (\\)... | frosch03/arrowVHDL | src/System/ArrowVHDL/Circuit/Workers.hs | cc0-1.0 | 8,120 | 2 | 17 | 1,518 | 1,341 | 748 | 593 | 67 | 2 |
testFn x
| x == 0 = 0
| x <= 100 = x + (testFn (x-1))
| otherwise = error "too large"
repeatString str n =
if n == 0
then ""
else str ++ (repeatString str (n-1))
removeOdd [] = []
removeOdd (x : xs)
| mod x 2 == 0 = x : (removeOdd xs)
| otherwise = removeOdd xs
numEven n... | cbellone/haskell-playground | src/test.hs | gpl-3.0 | 802 | 2 | 10 | 239 | 427 | 214 | 213 | 28 | 2 |
module HobTest.Control (
runCtxActions
) where
import Hob.Context
import Hob.Control (flushEvents)
runCtxActions :: Context -> App() -> IO()
runCtxActions ctx actions = do
deferredRunner ctx actions
flushEvents
| svalaskevicius/hob | test/HobTest/Control.hs | gpl-3.0 | 225 | 0 | 8 | 41 | 70 | 36 | 34 | 8 | 1 |
-- mark each node of a binary tree with
-- (x,y) coordinates
-- x -> inorder place
-- y -> depth
data Tree a = Empty | Branch a (Tree a) (Tree a) deriving Show
countN Empty = 0
countN (Branch _ l r) = 1 + countN l + countN r
p65 :: Tree a -> Tree (a,(Int,Int))
p65 t = p65' t 1 where
p65' Empty _ = Empty
... | yalpul/CENG242 | H99/61-69/p64.hs | gpl-3.0 | 487 | 0 | 11 | 189 | 205 | 108 | 97 | 9 | 2 |
module FRP.Chimera.Environment.Utils
(
cont2dToDisc2d
, disc2dToCont2d
, cont2dTransDisc2d
, disc2dTransCont2d
) where
import FRP.Chimera.Environment.Continuous
import FRP.Chimera.Environment.Discrete
cont2dToDisc2d :: Continuous2dCoord -> Discrete2dCoord
cont2dToDisc2d (xc, yc) = (floor xc, floor yc)
... | thalerjonathan/phd | coding/libraries/chimera/src/FRP/Chimera/Environment/Utils.hs | gpl-3.0 | 1,140 | 0 | 8 | 230 | 369 | 199 | 170 | 28 | 1 |
{-# LANGUAGE CPP, ScopedTypeVariables #-}
module Engine where
import Control.Applicative
import Control.Arrow
import Control.Concurrent (forkIO)
import Control.Concurrent.Chan
import Control.Concurrent.MVar
import Control.Concurrent.Process
import C... | kaoskorobase/mescaline | app-ios/Engine.hs | gpl-3.0 | 6,269 | 0 | 14 | 1,512 | 852 | 519 | 333 | 74 | 1 |
{-
Copyright 2011 Alexander Midgley
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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope th... | shadwstalkr/GrahamScanDemo | GrahamScan.hs | gpl-3.0 | 2,219 | 0 | 17 | 735 | 719 | 371 | 348 | 43 | 4 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/SetLoadBasedAutoScaling.hs | mpl-2.0 | 5,500 | 0 | 9 | 1,034 | 565 | 344 | 221 | 65 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.MapsCoordinate.Types.Sum
-- Copyright : (c) 2015-2016 ... | rueshyna/gogol | gogol-maps-coordinate/gen/Network/Google/MapsCoordinate/Types/Sum.hs | mpl-2.0 | 3,079 | 0 | 11 | 763 | 473 | 261 | 212 | 62 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-drive/gen/Network/Google/Resource/Drive/Teamdrives/Get.hs | mpl-2.0 | 3,265 | 0 | 13 | 721 | 381 | 230 | 151 | 63 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/GlobalOperations/List.hs | mpl-2.0 | 7,183 | 0 | 19 | 1,521 | 758 | 454 | 304 | 108 | 1 |
{-# LANGUAGE DisambiguateRecordFields, NamedFieldPuns, RecordWildCards, PostfixOperators, LiberalTypeSynonyms, TypeOperators, OverloadedStrings, PackageImports, ScopedTypeVariables #-}
module Graphics.Diagrams.DerivationTrees (
-- * Basics
module Data.Monoid,
module Data.LabeledTree,
-- * Derivation' building
-- axio... | jyp/lp-diagrams | Graphics/Diagrams/DerivationTrees.hs | agpl-3.0 | 6,938 | 90 | 19 | 1,505 | 2,528 | 1,354 | 1,174 | 134 | 2 |
-- |
-- Module : DMSS.Daemon
-- License : Public Domain
--
-- Maintainer : daveparrish@tutanota.com
-- Stability : experimental
-- Portability : untested
--
-- Dead Man Switch System daemon module
--
module DMSS.Daemon where
import DMSS.Config (createLocalDirectory)
import DMSS.Daemon.Command
import DMSS.... | dmp1ce/DMSS | src-lib/DMSS/Daemon.hs | unlicense | 4,640 | 0 | 19 | 1,068 | 1,184 | 622 | 562 | 86 | 3 |
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# LANGUAGE Trustworthy, NoMonomorphismRestriction, OverloadedStrings, UnicodeSyntax, LambdaCase #-}
-- | Utility functions and reexports for System.Envy, an environment variable config reader.
module Magicbane.Config (
module X
, module Magicbane.Config
) where
imp... | myfreeweb/magicbane | library/Magicbane/Config.hs | unlicense | 943 | 0 | 11 | 227 | 160 | 93 | 67 | 14 | 2 |
<?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="id-ID">
<title>Server-Sent Events | ZAP Extension</title>
<maps>
<homeID>top</homeID>
... | 0xkasun/security-tools | src/org/zaproxy/zap/extension/sse/resources/help_id_ID/helpset_id_ID.hs | apache-2.0 | 982 | 85 | 53 | 160 | 402 | 212 | 190 | -1 | -1 |
module DistinctMidpoints.A285490 (a285490_list, a285490) where
import Helpers.Midpoints (nonDuplicateMidpointSequence, ArithmeticProgression(..), Injectivity(..))
-- For all distinct integers n, m, j, k such that (n, m) != (j, k) != (m, n),
-- (n + m, a(n) + a(m)) != (j + k, a(j) + a(k))
a285490 n = a285490_list !! (n... | peterokagey/haskellOEIS | src/DistinctMidpoints/A285490.hs | apache-2.0 | 398 | 0 | 7 | 58 | 69 | 42 | 27 | 4 | 1 |
module Config.Command.Scan
( Config(..)
, opts
, mkCfg
)
where
import Config.Store ( storeOptDescr, ParseStore )
import Config.GetOpt ( Opts, MkCfg, noArgs, contentDirDesc )
import State.Types ( State )
data Config =
Config
{ contentDir :: !(FilePath)
, store :: !(Maybe (IO State))
... | j3h/doc-review | src/Config/Command/Scan.hs | bsd-3-clause | 638 | 0 | 13 | 165 | 214 | 122 | 92 | 21 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Concurrent.MVar
import Control.Monad (when)
import qualified Data.ByteString.Lazy as L
import Data.IORef (IORef, modifyIORef, newIORef,
readIORef, writeI... | kolmodin/spdy | example/NewAPITest.hs | bsd-3-clause | 2,980 | 2 | 18 | 693 | 713 | 416 | 297 | 64 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Snap.Loader.Dynamic.Evaluator
( HintLoadable
, protectedHintEvaluator
) where
------------------------------------------------------------------------------
import qualified Control.Exception as Ex
import Control.Monad (when)
import Control.Monad.Trans (liftIO)
import... | snapframework/snap-loader-dynamic | src/Snap/Loader/Dynamic/Evaluator.hs | bsd-3-clause | 6,197 | 0 | 31 | 2,332 | 952 | 493 | 459 | 73 | 5 |
{-# LANGUAGE OverloadedStrings #-}
module Network.Wai.MakeAssetsSpec where
import Control.Exception
import Control.Lens
import Data.ByteString.Lazy (isPrefixOf)
import Data.List (intercalate)
import Network.Wai
import Network.Wai.Handler.Warp
import ... | soenkehahn/wai-make-assets | test/Network/Wai/MakeAssetsSpec.hs | bsd-3-clause | 4,386 | 0 | 30 | 1,436 | 909 | 429 | 480 | 95 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
module Control.Monad.Loop.ForEach (ForEach(..)) where
import Control.Monad (liftM)
import Control.Monad.Primitive (PrimMonad, PrimState)
import Control.Monad.Trans.Class (lift)
-- Import the vector package qualifie... | ttuegel/loops | src/Control/Monad/Loop/ForEach.hs | bsd-3-clause | 5,062 | 0 | 12 | 1,079 | 1,561 | 851 | 710 | 106 | 1 |
{-# LANGUAGE EmptyDataDecls, NoMonomorphismRestriction #-}
{-# LANGUAGE TypeFamilies, FlexibleInstances #-}
-- | Unifying syntax with semantics
--
module Lambda.CFG4 where
data S -- clause
data NP -- noun phrase
data VP -... | suhailshergill/liboleg | Lambda/CFG4.hs | bsd-3-clause | 1,484 | 0 | 11 | 538 | 547 | 295 | 252 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
module Guesswork.Types where
import Control.Monad.RWS.Strict
import Control.Exception
import Control.Applicative
import Data.Typeable
import Data.Serialize as S
import GHC.Generics
import qualified Data.Vector.Unboxed... | deggis/guesswork | src/Guesswork/Types.hs | bsd-3-clause | 1,500 | 0 | 9 | 298 | 504 | 281 | 223 | 43 | 1 |
-- © 2002 Peter Thiemann
module WASH.Utility.SimpleParser where
import Data.Char
-- very simple parser combinators: Parsec is too sophisticated!
newtype Parser a b = Parser (a -> [(b, a)])
unParser (Parser g) = g
instance Monad (Parser a) where
return x = Parser (\ w -> [(x, w)])
m >>= f = let g = unParser m in
... | nh2/WashNGo | WASH/Utility/SimpleParser.hs | bsd-3-clause | 1,527 | 9 | 16 | 395 | 815 | 423 | 392 | 46 | 2 |
-- | This module defines a simple textual weather widget that polls
-- NOAA for weather data. To find your weather station, you can use
--
-- <http://www.nws.noaa.gov/tg/siteloc.php>
--
-- For example, Madison, WI is KMSN.
--
-- NOAA provides several pieces of information in each request; you
-- can control which piec... | Undeterminant/taffybar | src/System/Taffybar/Weather.hs | bsd-3-clause | 9,810 | 0 | 19 | 2,741 | 2,135 | 1,118 | 1,017 | 185 | 5 |
module Board_Test
(tests)
where
import Test.Tasty
--import Test.Tasty.SmallCheck as SC
--import Test.Tasty.QuickCheck as QC
import Test.Tasty.HUnit
import Data.List
import Data.Ord
tests :: TestTree
tests = testGroup "Board tests" [unitTests]
unitTests = testGroup "Unit tests"
[]
| jasdennison/scrabble-solver | tests/Board_Test.hs | bsd-3-clause | 290 | 0 | 6 | 44 | 62 | 37 | 25 | 10 | 1 |
module PL0.AST.Class (
Expression(..)
, ResolvedExpression(..)
, Type(..)
, Resolved(..)
, ResolvedType(..)
, OperationName(..)
, Operation(..)
, TypedExp(..)
, TFunction(..)
, checkArgs
) where
import PL0.Internal
| LightAndLight/pl0-haskell | src/PL0/AST/Class.hs | bsd-3-clause | 246 | 0 | 5 | 57 | 80 | 56 | 24 | 12 | 0 |
module Utils where
import Data.Either
import qualified Data.ByteString as B
import qualified Data.Binary.Strict.Get as S
import Test.Hspec
minizork () = B.readFile "stories/minizork.z3"
ev = flip $ either expectationFailure
runGet fi = fst . flip S.runGet fi
| theor/zorkell | test/Utils.hs | bsd-3-clause | 262 | 0 | 7 | 39 | 78 | 45 | 33 | 8 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -F -pgmFtrhsx #-}
module Crete.Stats.Stats where
import Control.Applicative
import Contr... | fphh/crete | src/Crete/Stats/Stats.hs | bsd-3-clause | 5,697 | 131 | 49 | 1,206 | 1,965 | 1,006 | 959 | -1 | -1 |
{-# language CPP #-}
-- | = Name
--
-- VK_FUCHSIA_imagepipe_surface - instance extension
--
-- == VK_FUCHSIA_imagepipe_surface
--
-- [__Name String__]
-- @VK_FUCHSIA_imagepipe_surface@
--
-- [__Extension Type__]
-- Instance extension
--
-- [__Registered Extension Number__]
-- 215
--
-- [__Revision__]
-- ... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_FUCHSIA_imagepipe_surface.hs | bsd-3-clause | 14,622 | 58 | 15 | 2,707 | 2,074 | 1,265 | 809 | -1 | -1 |
-- 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 #-}
{-# LANGUAGE OverloadedStrings #-}
module Duckling.TimeGrain.PL.Rules
( rules ) where
... | facebookincubator/duckling | Duckling/TimeGrain/PL/Rules.hs | bsd-3-clause | 1,427 | 0 | 11 | 259 | 271 | 172 | 99 | 25 | 1 |
{-# Language BangPatterns #-}
module Histo (
readSalida
) where
import Control.Concurrent.Async
import Control.Lens
import Control.Monad
import qualified Data.ByteString.Char8 as C
import Data.List as DL
import Data.List.Split (chunksOf)
import qualified Data.Vector.Unboxed as VU
import ... | felipeZ/Dynamics | src/Histo.hs | bsd-3-clause | 1,112 | 0 | 12 | 304 | 296 | 160 | 136 | 34 | 2 |
-- |
-- Module : Crypto.Hash.SHA1
-- License : BSD-style
-- Maintainer : Herbert Valerio Riedel <hvr@gnu.org>
-- Stability : stable
-- Portability : unknown
--
-- A module containing <https://en.wikipedia.org/wiki/SHA-1 SHA-1> bindings
--
module Crypto.Hash.SHA1
(
-- * Incremental API
--
--... | hvr/cryptohash-sha1 | src/Crypto/Hash/SHA1.hs | bsd-3-clause | 9,305 | 0 | 15 | 2,006 | 1,868 | 1,007 | 861 | 132 | 2 |
module Main where
import Database.Persist.Sqlite
main :: IO ()
main = print "hello world!"
| rubenmoor/persistent-sqlite-ld-fail | app/Main.hs | bsd-3-clause | 93 | 0 | 6 | 16 | 28 | 16 | 12 | 4 | 1 |
module Main (main) where
import Prelude
import Criterion.Main
import Data.ByteString (ByteString)
import Urbit.Atom (Atom)
import qualified Urbit.Atom.Fast as Fast
import qualified Urbit.Atom.Slow as Slow
-- Examples --------------------------------------------------------------------
a64, a32768 :: Atom
a64... | jfranklin9000/urbit | pkg/hs/urbit-atom/bench/Main.hs | mit | 1,412 | 0 | 10 | 427 | 356 | 192 | 164 | 30 | 1 |
data X = X (Int -> Int) deriving (Eq, Show)
data Y = Y Ordering deriving Eq
| roberth/uu-helium | test/staticerrors/NonDerivableEq.hs | gpl-3.0 | 77 | 0 | 8 | 18 | 40 | 22 | 18 | 2 | 0 |
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
-- Improved Bash parser for Aura, built with Parsec.
{-
Copyright 2012, 2013, 2014 Colin Woodbury <colingw@gmail.com>
This file is part of Aura.
Aura is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publishe... | joehillen/aura | src/Bash/Parser.hs | gpl-3.0 | 7,193 | 0 | 13 | 1,671 | 1,851 | 965 | 886 | 110 | 3 |
{-# LANGUAGE DeriveDataTypeable, CPP, BangPatterns, RankNTypes,
ForeignFunctionInterface, MagicHash, UnboxedTuples,
UnliftedFFITypes #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
#if __GLASGOW_HASKELL__ >= 701
{-# LANGUAGE Unsafe #-}
#endif
{-# OPTIONS_HADDOCK hide #-}
-- |
-- Module ... | jwiegley/ghc-release | libraries/bytestring/Data/ByteString/Short/Internal.hs | gpl-3.0 | 19,603 | 0 | 14 | 4,689 | 4,230 | 2,214 | 2,016 | 314 | 3 |
{-# 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-ec2/gen/Network/AWS/EC2/TerminateInstances.hs | mpl-2.0 | 6,017 | 0 | 15 | 1,158 | 678 | 413 | 265 | 82 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
-- Module : Khan.CLI.Group
-- Copyright : (c) 2013 Brendan Hay <brendan.g.hay@gmail.com>
-- License : This Source Code Form is subject to the terms of
-- ... | zinfra/khan | khan-cli/src/Khan/CLI/SSH.hs | mpl-2.0 | 4,006 | 0 | 13 | 1,129 | 1,019 | 530 | 489 | 110 | 3 |
{-# LANGUAGE GeneralizedNewtypeDeriving, CPP, TypeFamilies, FlexibleInstances, FlexibleContexts, DeriveDataTypeable, TypeOperators #-}
import Development.Shake
import qualified Development.Shake.Core as Core
import Control.DeepSeq
import Control.Monad.IO.Class
import Data.Binary
import Data.Binary.Get
import Data.Bina... | beni55/openshake | tests/deserialization-changes/Shakefile-2.hs | bsd-3-clause | 978 | 0 | 15 | 186 | 274 | 142 | 132 | 22 | 1 |
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE FlexibleContexts #-}
module Propellor.Property where
import System.Directory
import System.FilePath
import Control.Monad
import Data.Monoid
import Control.Monad.IfElse
import "mtl" Control.Monad.RWS.Strict
import Propellor.Types
import Propellor.Info
import Utility.Monad
... | avengerpenguin/propellor | src/Propellor/Property.hs | bsd-2-clause | 3,484 | 18 | 15 | 678 | 931 | 469 | 462 | 71 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeOperators #-}
module Kind00003 where
{-
-- FIXME: Waiting on https://github.com/haskell-suite/haskell-src-exts/issues/125
data HList :: [*] -> * where
HNil :: HList '[]
HCons :: a -> HList t -> HList (a ': t)
-- F... | charleso/intellij-haskforce | tests/gold/parser/Kind00003.hs | apache-2.0 | 800 | 0 | 9 | 165 | 196 | 118 | 78 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
---------------------------------------------------------
--
-- Module : Yesod.Sitemap
-- Copyright : Michael Snoyman
-- License : BSD3
--
-- Maintainer : Michael Snoyman <michael@snoyman.com>
-- Stability : Stable
-- Portabilit... | s9gf4ult/yesod | yesod-sitemap/Yesod/Sitemap.hs | mit | 3,741 | 0 | 19 | 998 | 854 | 448 | 406 | 79 | 4 |
<?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="ko-KR">
<title>AMF Support</title>
<maps>
<homeID>amf</homeID>
<mapref location="map.jh... | thc202/zap-extensions | addOns/amf/src/main/javahelp/help_ko_KR/helpset_ko_KR.hs | apache-2.0 | 956 | 77 | 66 | 156 | 407 | 206 | 201 | -1 | -1 |
module InfixIn3 where
data Inf a b = Nil | a :* b
data Try = C1 Try2
data Try2 = C2 [Int]
data T = forall a. MkT [a]
f :: Inf [Int] (Either Int Int) -> [Int]
f Nil = []
f (a :* b) = a
h :: Inf [Int] (Either Int Int) -> [Int]
h Nil = []
h (a@[] :* b) = a
h (a@(x:xs) :* b) = a
j :: Int -> Try -> [Int]
j v x@(C1 b_... | SAdams601/HaRe | old/testing/subIntroPattern/InfixIn3.hs | bsd-3-clause | 398 | 0 | 11 | 118 | 300 | 165 | 135 | -1 | -1 |
{-# LANGUAGE TypeFamilies, PolyKinds #-}
-- See #10982
module UnusedTyVarWarnings where
type family C a b where
C a b = a -- should warn
type family C2 a b
type instance C2 a b = a -- should warn
type family D a b where
D a _b = a -- should not warn
type family D2 a b
type in... | sdiehl/ghc | testsuite/tests/indexed-types/should_compile/UnusedTyVarWarnings.hs | bsd-3-clause | 930 | 0 | 6 | 329 | 252 | 159 | 93 | 25 | 0 |
{-# LANGUAGE QuasiQuotes, TemplateHaskell, TypeFamilies, MultiParamTypeClasses, OverloadedStrings #-}
module YesodCoreTest.Redirect (specs, Widget) where
import YesodCoreTest.YesodTest
import Yesod.Core.Handler (redirectWith, setEtag)
import qualified Network.HTTP.Types as H
data Y = Y
mkYesod "Y" [parseRoutes|
/ Roo... | ygale/yesod | yesod-core/test/YesodCoreTest/Redirect.hs | mit | 3,416 | 0 | 19 | 957 | 922 | 462 | 460 | 81 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
{-
- This is a test framework for Arrays, using QuickCheck
-
-}
import qualified Data.Array as Array
import Data.List
import Control.Monad ( liftM2, liftM3, liftM4 )
import System.Random
import Data.Ix
import Data.List( (\\) )
infixl 9 !, //
infixr 0 ==... | urbanslug/ghc | testsuite/tests/array/should_run/arr016.hs | bsd-3-clause | 15,850 | 25 | 28 | 5,030 | 6,805 | 3,574 | 3,231 | -1 | -1 |
-- Kind error message test
module ShouldFail where
type IntMap a = [a]
data SymDict a = SymDict {idcounter:: Int, itot::IntMap a}
data SymTable = SymTable { dict::SymDict }
| ezyang/ghc | testsuite/tests/typecheck/should_fail/tcfail136.hs | bsd-3-clause | 180 | 0 | 9 | 36 | 55 | 35 | 20 | 4 | 0 |
module Vehicles where
--data Price = Price Integer deriving (Eq, Show)
newtype Price = Price Integer deriving (Eq, Show)
class TooExpensive a where
tooExpensive :: a -> Bool
instance TooExpensive Price where
tooExpensive (Price n) = n > 15000
data Manufacturer =
Mini
| Mazda
| Tata
deriving (Eq, Show)... | JoshuaGross/haskell-learning-log | Code/Haskellbook/Vehicles.hs | mit | 950 | 0 | 8 | 211 | 339 | 182 | 157 | 37 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fplugin GHC.TypeLits.Normalise #-}
{-# OPTIONS_GHC -fplugin GHC.TypeLits.KnownNa... | nshepperd/funn | AI/Funn/CL/Batched/GLOW.hs | mit | 3,757 | 0 | 17 | 865 | 1,235 | 707 | 528 | -1 | -1 |
-- lsim - läpsy simulator - Juho Rinta-Paavola 2015
import System.Random
import Data.List
(??) :: [a] -> [Int] -> [a]
xs ?? [] = []
xs ?? (i:is) = (xs !! i):(xs ?? is)
replaceIndex :: [a] -> Int -> a -> [a]
replaceIndex (x:xs) 0 new = new:xs
replaceIndex (x:xs) n new = x:(replaceIndex xs (n-1) new)
data Suit = C... | jrp6/lsim | main.hs | mit | 3,709 | 0 | 13 | 1,012 | 1,548 | 804 | 744 | 77 | 1 |
{-# LANGUAGE TemplateHaskell, TypeSynonymInstances, FlexibleInstances #-}
module Asm.QQ (asm, asmf) where
import Language.Haskell.TH
import Language.Haskell.TH.Quote
import qualified Language.Haskell.Meta.Parse as P
import Data.Generics
import Asm.Preprocess
import Asm.Parser
import Asm.Expr
-- Quotes assembly code
a... | unknownloner/calccomp | Asm/QQ.hs | mit | 2,409 | 0 | 12 | 586 | 725 | 380 | 345 | 67 | 3 |
module ExpressionProblem1b
(
perimeter
)
where
import ExpressionProblem1a
-- Extension to API
-- New operation: perimeter
-- Cannot define new shape since Shape is closed
perimeter :: Shape -> Double
perimeter s =
case s of
Square side -> 4.0 * side
Circle radius -> 2 * pi * radius
| rcook/expression-problem | src/ExpressionProblem1b.hs | mit | 306 | 0 | 9 | 73 | 66 | 36 | 30 | 9 | 2 |
{-# LANGUAGE RecordWildCards #-}
import Stackage.Types
import Stackage.Build (build, defaultBuildSettings)
import Stackage.Init (stackageInit)
import Stackage.Util (allowPermissive)
import System.Environment (getArgs, getProgName)
import Data.Set... | ekmett/stackage | app/stackage.hs | mit | 2,830 | 0 | 18 | 1,014 | 668 | 347 | 321 | 61 | 7 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module Handler.RepoSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
describe "valid request" $ do
it "gives a 200" $ do
get ReposR
statusIs 200
| rgrempel/frelm.org | test/Handler/RepoSpec.hs | mit | 272 | 0 | 14 | 75 | 62 | 31 | 31 | 10 | 1 |
a `blurb` b = c
| chreekat/vim-haskell-syntax | test/golden/toplevel/infix-backtick.hs | mit | 16 | 0 | 5 | 5 | 14 | 7 | 7 | 1 | 1 |
{-# htermination (gtMyInt :: MyInt -> MyInt -> MyBool) #-}
import qualified Prelude
data MyBool = MyTrue | MyFalse
data List a = Cons a (List a) | Nil
data MyInt = Pos Nat | Neg Nat ;
data Nat = Succ Nat | Zero ;
data Ordering = LT | EQ | GT ;
primCmpNat :: Nat -> Nat -> Ordering;
primCmpNat Zero Zer... | ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/GT_6.hs | mit | 1,282 | 0 | 8 | 273 | 542 | 293 | 249 | 34 | 1 |
import Control.Monad
import Data.List
import Data.Array
limit :: Int
limit = 28123
main = print $ sum
[ n
| n <- [1..limit]
, not $ or [ abounds ! (n - a1) | a1 <- takeWhile (< n) abundants ]
]
abundants = filter (abounds !) [1..limit]
-- Memoized abounds
abounds = listArray (1, limit)
[ n < sum... | nickspinale/euler | complete/023.hs | mit | 1,100 | 0 | 16 | 410 | 356 | 197 | 159 | 23 | 2 |
-----------------------------------------------------------------------------
--
-- Module : Language.PureScript.Parser.Kinds
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
-- Maintainer : Phil Freeman <paf31@cantab.net>
-- Stability : experimental
-- Portability :
--
-- |
-- A parser for k... | michaelficarra/purescript | src/Language/PureScript/Parser/Kinds.hs | mit | 1,273 | 0 | 13 | 233 | 255 | 149 | 106 | 22 | 1 |
import Test.HUnit
import Q04
test1 = TestCase (assertEqual "mylength [] should be 0. " (0) (mylength [] ))
test2 = TestCase (assertEqual "mylength [1] should be 1. " (1) (mylength [1] ))
test3 = TestCase (assertEqual "mylength [1,2] should be 2. " (2) (mylength [1,2]))
main = runTestTT $ TestList [test1,test2... | cshung/MiscLab | Haskell99/q04.test.hs | mit | 327 | 0 | 10 | 60 | 122 | 66 | 56 | 6 | 1 |
module Main where
import Types
import System.Random
import Control.Monad.State
randomF _ = state random
randomStrat :: Strategy
randomStrat = S ("random", randomF)
main = dilemmaMain randomStrat
| barkmadley/etd-retreat-2014-hteam | src/Random/Main.hs | mit | 200 | 0 | 6 | 31 | 56 | 32 | 24 | 8 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Control.Arrow ((&&&))
import Data.ByteString (ByteString)
import qualified Data.ByteString.Char8 as BC
import Data.Char (chr, isDigit, isPunctuation, ord)
import ... | genos/online_problems | advent_of_code_2016/day4/src/Main.hs | mit | 2,149 | 0 | 13 | 679 | 797 | 430 | 367 | 56 | 2 |
-- making string literals polymorphic over the 'IsString' type class
{-# LANGUAGE OverloadedStrings #-}
module Main where
import qualified IG.AuthenticationApi as A
import qualified IG.LightstreamerApi as L
-- Postgres handle
import qualified IG.PostgresStreamHandle as P
-- For creating efficient... | peteryhwong/ig-haskell-client | src/Main.hs | mit | 5,498 | 2 | 14 | 1,295 | 1,092 | 623 | 469 | 88 | 1 |
module ProjectRosalind.Lcsm.ToListFull where
import Data.Vector as V
import Data.List as L
import Data.Hashable (hash)
import ProjectRosalind.Fasta_Types
import ProjectRosalind.FileFasta (filePathToFastas)
import Data.Time
import Data.List (maximumBy)
import Data.Function (on)
lengthToStartRunList :: Int -> [(... | brodyberg/Notes | ProjectRosalind.hsproj/LearnHaskell/lib/ProjectRosalind/Lcsm/ToListFull.hs | mit | 4,664 | 0 | 13 | 1,137 | 995 | 518 | 477 | 77 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Stock.Router.API where
import Control.Applicative
import Control.Monad.IO.Class
import Data.List.Split
import Data.Maybe
import Web.Scotty
--
import Stock.Article
import Stock.Config
import Stock.... | tattsun/stock | src/Stock/Router/API.hs | mit | 2,779 | 0 | 19 | 844 | 876 | 403 | 473 | 66 | 3 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-| Unittests for mutli-maps
-}
{-
Copyright (C) 2014 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 ver... | ribag/ganeti-experiments | test/hs/Test/Ganeti/Utils/MultiMap.hs | gpl-2.0 | 2,426 | 0 | 15 | 480 | 474 | 262 | 212 | 37 | 1 |
{- |
Module : $Header$
Description : Central datastructures for development graphs
Copyright : (c) Till Mossakowski, Uni Bremen 2002-2006
License : GPLv2 or higher, see LICENSE.txt
Maintainer : till@informatik.uni-bremen.de
Stability : provisional
Portability : non-portable(Logic)
Fixed CASL axiom... | nevrenato/HetsAlloy | CommonLogic/PredefinedCASLAxioms.hs | gpl-2.0 | 4,131 | 0 | 13 | 1,106 | 1,079 | 592 | 487 | 120 | 1 |
xorArray :: Int -> [Int] -> [Int]
xorArray mask input = map (xor mask) input
| rdnetto/H2V | docs/Design Presentation/src/lst1.hs | gpl-2.0 | 77 | 0 | 7 | 15 | 41 | 21 | 20 | 2 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Nightwatch.Webapp (startWebapp) where
import Yesod
data Nightwatch = Nightwatch
mkYesod "Nightwatch" [parseRoutes|
/ HomeR GET
|]
instance Yesod Nightwat... | vacationlabs/nightwatch | haskell/Nightwatch/Webapp.hs | gpl-2.0 | 460 | 0 | 7 | 92 | 87 | 50 | 37 | 14 | 1 |
{- MSigDBRDataConvert
Gregory W. Schwartz
Collections the functions pertaining to converting certain annotations into
pathways using the MSigDB rdata files (tested with
http://bioinf.wehi.edu.au/software/MSigDB/).
-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module... | GregorySchwartz/convert-annotation | src/MSigDBRDataConvert.hs | gpl-3.0 | 2,476 | 0 | 14 | 682 | 578 | 308 | 270 | 53 | 2 |
{-# LANGUAGE OverloadedStrings #-}
import Web.Scotty
import Data.String
import RouteEulerUC
main = scotty 3000 $ do
get "/" $ do
html "Hello! This is the root-URL for Haskell REST service"
get "/uc/:id" $ do
ucid <- param "id" :: ActionM Int
html $ (fromString (route ucid))
| tedhag/teuler | haskell/rest-euler/src/Main.hs | gpl-3.0 | 297 | 0 | 15 | 68 | 88 | 41 | 47 | 10 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.