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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE FlexibleInstances #-}
import Control.Applicative
import Control.DeepSeq
import Data.List (sort,unfoldr)
import Data.Word
import System.Process
import System.Vacuum.Cairo (viewFile)
import Test.QuickCheck
view x = rnf x `seq` do
viewFile "temp.svg" x
system "opera temp.svg"
data Heap a = E | T a (Hea... | olsner/sbmalloc | PairingHeap.hs | mit | 4,311 | 2 | 15 | 937 | 1,787 | 872 | 915 | 97 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleContexts #-}
module Template (
render
) where
import Data.Data
import Data.FileEmbed (embedDir)
import Data.ByteString (ByteString)
import Data.ByteString.UTF8 (toString)
import Text.Hastache.Context (mkGenericContext)
import Text.Hastache (
hastacheStr,
... | prasmussen/magmod | Template.hs | mit | 774 | 0 | 11 | 152 | 228 | 126 | 102 | 25 | 1 |
---------------------------------------------------------------------
--
-- | Ascetic
--
-- @Text\/Ascetic.hs@
--
-- Data structure, combinators, and functions for assembling
-- data and emitting files in any XML-like or HTML-like
-- markup language (consisting of tags, elements, attributes,
-- declarations, a... | lapets/ascetic | Text/Ascetic.hs | mit | 3,749 | 0 | 20 | 1,186 | 1,188 | 612 | 576 | 60 | 9 |
-- Pretty.hs ---
--
-- Filename: Pretty.hs
-- Description:
-- Author: Manuel Schneckenreither
-- Maintainer:
-- Created: Thu Sep 4 10:42:24 2014 (+0200)
-- Version:
-- Package-Requires: ()
-- Last-Updated: Mon Jul 23 10:23:54 2018 (+0200)
-- By: Manuel Schneckenreither
-- Update #: 62
-- URL:
-- Doc URL:... | ComputationWithBoundedResources/ara-inference | src/Data/Rewriting/ARA/Exception/Pretty.hs | mit | 1,503 | 0 | 9 | 415 | 294 | 172 | 122 | 20 | 11 |
--------------------------------------------------------------------------------
-- |
-- Module : AI.Clustering.KMeans.Types
-- Copyright : (c) 2015 Kai Zhang
-- License : MIT
--
-- Maintainer : kai@kzhang.org
-- Stability : experimental
-- Portability : portable
--
-- <module description starting a... | kaizhang/clustering | src/AI/Clustering/KMeans/Types.hs | mit | 2,205 | 0 | 11 | 588 | 291 | 196 | 95 | 28 | 1 |
{- |
Description : Visualisation of taxonomies
Copyright : (c) Otto-von-Guericke University of Magdeburg
License : GPLv2 or higher, see LICENSE.txt
This folder provides visualisation of taxonomies in the same style as the
MMiSSOntology tool written by Achim Mahnke. In fact his modules where only
slightly chan... | spechub/Hets | Taxonomy.hs | gpl-2.0 | 1,096 | 0 | 2 | 141 | 5 | 4 | 1 | 1 | 0 |
--import Ch_02
--import Ch_03
import Ch_06
import Ch_07
import Ch_09
e :: Double
e = exp 1
ode :: Double ->Double -> Double
ode t y = t+y
odeSol :: Double -> Double
odeSol t = (-t) + 4*e**(t-1) -1
strip4y :: [(Double, Double)] -> [Double]
strip4y = map snd
strip4t :: [(Double, Double)... | Marcus-Rosti/numerical-methods | src/Main.hs | gpl-2.0 | 1,155 | 1 | 12 | 333 | 556 | 296 | 260 | 40 | 1 |
module Types
where
import Import
import Utils
import Text.Parsec
data ShellTest = ShellTest {
comments :: [String] -- # COMMENTS OR BLANK LINES before test
,trailingComments :: [String] -- # COMMENTS OR BLANK LINES after the last test
,command :: TestCommand
,stdin :: Mayb... | simonmichael/shelltestrunner | src/Types.hs | gpl-3.0 | 2,355 | 0 | 10 | 693 | 572 | 317 | 255 | 49 | 1 |
import System.Environment
import Pone.Test
import Pone.Parser.Type
import Pone.Utils
import System.IO
suite = All
main = do
hSetEncoding stdout utf8
args <- getArgs
case args of
(path:rest) -> do
results <- runTestsAndPrint (TestSpec 8 path suite)
putStrLn $ unlines $ map (... | deweyvm/pone | src/Main.hs | gpl-3.0 | 406 | 0 | 15 | 108 | 121 | 61 | 60 | 14 | 2 |
-- | Top-level wrapper for Sugar.Convert, Sugar.Parens, Sugar.AddNames
module Lamdu.Sugar
( sugarWorkArea
, Sugar.WorkArea, Sugar.Payload, Sugar.ParenInfo, Sugar.EntityId, Name
) where
import qualified Control.Lens as Lens
import Control.Monad.Once (OnceT, Typeable)
import Control.Mona... | Peaker/lamdu | src/Lamdu/Sugar.hs | gpl-3.0 | 5,230 | 0 | 23 | 1,121 | 1,521 | 842 | 679 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-doubleclick-bids/gen/Network/Google/Resource/DoubleClickBidManager/Queries/Listqueries.hs | mpl-2.0 | 2,364 | 0 | 11 | 500 | 217 | 135 | 82 | 40 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-toolresults/gen/Network/Google/Resource/ToolResults/Projects/Histories/Executions/Steps/List.hs | mpl-2.0 | 6,436 | 0 | 19 | 1,466 | 663 | 395 | 268 | 108 | 1 |
--Zaoqilc
--Copyright (C) 2017 Zaoqi
--This program is free software: you can redistribute it and/or modify
--it under the terms of the GNU Affero 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 distrib... | zaoqi/zaoqilc | featuring/Control/Concurrent/Signal.hs | agpl-3.0 | 4,169 | 0 | 20 | 1,320 | 1,509 | 743 | 766 | 114 | 2 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# OPTIONS_GHC -Wall -fno-prof-auto #-}
{- Use this internally because the transformers RWST leaks in the W part -}
module Reactive.Impulse.Internal.RWST (
RWST(..)
, runRWST
, execRWST
, evalRWST
, mapRWST
, wit... | JohnLato/impulse | src/Reactive/Impulse/Internal/RWST.hs | lgpl-3.0 | 5,285 | 0 | 13 | 1,491 | 2,763 | 1,486 | 1,277 | 139 | 1 |
-- Haskell implementation of steinhaus-joihnson-trotter algorithm
-- I find it hard to implement this in haskell...
| seckcoder/lang-learn | algo/permutation/steinhaus-johnson-trotter-seck.hs | unlicense | 119 | 0 | 2 | 19 | 4 | 3 | 1 | 1 | 0 |
-- Copyright (C) 2009-2012 John Millikin <john@john-millikin.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 require... | rblaze/haskell-dbus | lib/DBus.hs | apache-2.0 | 8,863 | 0 | 13 | 1,882 | 1,253 | 748 | 505 | 160 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : Geography.VectorTile.Util
-- Copyright : (c) Colin Woodbury 2016 - 2018
-- License : BSD3
-- Maintainer: Colin Woodbury <colingw@gmail.com>
module Data.Geometry.VectorTile.Util where
import Data.Geometry.VectorTile.Geometry (Point (..))
import qualif... | sitewisely/zellige | src/Data/Geometry/VectorTile/Util.hs | apache-2.0 | 1,189 | 0 | 11 | 278 | 331 | 189 | 142 | 19 | 4 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE FlexibleContexts #-}
module FormatHandler.Html
( htmlFormatHandler
, YesodAloha (..)
, splitTitle
, titleForm
) where
import FormatHandler
import Text.Julius (julius)
import Text.HTML.SanitizeXSS (sanitizeBalance)
import q... | snoyberg/yesodcms | FormatHandler/Html.hs | bsd-2-clause | 3,767 | 0 | 15 | 836 | 1,244 | 677 | 567 | 88 | 2 |
module Propellor.Property.Network where
import Propellor
import Propellor.Property.File
type Interface = String
ifUp :: Interface -> Property NoInfo
ifUp iface = cmdProperty "ifup" [iface]
-- | Resets /etc/network/interfaces to a clean and empty state,
-- containing just the standard loopback interface, and with
--... | shosti/propellor | src/Propellor/Property/Network.hs | bsd-2-clause | 3,366 | 38 | 18 | 612 | 716 | 393 | 323 | 65 | 3 |
module WebToInk.Converter.ConverterService ( prepareKindleGeneration
, getTitle
, getMobi
) where
import System.Directory (createDirectoryIfMissing, getDirectoryContents)
import System.I... | thlorenz/WebToInk | webtoink-converter/WebToInk/Converter/ConverterService.hs | bsd-2-clause | 10,328 | 0 | 16 | 2,905 | 2,233 | 1,106 | 1,127 | 163 | 6 |
{-# LANGUAGE OverloadedStrings, DuplicateRecordFields #-}
{- Example "data-point" from a "daily" result:
"time":1475564400,
"summary":"Partly cloudy until evening.",
"icon":"partly-cloudy-day",
"sunriseTime":1475590177,
"sunsetTime":1475632150,
"moonPhase":0.12,
"precipIntensity":0,
"p... | jasonkuhrt/weather | source/WeatherPoint.hs | bsd-3-clause | 2,782 | 0 | 17 | 547 | 314 | 182 | 132 | 43 | 1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, FlexibleContexts #-}--, OverlappingInstances #-}
module Language.SPL.Analyzer where
import Language.SPL.Program
import Language.SPL.Position
--import Language.SPL.Environment
type Error = (Position,String)
type Errors = [Error]
--report :: (Show a, MonadWriter E... | timjs/spl-compiler | Old/Analyzer.hs | bsd-3-clause | 3,466 | 0 | 10 | 937 | 1,097 | 573 | 524 | 57 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
data Binary = Bin Binary Binary | Tip
deriving Show
louds :: Binary -> [Bool]
louds binary = True : encode binary
where
encode :: Binary -> [Bool]
encode (Bin l r) = True : (encode... | haskell-works/succinct-playground | app/Main.hs | bsd-3-clause | 836 | 0 | 10 | 282 | 421 | 220 | 201 | 23 | 2 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-|
Module : Text.XML.Xleb
Description : The Xleb XML-parsing monad
Copyright : (c) Getty Ritter, 2017
License : BSD
Maintainer : Getty Ritter <xleb@infinitenegativeutility.com>
Stability : experimental
The 'Xleb' monad (and the corresponding 'XlebT' monad tran... | aisamanra/xleb | src/Text/XML/Xleb.hs | bsd-3-clause | 12,279 | 0 | 18 | 2,547 | 1,905 | 1,014 | 891 | 152 | 11 |
{-# LANGUAGE DeriveDataTypeable, RecordWildCards, TemplateHaskell, MagicHash #-}
{-# OPTIONS_GHC -fno-warn-missing-fields #-}
module System.Console.CmdArgs.Test.Implicit.Diffy where
import System.Console.CmdArgs
import System.Console.CmdArgs.Quote
import System.Console.CmdArgs.Test.Implicit.Util
data Diffy = Create {s... | ndmitchell/cmdargs | System/Console/CmdArgs/Test/Implicit/Diffy.hs | bsd-3-clause | 2,681 | 0 | 11 | 592 | 703 | 376 | 327 | 57 | 1 |
-- -----------------------------------------------------------------------------
-- Alex wrapper code.
--
-- This code is in the PUBLIC DOMAIN; you may copy it freely and use
-- it for any purpose whatsoever.
import Control.Applicative (Applicative (..))
import Data.Word (Word8)
#if defined(ALEX_BASIC_BYTESTRING) || d... | kumasento/alex | templates/wrappers.hs | bsd-3-clause | 16,536 | 2 | 16 | 4,592 | 4,360 | 2,361 | 1,999 | 17 | 1 |
{-# LANGUAGE
DeriveDataTypeable
, DeriveGeneric
, LambdaCase
, OverloadedStrings
, ScopedTypeVariables
, TemplateHaskell
, TypeFamilies
#-}
module Api.Test where
import Control.Monad.Reader
import Control.Monad.Trans.Error
import Data.Aeson
import Data.Data
import Data.JSON.Schema
import Data.Text (T... | tinkerthaler/basic-invoice-rest | example-api/Api/Test.hs | bsd-3-clause | 3,901 | 0 | 13 | 983 | 1,016 | 551 | 465 | 96 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
module ApiAnnotation (
getAnnotation, getAndRemoveAnnotation,
getAnnotationComments,getAndRemoveAnnotationComments,
ApiAnns,
ApiAnnKey,
AnnKeywordId(..),
AnnotationComment(..),
LRdrName -- Exists for haddocks only
) where
import RdrName
import Outputable
import SrcL... | green-haskell/ghc | compiler/parser/ApiAnnotation.hs | bsd-3-clause | 8,957 | 0 | 11 | 2,086 | 919 | 572 | 347 | 130 | 2 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ViewPatterns #-}
--------... | cchalmers/geometry | src/Geometry/Combinators.hs | bsd-3-clause | 10,535 | 0 | 17 | 2,546 | 1,950 | 1,094 | 856 | 126 | 2 |
import Test.Hspec
import EratosthenesSieve
main :: IO ()
main = hspec $ do
describe "The sieve of Eratosthenes" $ do
it "should return a list with all the prime numbers up to a given number" $ do
primesUpTo 2 `shouldBe` [2]
primesUpTo 3 `shouldBe` [2, 3]
primesUpTo 5 `shouldBe` [2, 3, 5]
... | theUniC/eratosthenes-sieve.hs | test/Spec.hs | bsd-3-clause | 405 | 0 | 15 | 104 | 153 | 83 | 70 | 11 | 1 |
module Pipe
( TSink
, TSource
, TPipe
, newTPipe
, writeTSink
, readTSource
) where
import Control.Concurrent.STM
newtype TSink a = TSink (TChan a)
newtype TSource a = TSource (TChan a)
type TPipe a = (TSink a, TSource a)
writeTSink :: TSink a -> a -> STM ()
writeTSink (TSink chan) = writ... | frerich/lambdacrawler | src/Pipe.hs | bsd-3-clause | 512 | 0 | 9 | 126 | 193 | 103 | 90 | 19 | 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.
module Duckling.Duration.HU.Tests
( tests
) where
import Data.String
import Prelude
import Test.Tasty
impor... | facebookincubator/duckling | tests/Duckling/Duration/HU/Tests.hs | bsd-3-clause | 509 | 0 | 9 | 80 | 79 | 50 | 29 | 11 | 1 |
-- |
-- Module : Language.SequentCore.Plugin
-- Description : GHC plugin library
-- Maintainer : maurerl@cs.uoregon.edu
-- Stability : experimental
--
-- Tools for writing a GHC plugin using the Sequent Core language in place of
-- GHC Core.
module Language.SequentCore.Plugin (
sequentPass, sequentPassWithFl... | lukemaurer/sequent-core | src/Language/SequentCore/Plugin.hs | bsd-3-clause | 1,741 | 0 | 12 | 397 | 229 | 132 | 97 | 20 | 1 |
{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Web.RTBBidder.Protocol.Adx.BidRequest.AdSlot.NativeAdTemplate.Fields (Fields(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelude'
impo... | hiratara/hs-rtb-bidder | src/Web/RTBBidder/Protocol/Adx/BidRequest/AdSlot/NativeAdTemplate/Fields.hs | bsd-3-clause | 4,477 | 0 | 11 | 861 | 1,253 | 696 | 557 | 114 | 1 |
-- |
-- Helper methods used to construct requests.
--
module Network.TableStorage.Request (
propertyList,
entityKeyResource,
columnToTypeString,
printEntityColumn,
printComparisonType,
buildFilterString,
buildQueryString
) where
import Data.Time ( formatTime )
import System.Locale ( defaultTimeLocale )
... | paf31/tablestorage | src/Network/TableStorage/Request.hs | bsd-3-clause | 5,280 | 0 | 16 | 1,104 | 1,327 | 702 | 625 | 122 | 2 |
{-# LANGUAGE PolyKinds #-}
module Data.Flip
( Flip (..)
) where
newtype Flip f a b = Flip { getFlip :: f b a }
| sonyandy/unify | examples/unify-hm/Data/Flip.hs | bsd-3-clause | 126 | 0 | 7 | 40 | 37 | 25 | 12 | 4 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE Ty... | Garygunn94/DFS | TransactionServer/src/TransactionServer.hs | bsd-3-clause | 8,739 | 31 | 42 | 2,230 | 2,178 | 1,082 | 1,096 | 173 | 6 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
module Duckling.Temperature.IT.Tests
( tests ) where
import Data.String
import Prelude
import Test.Tasty
impor... | facebookincubator/duckling | tests/Duckling/Temperature/IT/Tests.hs | bsd-3-clause | 515 | 0 | 9 | 77 | 79 | 50 | 29 | 11 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Rad.QL.Define.Schema where
import Data.Monoid ((<>))
import qualified Data.Trie as Trie
import Rad.QL.Internal.Types
import Rad.QL.AST
import Rad.QL.Types
import Rad.QL.Query
defineSchema :: forall m b. (GraphQLType OBJECT m b) => b -> Schema m
define... | jqyu/bustle-chi | src/Rad/QL/Define/Schema.hs | bsd-3-clause | 1,685 | 0 | 15 | 616 | 561 | 292 | 269 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Milter.Base (
Packet (..)
, getPacket
, getIP
, getKeyVal
, getBody
, negotiate
, accept, discard, hold, reject, continue
) where
import Blaze.ByteString.Builder
import Blaze.ByteString.Builder.Char8
import Control.Applicative
import Control.Monad
import qua... | kazu-yamamoto/rpf | Milter/Base.hs | bsd-3-clause | 3,325 | 0 | 12 | 648 | 955 | 497 | 458 | 77 | 1 |
{-
Gifcurry
(C) 2017 David Lettier
lettier.com
-}
{-# LANGUAGE
NamedFieldPuns
, DuplicateRecordFields
#-}
module GuiKeyboard where
import Control.Monad
import Data.IORef
import Data.Word
import qualified GI.Gdk
import qualified GI.Gtk
import qualified GuiRecords as GR
import qualified GuiPreview
import ... | lettier/gifcurry | src/gui/GuiKeyboard.hs | bsd-3-clause | 2,707 | 0 | 18 | 676 | 632 | 321 | 311 | 88 | 4 |
{-
This file is part of the Haskell package distinfo. It is subject to
the license terms in the LICENSE file found in the top-level directory
of this distribution and at git://pmade.com/distinfo/LICENSE. No part
of the distinfo package, including this file, may be copied, modified,
propagated, or distributed except ac... | devalot/distinfo | src/DistInfo.hs | bsd-3-clause | 644 | 0 | 4 | 80 | 27 | 20 | 7 | 3 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{- |
Core types for content.
The whole site is a list of categories ('Category'). Categories have items
('Item') in th... | aelve/hslibs | src/Guide/Types/Core.hs | bsd-3-clause | 9,043 | 0 | 13 | 1,793 | 1,669 | 942 | 727 | -1 | -1 |
-- | Testing what work is shared by GHC. In general you can't assume
-- work will be shared. Sometimes GHC will do CSE and top level
-- floating to share work but not for say papLots which really requires
-- some partial evalutation kind of work. (e.g Max's super evaluator)
module Main where
papLots :: [Double] -> Dou... | dterei/Scraps | haskell/PapWorkShare.hs | bsd-3-clause | 745 | 0 | 15 | 180 | 201 | 98 | 103 | 16 | 1 |
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__
{-# LANGUAGE MagicHash, UnboxedTuples #-}
#endif
{-# OPTIONS_HADDOCK prune #-}
#if __GLASGOW_HASKELL__ >= 701
{-# LANGUAGE Trustworthy #-}
#endif
-- |
-- Module : Data.ByteString.Char8
-- Copyright : (c) Don Stewart 2006-2008
-- (c) Duncan Coutts 2006-2... | markflorisson/hpack | testrepo/bytestring-0.10.2.0/Data/ByteString/Char8.hs | bsd-3-clause | 40,569 | 0 | 18 | 11,317 | 6,130 | 3,496 | 2,634 | -1 | -1 |
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE TemplateHaskell #-}
module Language.LSP.Types.SelectionRange where
import Data.Aeson.TH
import Language.LSP.Types.Common
import Language.LSP.Types.Location
import Language.LSP.Types.Progress
import Language.LSP.Types.StaticRegistrationOptions
import Language.LSP.Typ... | alanz/haskell-lsp | lsp-types/src/Language/LSP/Types/SelectionRange.hs | mit | 1,753 | 0 | 9 | 231 | 275 | 159 | 116 | 35 | 0 |
-- |
-- Description : The convinience module to re-export public definitions
-- Copyright : (c) 2015 Egor Tensin <Egor.Tensin@gmail.com>
-- License : MIT
-- Maintainer : Egor.Tensin@gmail.com
-- Stability : experimental
-- Portability : Windows-only
--
-- An empty module to re-export everything required by the... | egor-tensin/windows-env | src/WindowsEnv.hs | mit | 445 | 0 | 5 | 78 | 27 | 21 | 6 | 3 | 0 |
module Data.Wright.Types where
import Data.Vector (Vector(..), vmap)
data XYZ t = XYZ t t t deriving (Show)
data LAB t = LAB t t t deriving (Show)
data RGB t = RGB t t t deriving (Show)
data Yxy t = Yxy t t t deriving (Show) -- "xyY"
type ℝ = Double
data Gamma = Gamma ℝ | LStar | SRGB
data Application = Graphics |... | fmap-archive/wright | src/Data/Wright/Types.hs | mit | 1,149 | 0 | 9 | 298 | 497 | 283 | 214 | 41 | 1 |
module System.LookupEnv (lookupEnv) where
import System.Environment (getEnvironment)
lookupEnv :: String -> IO (Maybe String)
lookupEnv envVar = fmap (lookup envVar) $ getEnvironment
| yesodweb/clientsession | src/System/LookupEnv.hs | mit | 185 | 0 | 8 | 24 | 60 | 32 | 28 | 4 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
-- | Perform a build
module Stack.Build.Execute... | rubik/stack | src/Stack/Build/Execute.hs | bsd-3-clause | 66,832 | 0 | 35 | 25,642 | 14,204 | 7,104 | 7,100 | -1 | -1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
module Numeric.Units.Dimensional.Test where
import Numeric.Units.Dimensional.Prelude
import qualified Prelude
import Test.HUnit
testPower = TestLabel "Power test" $ TestList
[ TestCase $ (9 *~ one) @=? (3 *~ one) ^ pos2
, TestCase $ (1 *~ one) @=? (12.1231 *~ one) ^... | bjornbm/dimensional-classic | Numeric/Units/Dimensional/Test.hs | bsd-3-clause | 1,009 | 0 | 16 | 241 | 351 | 192 | 159 | 22 | 1 |
import Data.Attoparsec.ByteString.Char8
import qualified Data.ByteString.Lazy as BL
import Options.Applicative (execParser)
import System.IO (hPutStrLn, stdout, stderr)
import CSV
import CommandLineArgs
import File
import Parse.Log
import Types
chooseParsingFunction :: CommandLineOpts -> (Parser LogEntry)
choosePars... | safarijv/ncsa-logparse | src/Main.hs | bsd-3-clause | 793 | 0 | 10 | 119 | 235 | 118 | 117 | 26 | 2 |
module Lib
( someFunc
) where
someFunc :: IO ()
someFunc = putStrLn "someFunc"
| erantapaa/parse-complex | src/Lib.hs | bsd-3-clause | 89 | 0 | 6 | 24 | 27 | 15 | 12 | 4 | 1 |
module Main where
import Graphics.UI.Gtk
import System.Glib.Signals (on)
import Data.List ( isPrefixOf )
import Data.Char ( toLower )
data Phone = Phone { name :: String, number :: Int, marked :: Bool }
main = do
initGUI
win <- windowNew
onDestroy win mainQuit
-- create a new list model
model <- listStor... | phischu/gtk2hs | gtk/demo/treelist/ListDemo.hs | lgpl-3.0 | 2,001 | 0 | 16 | 391 | 589 | 289 | 300 | 46 | 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="sl-SI">
<title>Server-Sent Events | ZAP Extension</title>
<maps>
<homeID>top</homeID>
... | 0xkasun/security-tools | src/org/zaproxy/zap/extension/sse/resources/help_sl_SI/helpset_sl_SI.hs | apache-2.0 | 980 | 85 | 53 | 160 | 402 | 212 | 190 | -1 | -1 |
{-
Some tests to verify that serialisation works as expected
-}
module AllTests(tests)
where
import GHC.Packing
import qualified Data.Array.IArray as A
import Control.Concurrent
import System.Environment
import System.IO
import System.Directory
import qualified Data.ByteString as B
import Control.Exception
imp... | ajnsit/packman | Test/AllTests.hs | bsd-3-clause | 3,030 | 0 | 13 | 933 | 882 | 466 | 416 | 67 | 2 |
--------------------------------------------------------------------------------
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
module Hakyll.Check
( Check (..)
, check
) where
--------------------------------------------------------------------------------
import Control.... | Minoru/hakyll | src/Hakyll/Check.hs | bsd-3-clause | 9,141 | 0 | 21 | 2,443 | 2,008 | 1,071 | 937 | 120 | 3 |
module PackageTests.ReexportedModules.Check where
import Data.Version
import PackageTests.PackageTester
import System.FilePath
import Test.Tasty.HUnit
import Data.Maybe
import Data.List
import Control.Monad
import Data.Char
import Text.ParserCombinators.ReadP
orFail :: String -> [(a, String)] -> a
orFail err r = case... | corngood/cabal | Cabal/tests/PackageTests/ReexportedModules/Check.hs | bsd-3-clause | 1,220 | 0 | 20 | 391 | 350 | 187 | 163 | 35 | 2 |
{-# LANGUAGE ScopedTypeVariables, JavaScriptFFI, ForeignFunctionInterface #-}
module Main where
import Prelude hiding (print, putStrLn)
import Control.Concurrent
import Control.Concurrent.MVar
import Control.Exception
import Control.Monad
import Data.List (intersperse)
import GHCJS.Types
import GHCJS.Concurrent
im... | seereason/ghcjs | test/conc/syncThreads.hs | mit | 4,442 | 6 | 16 | 1,059 | 1,131 | 524 | 607 | 141 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleContexts, GADTs #-}
module FDsFromGivens2 where
class C a b | a -> b where
cop :: a -> b -> ()
data KCC where
KCC :: C Char Char => () -> KCC
f :: C Char [a] => a -> a
f = undefined
bar :: KCC -> a -> a
bar (KCC _) = f
| ezyang/ghc | testsuite/tests/typecheck/should_fail/FDsFromGivens2.hs | bsd-3-clause | 297 | 0 | 9 | 72 | 114 | 62 | 52 | 10 | 1 |
{-# Language TypeFamilies #-}
{-# Language GeneralizedNewtypeDeriving #-}
module Main where
import RegExp.AST
import RegExp.Match (match)
import RegExp.BackMatch (backMatch)
import RegExp.Parser (parseRegExp)
import Ersatz
import Booleans
import Control.Monad
import Data.Char
import Data.List (intersperse)
im... | glguy/5puzzle | RegExp.hs | isc | 6,026 | 0 | 14 | 1,569 | 2,933 | 1,758 | 1,175 | 111 | 2 |
module Bowling (score, BowlingError(..)) where
data BowlingError = IncompleteGame
| InvalidRoll { rollIndex :: Int, rollValue :: Int }
deriving (Eq, Show)
score :: [Int] -> Either BowlingError Int
score rolls = error "You need to implement this function."
| exercism/xhaskell | exercises/practice/bowling/src/Bowling.hs | mit | 279 | 0 | 8 | 62 | 79 | 46 | 33 | 6 | 1 |
{-# LANGUAGE Safe #-}
{-# LANGUAGE DoAndIfThenElse #-}
module Control.Concurrent.Singular.Event.Primitive (
Event (), newEvent, always, sync
) where
import Control.Concurrent.Singular.Event.Status
import Data.List.Util
import Control.Concurrent.MVar (newEmptyMVar, putMVar, takeMVar)
import Control.Monad (unless)... | YellPika/Hannel | src/Control/Concurrent/Singular/Event/Primitive.hs | mit | 1,667 | 0 | 17 | 445 | 643 | 333 | 310 | 46 | 3 |
{-# LANGUAGE TypeOperators #-}
import Numeric.Noise.Perlin
import System.Random (randomIO,randomIO,randomRs,newStdGen,mkStdGen)
import Graphics.Gloss
import Graphics.Gloss.Data.Color (makeColor8)
import qualified Data.Array.Repa as R
type Seed = Int
rangeMap :: (Ord a) => b -> [(a,b)] -> a -> b
rangeMap def rs x = c... | RTS2013/RTS | tests/mapGeneration_test/PerlinNoise/HaskellPerlin.hs | mit | 2,801 | 0 | 22 | 1,089 | 1,036 | 551 | 485 | 52 | 2 |
module Data.BigBunnyAndDeer.DeerInfo
( findDeerEntry
, updateDeerInfo
, writeDeerInfo
, parseRawDeerInfo
, fetchDeerInfo
) where
import Data.Maybe
import Control.Arrow
import Control.Monad.IO.Class
import System.Directory
import qualified System.IO.Strict as SIO
import qualified Data.IntMap as IM
import Da... | Javran/BigBunnyAndDeer | src/Data/BigBunnyAndDeer/DeerInfo.hs | mit | 1,674 | 0 | 13 | 316 | 532 | 283 | 249 | 48 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module System.Directory.Watchman.Expression
( Expression
, renderExpression
, true
, false
, System.Directory.Watchman.Expression.all
, System.Directory.Watchman.Expression.any
, (.&&)
, (.||)
, dirname
, dirname'
, empty
, exists
... | bitc/hs-watchman | src/System/Directory/Watchman/Expression.hs | mit | 8,617 | 0 | 15 | 1,560 | 2,417 | 1,292 | 1,125 | 265 | 7 |
module Problem7 ( flattenList, NestedList(..) ) where
data NestedList a = Elem a | List [NestedList a]
flattenList :: NestedList a -> [a]
flattenList (Elem a) = [a]
flattenList (List a) = concatMap flattenList a | chanind/haskell-99-problems | Problem7.hs | mit | 213 | 0 | 8 | 36 | 88 | 49 | 39 | 5 | 1 |
module Sudoku.Strategy.HiddenSingle where
import Prelude
import Sudoku
import Sudoku.Strategy
import Data.List
concatRowCandidates :: Sudoku -> Int -> String
concatRowCandidates su i = concat [ findCandidates su i j | j<-[0..(columnCount su - 1)] ]
concatColumnCandidates :: Sudoku -> Int -> String
concatColumnCandid... | thomasbrus/sudoku-solver | src/Sudoku/Strategy/HiddenSingle.hs | mit | 2,092 | 0 | 13 | 622 | 766 | 395 | 371 | 38 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module TypePlay.Check.SimplyTyped where
import Prelude hiding (map,foldl,elem)
import Data.List (map,foldl,(\\),union,elem)
import Data.Text (Text)
import qualified Data.Text as T
import Control.Monad (when)
import Control.Monad.Trans.Error (throwError)
import Data.Monoid ((<>))
t... | mankyKitty/TypePlay | src/TypePlay/Check/SimplyTyped.hs | mit | 4,823 | 40 | 15 | 1,397 | 1,505 | 790 | 715 | 92 | 7 |
{-# LANGUAGE OverloadedStrings #-}
import System.Environment
import Globals
import ProcessChain
main :: IO ()
main = do
args <- getArgs
case args of
[] -> statsOn gDefaultUniverse
u:_ -> statsOn u
| mihaimaruseac/petulant-octo-avenger | src/Main.hs | mit | 212 | 0 | 10 | 46 | 66 | 33 | 33 | 10 | 2 |
{-
This file handles the passing of parameters and manages things to do with
the fields within a header comment.
Author(s): Lewis Deane
License: MIT
Last Modified: 20/7/2016
-}
module FieldTools (getFields) where
import Control.Applicative
import Data.List (isPrefi... | lewisjdeane/Comet | FieldTools.hs | mit | 7,335 | 0 | 19 | 2,676 | 1,691 | 893 | 798 | 104 | 4 |
-- |
-- The types and functions are trivial and self-descriptive,
-- hence this sentence is the sole documentation you get on them.
module Success.Pure
(
Success,
-- * Creation
nothing,
failure,
success,
-- * Execution
asEither,
asMaybe,
)
where
import Prelude
import Data.Foldable
import Data.Traversab... | nikita-volkov/success | library/Success/Pure.hs | mit | 1,387 | 0 | 13 | 310 | 417 | 226 | 191 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Static (mkEmbedded) where
import Crypto.Hash.MD5 (hashlazy)
import qualified Data.ByteString.Base64 as B64
import qualified Data.ByteString.Lazy as BL
import qualified Data.Text as T
import qualified Data.Text.Encodi... | bitemyapp/hterm | Static.hs | mit | 1,326 | 0 | 12 | 410 | 310 | 188 | 122 | 29 | 1 |
add (x,y) = x + y
add' x y = x + y
second xs = head (tail xs)
swap (x, y) = (y, x)
pair x y = (x, y) -- a -> b -> (a, b)
double x = x * 2 -- Num a => a -> a
palindrome xs = reverse xs == xs
-- How is the type of this function determined?
twice f x = f (f x) -- (a -> a) -> a -> a
f xs = take 3 (reverse xs)
| jugalps/edX | FP101x/week2/week2.hs | mit | 314 | 0 | 7 | 96 | 156 | 81 | 75 | 9 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Application
( getApplicationDev
, appMain
, develMain
, makeFoundation
-- * for DevelMain
, getApplicationRepl
, shutdownApp
-- * for GHCI
, handler
, db
) where
import Control.Monad.Logger (liftLoc, runLoggingT)
i... | total-git/missingno | yesodMissingNo/Application.hs | mit | 6,654 | 0 | 16 | 1,722 | 1,019 | 545 | 474 | -1 | -1 |
-- Copyright (C) 2008 Diego Souza <paravinicius@yahoo.com.br>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--... | dgvncsz0f/boats | src/main/haskell/Battleship/Environment.hs | gpl-2.0 | 1,766 | 0 | 13 | 401 | 175 | 111 | 64 | 8 | 1 |
{-#LANGUAGE FlexibleContexts #-}
module Carnap.Calculi.NaturalDeduction.Parser.Hardegree (toProofTreeHardegree, toDeductionHardegree)
where
import Data.Tree
import Data.Typeable
import Data.List (findIndex)
import Text.Parsec
import Carnap.Core.Data.Types
import Carnap.Calculi.Util
import Carnap.Calculi.NaturalDeducti... | opentower/carnap | Carnap/src/Carnap/Calculi/NaturalDeduction/Parser/Hardegree.hs | gpl-3.0 | 5,564 | 0 | 19 | 1,999 | 1,353 | 680 | 673 | 76 | 9 |
{-# LANGUAGE Arrows, ScopedTypeVariables #-}
module Mescaline.Synth.SSF.DiskSampler
where
import Control.Applicative
import Control.Arrow
import Control.CCA.Types
import Data.Accessor ((^.))
import qualified Data.Foldable as Fold
import qualified Data.IntMap as Map
import ... | kaoskorobase/mescaline | lib/mescaline/Mescaline/Synth/SSF/DiskSampler.hs | gpl-3.0 | 11,868 | 3 | 21 | 3,638 | 3,081 | 1,699 | 1,382 | 186 | 3 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.AnalyticsReporting.Types
-- Copyright : (c) 2015-2016 ... | brendanhay/gogol | gogol-analyticsreporting/gen/Network/Google/AnalyticsReporting/Types.hs | mpl-2.0 | 9,799 | 0 | 7 | 2,617 | 1,170 | 811 | 359 | 323 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ViewPatterns #-}
-- Module : Network.AWS.Auth
-- Copyright : (c) 2013 Brendan Hay <brendan.g.hay@gmail.com>
-- License : This Source Code Form is subject to the terms of
-- ... | brendanhay/amazonka-limited | src/Network/AWS/Auth.hs | mpl-2.0 | 5,104 | 0 | 14 | 1,378 | 1,070 | 572 | 498 | 81 | 5 |
{-# 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/RegionDisks/SetIAMPolicy.hs | mpl-2.0 | 4,444 | 0 | 18 | 1,039 | 549 | 326 | 223 | 90 | 1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE FlexibleInstances, FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
-- ** `Practical' denotational semantics
module Tutorial1_Orig where
-- Consider a small subset of Haskell
-- (or a pure functional subset of other suitable language)
-- as an `executable Math'
-- ... | haroldcarr/learn-haskell-coq-ml-etc | haskell/conference/2017-09-cufp-effects/src/Tutorial1_Orig.hs | unlicense | 2,612 | 0 | 11 | 685 | 324 | 179 | 145 | 21 | 1 |
{-
Copyright (c) Facebook, Inc. and its affiliates.
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 ... | facebook/fbthrift | thrift/lib/hs/Thrift/Transport/Handle.hs | apache-2.0 | 3,315 | 0 | 13 | 632 | 467 | 266 | 201 | 37 | 2 |
module CourseStitch.Models (
module CourseStitch.Models.Tables,
module CourseStitch.Models.Types,
module CourseStitch.Models.RunDB,
module CourseStitch.Models.Queries,
module CourseStitch.Models.Models
) where
import CourseStitch.Models.Tables
import CourseStitch.Models.Types
import CourseStitch.Mo... | coursestitch/coursestitch-api | lib/CourseStitch/Models.hs | apache-2.0 | 400 | 0 | 5 | 46 | 73 | 50 | 23 | 11 | 0 |
{-# LANGUAGE TupleSections #-}
module Handler.DownloadFeeds where
import qualified Data.Text as T
import Data.Maybe
import Data.Time (getCurrentTimeZone)
import Data.Default (def)
import Blaze.ByteString.Builder
import qualified Model
import Import
typeTorrent :: T.Text
typeTorrent = "application/x-bittorrent"
nsA... | jannschu/bitlove-ui | Handler/DownloadFeeds.hs | bsd-2-clause | 7,345 | 0 | 18 | 2,430 | 1,328 | 695 | 633 | -1 | -1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
--
-- Copyright (c) 2009-2011, ERICSSON AB
-- All rights reserved.
--
-- Redistribution a... | rCEx/feldspar-lang-small | src/Feldspar/Core/Constructs/Tuple.hs | bsd-3-clause | 14,139 | 0 | 17 | 4,712 | 6,067 | 3,010 | 3,057 | 284 | 1 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.KHR.ParallelShaderCompile
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Po... | haskell-opengl/OpenGLRaw | src/Graphics/GL/KHR/ParallelShaderCompile.hs | bsd-3-clause | 813 | 0 | 5 | 105 | 62 | 46 | 16 | 10 | 0 |
{-# LANGUAGE OverloadedStrings #-}
import Language.Swift.Quote.Syntax
import Language.Swift.Quote.Pretty
import Control.Arrow (left, right)
import Language.Swift.Quote.Parser
import qualified Data.ByteString.Lazy.Char8 as C
import Data.Either
import qualified Data.Text.Lazy as L
import qualified Data.Text as T
impor... | steshaw/language-swift-quote | tests/unit/Main.hs | bsd-3-clause | 15,523 | 0 | 34 | 2,460 | 5,015 | 2,558 | 2,457 | 234 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Network.Socks5
import Network.Socks5.Types
import Network.Socks5.Lowlevel
import Network.Socket hiding (recv, recvFrom, sendTo)
import Network.Socket.ByteString
import Control.Concurrent
import Data.List (find)
import Data.Foldable (for_)
import Data.Serializ... | glguy/s5s | Main.hs | bsd-3-clause | 14,540 | 0 | 28 | 3,153 | 4,201 | 2,017 | 2,184 | 269 | 5 |
{-# LANGUAGE ScopedTypeVariables, DeriveDataTypeable #-}
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as BC
import Data.Typeable
import Control.Concurrent (forkIO, myThreadId, threadDelay)
import qualified Control.Exception as E
import Control.Exception (Exception, IOException, throwTo)
... | pcapriotti/pipes-extra | examples/finalizers/simple.hs | bsd-3-clause | 3,698 | 0 | 15 | 768 | 806 | 417 | 389 | 67 | 1 |
module Main where
import Zice
main = do
ziceMain
| zachk/zice | src/Main.hs | bsd-3-clause | 57 | 0 | 6 | 17 | 15 | 9 | 6 | 4 | 1 |
import Data.List
data EncodeType a = Single a | Multiple Int a deriving (Show)
encode lst = map (\ x -> (length x, head x)) (Data.List.group lst)
encodeModified :: Eq a => [a] -> [EncodeType a]
encodeModified = map help . encode
where
help (1, x) = Single x
help (n, x) = Multiple n x
decodeModified... | m00nlight/99-problems | haskell/p-12.hs | bsd-3-clause | 462 | 0 | 9 | 118 | 219 | 115 | 104 | 11 | 2 |
module Main where
import Finance.Quote.Yahoo
import Data.Time.Calendar
import Data.Map
quoteSymbolList = ["YHOO"] :: [QuoteSymbol]
quoteFieldsList = ["s","l1","c"] :: [QuoteField]
main = do
q <- getQuote quoteSymbolList quoteFieldsList
case q of
Nothing -> error "no map"
Just m -> case (Data.Map.lookup (... | bradclawsie/haskell-Finance.Quote.Yahoo | quotes.hs | bsd-3-clause | 727 | 0 | 13 | 165 | 245 | 125 | 120 | 20 | 4 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS -fno-warn-name-shadowing #-}
-- | Track clocking in and out of work.
module Clockin where
import Control.Monad
import Control.Monad.... | chrisdone/clockin | src/Clockin.hs | bsd-3-clause | 12,791 | 0 | 23 | 4,029 | 3,463 | 1,831 | 1,632 | 309 | 4 |
module Data.Text.Aux where
import Control.Monad (liftM2)
import qualified Data.Text as T (Text, append, cons, intercalate, lines, pack, snoc, unlines, unwords, words)
import Language.C.Pretty (Pretty, pretty)
import Data.Text.Lazy (toStrict)
import Data.Text.Lazy.Builder (toLazyText)
import Data.Text.Lazy.Builder.Int ... | michaeljklein/CPlug | src/Data/Text/Aux.hs | bsd-3-clause | 2,199 | 0 | 11 | 392 | 589 | 347 | 242 | 33 | 1 |
--
-- Types.hs
-- Copyright (C) 2017 jragonfyre <jragonfyre@jragonfyre>
--
-- Distributed under terms of the MIT license.
--
module Game.Types where
--(
--) where
import qualified Data.HashMap.Lazy as M
import qualified Data.Yaml as Y
import Data.Yaml (FromJSON (..), (.:), (.!=), (.:?), (.=), ToJSON (..))
import ... | jragonfyre/TRPG | src/Game/Types.hs | bsd-3-clause | 3,090 | 0 | 20 | 622 | 730 | 422 | 308 | 71 | 0 |
module Main where
import qualified Data.ByteString.Lazy as LazyBS
import Data.Time.Clock
import Data.Time.Format
import Data.Time.LocalTime
import System.IO
--import System.Locale
import CSVPlayer
import Types
import NameCluster
import NameGender
import OptApplicative
import Utils
-- |Clusterifies the specifed names... | Tydax/ou-sont-les-femmes | app/OuSontLesFemmes.hs | bsd-3-clause | 3,360 | 0 | 12 | 653 | 676 | 348 | 328 | -1 | -1 |
{-# LANGUAGE QuasiQuotes #-}
module AltParsing where
import Control.Applicative
import Text.Trifecta
import Text.RawString.QQ
type NumberOrString = Either Integer String
a = "blah"
b = "123"
c = "123blah789"
eitherOr :: String
eitherOr = [r|
123
abc
456
def
|]
parseNos :: Parser NumberOrString
parseNos = do
skip... | chengzh2008/hpffp | src/ch24-Parser/altParsing.hs | bsd-3-clause | 751 | 0 | 11 | 142 | 259 | 129 | 130 | 25 | 1 |
{-# LANGUAGE PatternGuards, RecordWildCards #-}
module Website where
import Data.Char (toLower)
import Data.Function (on)
import Data.List (find, groupBy, nub, sort)
import Data.Version (showVersion, versionBranch)
import Development.Shake
import Text.Hastache
import Text.Hastache.Context
import Dirs
import Paths
im... | gbaz/haskell-platform | hptool/src/Website.hs | bsd-3-clause | 6,097 | 0 | 15 | 1,551 | 1,950 | 997 | 953 | 131 | 10 |
module Karamaan.Plankton.Date where
import Data.Time.Calendar (Day, addDays, fromGregorian, toGregorian)
import Data.Time.LocalTime (ZonedTime, zonedTimeToLocalTime, getZonedTime, localDay)
import Data.Time.Format (formatTime)
import System.Locale (defaultTimeLocale)
import qualified Data.Time.Parse
import qualified D... | karamaan/karamaan-plankton | Karamaan/Plankton/Date.hs | bsd-3-clause | 2,680 | 0 | 12 | 384 | 632 | 356 | 276 | 54 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.