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 ManyConstructs where
-- Check whether we can compile these constructs
-- without (most of) the Prelude.
-- Can't test this anymore because import lists are forbidden...
-- import Prelude((>), (+), unsafePerformIO, putChar) -- , dictNumInt, dictOrdInt)
data A = A Int String
deriving Show
main :: ([I... | Helium4Haskell/helium | test/correct/ManyConstructs.hs | gpl-3.0 | 744 | 0 | 12 | 184 | 226 | 135 | 91 | 12 | 1 |
{-# LANGUAGE ImplicitParams #-}
------------------------------------------------------------------------------------------------
-- |
-- Module : Pearl.GaDtTLHT.Internal.Hom3D
-- Description : Homs and Unhoms
-- Copyright : (c) Drew Day 2012
-- (c) Shin-Cheng Mu ... | technogeeky/centered | src/Pearl/GaDtTLHT/Internal/Hom3D.hs | gpl-3.0 | 1,069 | 0 | 14 | 360 | 264 | 147 | 117 | 11 | 1 |
{-# LANGUAGE DeriveDataTypeable, RecursiveDo, OverloadedStrings #-}
module InnerEar.Widgets.Navigation (navigationWidget) where
import Control.Monad
import Control.Monad.IO.Class (liftIO)
import Reflex
import Reflex.Dom
import Data.Time.Clock (getCurrentTime)
import Text.JSON
import Text.JSON.Generic
import Data.Maybe... | JamieBeverley/InnerEar | src/InnerEar/Widgets/Navigation.hs | gpl-3.0 | 7,455 | 0 | 17 | 930 | 1,879 | 969 | 910 | 133 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Db where
import Model
import Render()
import Data.Aeson (encode, decode)
import Data.Int
import Data.Maybe (listToMaybe)
import Data.String
import Data.List (sortOn)
import Control.Monad
import Control.Monad.IO.Class
import Database.SQ... | opqdonut/nikls | src/Db.hs | gpl-3.0 | 3,513 | 0 | 13 | 696 | 997 | 494 | 503 | 83 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Control.Monad
-- import Control.Monad.IO.Class
import Control.Concurrent (MVar, forkIO,
threadDelay)
import Databas... | ProLambda/Times | Main.hs | gpl-3.0 | 4,378 | 0 | 32 | 1,356 | 1,318 | 720 | 598 | 100 | 1 |
module Polymorph(main)
where
import Shape
import Circle
import Rectangle
main =
do
-- handle the shapes polymorphically
drawloop scribble
-- handle rectangle specific instance
draw (setWidth arectangle 30)
where
-- create some s... | ckaestne/CIDE | CIDE_Language_Haskell/test/t.hs | gpl-3.0 | 785 | 0 | 10 | 292 | 162 | 83 | 79 | 18 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-billing/gen/Network/Google/Resource/CloudBilling/Services/SKUs/List.hs | mpl-2.0 | 7,815 | 0 | 21 | 1,859 | 1,152 | 666 | 486 | 164 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-datapipeline/gen/Network/AWS/DataPipeline/SetTaskStatus.hs | mpl-2.0 | 5,486 | 0 | 9 | 1,211 | 633 | 384 | 249 | 73 | 1 |
{-# OPTIONS_GHC -Wall #-}
module SieveSundaram where
cartProd :: [a] -> [(a, a)]
cartProd xs = [(x,y) | x <- xs, y <- xs]
sieveSundaram :: Integer -> [Integer]
sieveSundaram = map ((+1) . (*2)) . filter valid
. enumFromTo 1
valid :: Integer -> Bool
valid x = not . any (\(i,j) -> i... | spanners/cis194 | 04-higher-order/sieveSundaram.hs | unlicense | 396 | 0 | 15 | 122 | 193 | 107 | 86 | 10 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Openshift.V1.Project where
import GHC.Generics
import Data.Text
import Kubernetes.V1.ObjectMeta
import Openshift.V1.ProjectSpec
import Openshif... | minhdoboi/deprecated-openshift-haskell-api | openshift/lib/Openshift/V1/Project.hs | apache-2.0 | 1,325 | 0 | 9 | 200 | 141 | 86 | 55 | 21 | 0 |
module WaTor.Graphics
( render
) where
import Data.Maybe
import Graphics.Gloss
import WaTor.Types
import WaTor.Utils
import WaTor.Vector
render :: Simulation -> IO Picture
render (Simulation _ extent scaleBy (WaTor _ wator)) =
return . uncurry translate... | erochest/wa-tor | src/WaTor/Graphics.hs | apache-2.0 | 1,592 | 0 | 14 | 616 | 657 | 328 | 329 | 39 | 2 |
-- http://www.codewars.com/kata/53f40dff5f9d31b813000774
module RecoverSecretFromTriplets where
import Data.List ((\\), nub)
recoverSecret :: [String] -> String
recoverSecret triplets = recoverSecret' pairs where
pairs = nub $ concatMap (\[a,b,c] -> [(a,b), (b,c)]) triplets
recoverSecret' [] = []
recoverSe... | Bodigrim/katas | src/haskell/4-Recover-a-secret-string-from-random-triplets.hs | bsd-2-clause | 483 | 0 | 15 | 90 | 219 | 123 | 96 | 9 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Text.Megaparsec.Byte.LexerSpec (spec) where
import Control.Applicative
import Data.ByteString (ByteString)
import Data.Char (toUpper)
import Data.Monoid ((<>))
import Data.Scientific (Scientific, fromFloatDigits)
import Data.Void
import Data.Word (Word8)
import Numeric (showI... | recursion-ninja/megaparsec | tests/Text/Megaparsec/Byte/LexerSpec.hs | bsd-2-clause | 10,071 | 22 | 20 | 3,313 | 3,087 | 1,520 | 1,567 | 241 | 3 |
-- required Cabal == 0.14.*
{-# LANGUAGE CPP, ExistentialQuantification, ScopedTypeVariables #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.TestSuite.QuickCheck2
-- Copyright : Thomas Tuegel 2010
--
-- Maintainer : ttuegel@gmail.com
-- Portabil... | griba2001/haskell-binaryrep-radix-sort | test/detailed/Distribution/TestSuite/QuickCheck2.hs | bsd-2-clause | 5,637 | 3 | 19 | 1,569 | 926 | 516 | 410 | 59 | 1 |
module Main where
import qualified Data.IntMap as IntMap
import Data.IntMap (IntMap)
import Control.Arrow
import Data.Char
digits = [ "zero"
, "one"
, "two"
, "three"
, "four"
, "five"
, "six"
, "seven"
, "eight"
... | wangbj/leet | q423.hs | bsd-2-clause | 1,527 | 0 | 17 | 555 | 619 | 327 | 292 | 41 | 5 |
{-# LANGUAGE OverloadedStrings #-}
import Network
import qualified Data.ByteString as S
main :: IO ()
main = do
h <- connectTo "www.stackage.org" $ PortNumber 80
S.hPut h "GET / HTTP/1.1\r\nHost: www.stackage.org\r\n\r\n"
S.hGetSome h 4096 >>= print
| codygman/network-bug-debugging | src/Main.hs | bsd-3-clause | 263 | 0 | 9 | 49 | 69 | 34 | 35 | 8 | 1 |
{-|
Module : Network.Kademlia.Protocol
Description : Implementation of the actual protocol
Network.Kademlia.Protocol implements the parsing and serialisation of
ByteStrings into 'Protocol'-Values.
-}
module Network.Kademlia.Protocol
( serialize
, parse
) where
import qualified Data.ByteString as B
i... | froozen/kademlia | src/Network/Kademlia/Protocol.hs | bsd-3-clause | 2,098 | 0 | 10 | 507 | 601 | 325 | 276 | 38 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
----------------------------------------------------------------------------
-- |
-- Module : Control.Lens.Fold
-- Cop... | Icelandjack/lens | src/Control/Lens/Fold.hs | bsd-3-clause | 91,285 | 0 | 17 | 21,300 | 11,590 | 6,876 | 4,714 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE LambdaCase #-}
module Main where
import Tut
import Tut.Pandoc
import Tut.Misc
import Tut.Json
import Tut.Repl
import System.Directory
import System.FilePath
myFileTransform
:: ( MonadError... | aaronvargo/htut | app/Main.hs | bsd-3-clause | 1,091 | 0 | 14 | 240 | 300 | 153 | 147 | 41 | 1 |
-- | The account tree report.
module Penny.Acctree where
import qualified Control.Lens as Lens
import Data.Foldable (foldl')
import Data.Sequence (Seq)
import qualified Data.Sequence as Seq
import qualified Data.Map as Map
import qualified Data.Text as X
import Penny.Account
import Penny.Balance
import Penny.BalanceM... | massysett/penny | penny/lib/Penny/Acctree.hs | bsd-3-clause | 2,153 | 0 | 13 | 437 | 576 | 308 | 268 | 72 | 2 |
module Wrecker.RunnerSpec where
-- import Wrecker.Runner
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "Runner" $ do
it "updateSampler correctly adds event" $ do
pending
it "collectEvent collects all events until the recorder stops" $ do
pending
it "runWith works" $ do
... | skedgeme/wrecker | test/Wrecker/RunnerSpec.hs | bsd-3-clause | 331 | 0 | 10 | 71 | 86 | 41 | 45 | 12 | 1 |
module Parser(
loadLuaChunk, LuaBinaryFile(..), LuaString(..), LuaHeader(..), LuaFunctionHeader(..),
LuaInstructionList(..), LuaConst(..), LuaConstList(..), LuaFunctionList(..),
LuaInstructionPositionList(..), LuaLocalList(..), LuaUpvalueList(..), getTopFunction,
getIndexedFunction) where
import Data.Word
im... | AndreasPK/yalvm | src/Parser.hs | bsd-3-clause | 7,846 | 6 | 14 | 1,558 | 2,152 | 1,112 | 1,040 | 204 | 4 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
import Control.Natural
import Control.Remote.Monad (RemoteMonad)
im... | ku-fpg/remote-binary | example/Main.hs | bsd-3-clause | 6,323 | 0 | 18 | 2,649 | 1,618 | 778 | 840 | 137 | 2 |
{-# LANGUAGE LambdaCase, ViewPatterns #-}
import Control.Arrow
import Data.List
import Data.Map (Map)
import qualified Data.Map as Map
import Parser
import Rules
type RightProduct = (Expression, Maybe Nonterm)
type RightExpression = [RightProduct]
type RightRule = (Nonterm, RightExpression)
type RightRules = Map Nont... | abbradar/comps | src/Lab1.hs | bsd-3-clause | 2,338 | 0 | 15 | 586 | 869 | 455 | 414 | 52 | 4 |
-- |
-- interface to the HXT XML and DTD parsers
--
-- version: $Id: ParserInterface.hs,v 1.1 2006/05/01 18:56:24 hxml Exp $
module Yuuko.Text.XML.HXT.Arrow.ParserInterface
( module Yuuko.Text.XML.HXT.Arrow.ParserInterface )
where
import Control.Arrow
import Yuuko.Control.Arrow.ArrowList
import Yuuko.Control.Arro... | nfjinjing/yuuko | src/Yuuko/Text/XML/HXT/Arrow/ParserInterface.hs | bsd-3-clause | 4,579 | 109 | 13 | 742 | 995 | 556 | 439 | 73 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
----------------------------------------------------------------------
-- |
-- Module : Test.QuickCheck.Classes
-- Cop... | bitemyapp/checkers | src/Test/QuickCheck/Classes.hs | bsd-3-clause | 19,699 | 0 | 13 | 7,053 | 6,714 | 3,636 | 3,078 | -1 | -1 |
import Test.Framework (defaultMain, testGroup)
import Test.Framework.Providers.HUnit
import Test.HUnit
import Common.Math
-- TODO: write property tests
testWikiHamming1 = assertEqual
"Hamming distance between 'karolin' and 'kathrin' is 3."
3 (hammingDist "karolin" "kathrin")
testWikiHamming2 = assertEqual
... | hawkw/haskell-common | test/Spec.hs | bsd-3-clause | 966 | 0 | 8 | 214 | 173 | 87 | 86 | 22 | 1 |
-- | See "Control.Monad.Except".
module Control.Monad.Ether.Except
(
-- * MonadExcept class
MonadExcept(..)
-- * The Except monad
, Except
, runExcept
-- * The ExceptT monad transformer
, ExceptT
, exceptT
, runExceptT
-- * Handle functions
, handleT
, handle
... | bitemyapp/ether | src/Control/Monad/Ether/Except.hs | bsd-3-clause | 848 | 0 | 9 | 198 | 223 | 128 | 95 | 17 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module :
-- Copyright : (c) 2012 Boyun Tang
-- License : BSD-style
-- Maintainer : tangboyun@hotmail.com
-- Stability : experimental
-- Portability : ghc
--
--
--
---------------------------------------------------------------------... | tangboyun/bio-web-api | Bio/Web/Internal/Patiently.hs | bsd-3-clause | 1,092 | 0 | 19 | 328 | 248 | 135 | 113 | 25 | 3 |
{-# LANGUAGE GeneralizedNewtypeDeriving, TypeFamilies, MultiParamTypeClasses, DeriveDataTypeable, FlexibleInstances #-}
-- | Strict version of "Data.Vector". The representation is identical, but all elements of the vector are guaranteed to be (not necessarily deeply) evaluated. Useful for avoiding space leaks.
--
-- N... | reinerp/vector-derive | Data/Vector/Strict.hs | bsd-3-clause | 3,101 | 0 | 10 | 599 | 808 | 443 | 365 | 61 | 1 |
module Sexy.Instances.Plus.Function () where
import Sexy.Classes (Plus(..))
instance (Plus b) => Plus (a -> b) where
f + g = \x -> f x + g x
| DanBurton/sexy | src/Sexy/Instances/Plus/Function.hs | bsd-3-clause | 146 | 0 | 8 | 32 | 75 | 42 | 33 | 4 | 0 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
module Language.Rsc.Typecheck.Unify (
unifys
, unassigned
, Unif
) where
import Control.Monad ... | UCSD-PL/RefScript | src/Language/Rsc/Typecheck/Unify.hs | bsd-3-clause | 8,101 | 0 | 14 | 2,484 | 2,963 | 1,503 | 1,460 | 150 | 8 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
-- | Chris Done's style.
--
-- Documented here: <https://github.com/chrisdone/haskell-style-guide>
module HIndent.Styles.ChrisDone where
import HIndent.Pretty
import HIndent.Comments
import HIndent.Types
import Control.Monad
import Control.Monad.L... | eigengrau/hindent | src/HIndent/Styles/ChrisDone.hs | bsd-3-clause | 15,309 | 0 | 24 | 5,678 | 4,095 | 2,028 | 2,067 | 383 | 11 |
-- |
-- Module : Rwl.Skel
-- Description : Description
-- Copyright : 2014, Peter Harpending.
-- License : BSD3
-- Maintainer : Peter Harpending <pharpend2@gmail.com>
-- Stability : experimental
-- Portability : archlinux
--
module Rwl.Skel where
| pharpend/eros-http | skel/Skel.hs | bsd-3-clause | 269 | 0 | 3 | 60 | 15 | 13 | 2 | 1 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies, LambdaCase #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Futhark.CodeGen.ImpGen.Kernels
( compileProg
)
where
import Control.Monad.Except
import Control.Monad.Reader
import Control.Applicative
import Data.Maybe
import Data.Monoid
import qualified Dat... | mrakgr/futhark | src/Futhark/CodeGen/ImpGen/Kernels.hs | bsd-3-clause | 51,807 | 0 | 24 | 13,379 | 13,744 | 6,741 | 7,003 | 1,043 | 6 |
{-# language CPP #-}
-- | = Name
--
-- VK_KHR_external_fence_capabilities - instance extension
--
-- == VK_KHR_external_fence_capabilities
--
-- [__Name String__]
-- @VK_KHR_external_fence_capabilities@
--
-- [__Extension Type__]
-- Instance extension
--
-- [__Registered Extension Number__]
-- 113
--
-- [__... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_KHR_external_fence_capabilities.hs | bsd-3-clause | 12,819 | 0 | 8 | 2,419 | 780 | 554 | 226 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Stack.Types
-- Copyright : (c) The University of Glasgow 2015
-- License : see libraries/ghc-prim/LICENSE
--
-- Maintainer : cvs-ghc@haskell.org
-- Stability : intern... | AlexanderPankiv/ghc | libraries/base/GHC/Stack/Types.hs | bsd-3-clause | 3,175 | 0 | 11 | 536 | 186 | 140 | 46 | 15 | 0 |
-- -----------------------------------------------------------------------------
-- Copyright 2002, Simon Marlow.
-- Copyright 2006, Bjorn Bringert.
-- Copyright 2009, Henning Thielemann.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted prov... | xpika/mohws | src/Network/MoHWS/Logger.hs | bsd-3-clause | 4,324 | 0 | 14 | 1,131 | 873 | 477 | 396 | 78 | 2 |
module NoTypeDef where
toplevel = 3
f :: Int
f = let local = 5
in local
g :: a -> a
g x = let monomorph = x
in x
h :: Int
h = inWhere
where inWhere = 4
| roberth/uu-helium | test/staticwarnings/NoTypeDef.hs | gpl-3.0 | 181 | 0 | 8 | 70 | 75 | 41 | 34 | 11 | 1 |
{-|
Module : Util.Blaze
Description : Contains methods for setting various HTML attributes.
-}
module Util.Blaze
(toStylesheet,
toScript,
toLink,
mdToHTML) where
import Text.Blaze ((!))
import qualified Text.Blaze.Html5 as H
import qualified Text.Blaze.Html5.Attributes as A
import... | hermish/courseography | app/Util/Blaze.hs | gpl-3.0 | 1,111 | 0 | 10 | 273 | 267 | 151 | 116 | 22 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
--
-- Ivory pre/post conditions quasiquoter.
--
-- Copyright (C) 2014, Galois, Inc.
-- All rights reserved.
--
module Ivory.Language.Syntax.Concrete.QQ.CondQQ where
import Prelude hiding (exp)
import Language.Haskell.TH hiding (... | Hodapp87/ivory | ivory/src/Ivory/Language/Syntax/Concrete/QQ/CondQQ.hs | bsd-3-clause | 2,037 | 0 | 15 | 410 | 515 | 286 | 229 | 35 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Bead.View.Content.Assignment.View where
import Prelude hiding (min)
import Control.Arrow ((&&&))
import qualified Data.Aeson as Aeson
import qualified Data.ByteString.Lazy.Char8 as BsLazy
import Data.Maybe (fromMaybe)
import Data.Monoid... | pgj/bead | src/Bead/View/Content/Assignment/View.hs | bsd-3-clause | 31,903 | 14 | 40 | 12,105 | 7,156 | 3,635 | 3,521 | 522 | 32 |
-- | Simple local storage bindings.
module Data.LocalStorage where
import Data.Text
import FFI
import Prelude
setLocalStorage :: Text -> Text -> Fay ()
setLocalStorage = ffi "(function() { localStorage[%1] = %2; })()"
getLocalStorage :: Text -> Fay (Defined Text)
getLocalStorage = ffi "localStorage[%1]"
removeLoca... | beni55/fay | fay-base/src/Data/LocalStorage.hs | bsd-3-clause | 483 | 0 | 8 | 68 | 105 | 56 | 49 | 12 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-| Implementation of the Ganeti data collector types.
-}
{-
Copyright (C) 2012, 2013 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2... | vladimir-ipatov/ganeti | src/Ganeti/DataCollectors/Types.hs | gpl-2.0 | 6,369 | 0 | 13 | 1,430 | 1,300 | 723 | 577 | 108 | 2 |
{-# OPTIONS_HADDOCK hide #-}
-- #hide
#if __GLASGOW_HASKELL__ >= 701
{-# LANGUAGE Safe #-}
#endif
-- | This module contains functions for displaying
-- HTML as a pretty tree.
module Text.XHtml.Debug ( HtmlTree(..), treeHtml, treeColors, debugHtml ) where
import Text.XHtml.Internals
import Text.XHtml.Extras
import T... | DavidAlphaFox/ghc | libraries/xhtml/Text/XHtml/Debug.hs | bsd-3-clause | 3,830 | 0 | 15 | 1,362 | 949 | 520 | 429 | 70 | 5 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UnliftedNewtypes #-}
module Bug where
import Data.Kind
data family Foo :: Type -> Type
-- This declaration is fine
newtype instance Foo :: Type -> Type where
MkFoo :: a -> Foo a
| sdiehl/ghc | testsuite/tests/indexed-types/should_compile/T16828.hs | bsd-3-clause | 250 | 3 | 6 | 49 | 50 | 31 | 19 | -1 | -1 |
{-# LANGUAGE CPP #-}
import System.Environment
import System.FilePath
import Test.Haddock
checkConfig :: CheckConfig String
checkConfig = CheckConfig
{ ccfgRead = Just
, ccfgClean = \_ -> id
, ccfgDump = id
, ccfgEqual = (==)
}
dirConfig :: DirConfig
dirConfig = defaultDirConfig $ takeDirecto... | Helkafen/haddock | latex-test/Main.hs | bsd-2-clause | 506 | 0 | 11 | 123 | 136 | 76 | 60 | 17 | 1 |
import Test.Cabal.Prelude
main = cabalTest $ do
-- TODO: this test ought to work on Windows too
skipUnless =<< isLinux
skipUnless =<< ghcVersionIs (>= mkVersion [7,8])
fails $ cabal' "new-build" [] >>= assertOutputContains "SIGSEGV"
| mydaum/cabal | cabal-testsuite/PackageTests/CustomSegfault/cabal.test.hs | bsd-3-clause | 249 | 0 | 12 | 50 | 68 | 34 | 34 | 5 | 1 |
--------------------------------------------------------------------------------
-- | The LLVM abstract syntax.
--
module Llvm.AbsSyn where
import Llvm.MetaData
import Llvm.Types
import Unique
-- | Block labels
type LlvmBlockId = Unique
-- | A block of LLVM code.
data LlvmBlock = LlvmBlock {
-- | The code labe... | siddhanathan/ghc | compiler/llvmGen/Llvm/AbsSyn.hs | bsd-3-clause | 9,869 | 0 | 9 | 2,787 | 642 | 413 | 229 | 81 | 0 |
{-# LANGUAGE PolyKinds, DataKinds, KindSignatures, RankNTypes,
TypeFamilies, FlexibleInstances, UndecidableInstances #-}
module T6118 where
import GHC.Exts
data Nat = Zero | Succ Nat
data List a = Nil | Cons a (List a)
class SingE (a :: k) where
type Demote a :: *
instance SingE (a :: Bool) where
... | urbanslug/ghc | testsuite/tests/polykinds/T6118.hs | bsd-3-clause | 580 | 2 | 10 | 133 | 215 | 119 | 96 | 16 | 0 |
{-# LANGUAGE BangPatterns #-}
module Main where
import Control.DeepSeq (NFData, rnf)
import Criterion.Main
import Data.Network.Address
instance NFData IPv4 where
rnf (IPv4 ip) = rnf ip
instance NFData IPv6 where
rnf (IPv6 a b) = rnf a `seq` rnf b
instance (Address a, NFData a) => NFData (IPSubnet a) where
... | sebnow/haskell-network-address | Benchmark.hs | mit | 1,678 | 0 | 17 | 511 | 521 | 264 | 257 | 38 | 1 |
{-# htermination group :: [()] -> [[()]] #-}
import List
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/List_group_2.hs | mit | 57 | 0 | 3 | 10 | 5 | 3 | 2 | 1 | 0 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
module Data.DateTime.Kaol w... | Soares/Dater.hs | systems/Data/DateTime/Kaol.hs | mit | 1,827 | 0 | 9 | 346 | 656 | 354 | 302 | 49 | 1 |
import Prelude hiding (lookup)
import Control.Applicative
swapL :: Int -> Int -> [a] -> Maybe [a]
swapL a b xs = (replace a <$> lookup b xs) <*> (replace b <$> lookup a xs <*> pure xs)
replace :: Int -> a -> [a] -> [a]
replace a an [] = []
replace 0 an (_:xs) = an : xs
replace a an (x:xs) = x : replace (a - 1) an xs
... | nightski/1HaskellADay | swapL.hs | mit | 435 | 0 | 9 | 104 | 273 | 141 | 132 | 12 | 1 |
module MBSieve where
import Codec.Binary.UTF8.String
import Data.List
import MBSUtils
--
-- utility sieves
--
s_1 :: [String] -> [String]
s_1 = take 3 . map encodeString
s_2 :: [(String,String)] -> [(String,String)]
s_2 = take 3 . map (\(a,b) -> (encodeString a, encodeString b))
s_3 :: [(String,String,String)... | jrgdiz/tese | src/MBSieve.hs | mit | 3,722 | 0 | 16 | 736 | 1,537 | 905 | 632 | 57 | 1 |
{-# LANGUAGE TemplateHaskell #-}
------------------------------------------------------------------------------
-- | This module defines our application's state type and an alias for its
-- handler monad.
module Application where
------------------------------------------------------------------------------
import Co... | bfpg/brisparks.info | src/Application.hs | mit | 843 | 0 | 11 | 112 | 122 | 72 | 50 | 15 | 0 |
{-|
Module : Web.Facebook.Messenger.Types.Requests.Attachment.Templates.ReceiptTemplate
Copyright : (c) Felix Paulusma, 2016
License : MIT
Maintainer : felix.paulusma@gmail.com
Stability : semi-experimental
Use the Receipt Template with the Send API to send a order confirmation, with the transaction summ... | Vlix/facebookmessenger | src/Web/Facebook/Messenger/Types/Requests/Attachment/Templates/ReceiptTemplate.hs | mit | 6,435 | 0 | 34 | 1,924 | 1,085 | 608 | 477 | 110 | 0 |
module HW2.LogAnalysis
( parseMessage
, parse
, insert
, build
, inOrder
, whatWentWrong
) where
import Provided.Log
parseMessage :: String -> LogMessage
parseMessage = undefined
parse :: String -> [LogMessage]
parse = undefined
insert :: LogMessage -> MessageTree -> MessageTree
insert = undefined
build :: [LogMes... | wstrinz/school-of-haskell | cis194/homework-2/src/HW2/LogAnalysis.hs | mit | 488 | 0 | 6 | 75 | 134 | 80 | 54 | 20 | 1 |
-- All functions will be ended with '.
-- head'
head' :: [a] -> a
head' [] = error "head': empty list"
head' (x:xs) = x
-- tail'
tail' :: [a] -> [a]
tail' [] = error "tail': empty list"
tail' (x:xs) = xs
-- last'
last' :: [a] -> a
last' [] = error "last': empty list"
last' [x] = x
last' (x:xs) = last' xs
-- init'
i... | AugustusHuang/hs-learning | elementary.hs | mit | 3,704 | 0 | 11 | 1,024 | 2,324 | 1,222 | 1,102 | 136 | 1 |
{-# htermination minFM :: (Ord a, Ord k) => FiniteMap (a,k) b -> Maybe (a,k) #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_minFM_12.hs | mit | 98 | 0 | 3 | 18 | 5 | 3 | 2 | 1 | 0 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE CPP #-}
module Yesod.Form.Functions
( -- * Running in MForm monad
newFormIdent
, askParams
, askF... | wujf/yesod | yesod-form/Yesod/Form/Functions.hs | mit | 20,153 | 0 | 21 | 5,563 | 4,958 | 2,601 | 2,357 | 338 | 5 |
{-|
Module: Flaw.UI.Panel
Description: Panel is a free container element.
License: MIT
-}
{-# LANGUAGE TypeFamilies #-}
module Flaw.UI.Panel
( Panel(..)
, newPanel
) where
import Control.Monad
import Control.Concurrent.STM
import Data.Foldable
import Data.List
import Data.Maybe
import qualified Data.Set as S
... | quyse/flaw | flaw-ui/Flaw/UI/Panel.hs | mit | 18,583 | 0 | 35 | 4,847 | 3,957 | 1,929 | 2,028 | 392 | 3 |
{-# LANGUAGE BangPatterns #-}
module Data.List.Extra
( keyNub
, ordNubOn
, ordNubIndex
, ordNubIndexBy
, nubIndexHash
, collateCycleBy
, collateBy
, collate
, hashLookupWith
, hashLookupWithNote
, hashLookupWithDebug
, lookupFromNothing
, lookupFromNothings
, groupOn
, ordGroupAllOn
, or... | circuithub/circuithub-prelude | Data/List/Extra.hs | mit | 14,685 | 0 | 14 | 3,756 | 3,882 | 2,152 | 1,730 | 163 | 6 |
module Main
( main
) where
import GhostLang.ConduitProps (sourceAndSinkShallMatch)
import Test.Framework (Test, defaultMain, testGroup)
import Test.Framework.Providers.QuickCheck2 (testProperty)
main :: IO ()
main = defaultMain testSuite
testSuite :: [Test]
testSuite =
[ testGroup "GhostLang.ConduitProp... | kosmoskatten/ghost-lang | ghost-conduit/test/Spec.hs | mit | 408 | 0 | 8 | 71 | 94 | 55 | 39 | 11 | 1 |
module Ethereum.Trie.Path (Path, encodePath, decodePath) where
import Control.Error
import Data.Bits
import qualified Data.ByteString as BS
import Ethereum.Prelude
type Path = [Word4]
encodePath :: Bool -> Path -> ByteString
encodePath isTerminal path =
let pair a (Nothing, xs) = (Just a, xs)
pair a (Just ... | bkirwi/ethereum-haskell | src/Ethereum/Trie/Path.hs | mit | 1,015 | 0 | 15 | 265 | 349 | 191 | 158 | 26 | 4 |
module Utils (makeTuples) where
-- |makeTuples takes as input a list xs.
-- each element x of xs represents a list of possibilities.
-- makeTuples returns lists whose elements are chosen, in order, from each x
-- for example makeTuples [[1, 2], [3, 4]] will return [[1, 3], [1, 4], [2, 3], [2, 4]]
-- you can view the r... | miniBill/entangle | src/lib/Utils.hs | mit | 595 | 0 | 7 | 163 | 50 | 37 | 13 | 3 | 1 |
module Binary where
data Tree a = Empty | Branch a (Tree a) (Tree a)
deriving (Show, Eq)
-- One interest I have is to convert this into a generalized Tree class with an
-- instantiation, rather than a concrete data structure
| iduhetonas/haskell-projects | Haskell99Problems/Binary.hs | mit | 231 | 0 | 8 | 48 | 46 | 27 | 19 | 3 | 0 |
-- File: ch3/exB4.hs
-- A function that palindromizes a list
palindromize :: [a] -> [a]
-- ^ I feel like this is cheating, because Ch 3 hasn't introduced the
-- standard list manipulation functions yet.
palindromize xs = xs ++ (reverse xs)
palindromize' :: [a] -> [a]
-- ^ I have no idea how to do this without just ... | friedbrice/RealWorldHaskell | ch3/exB4.hs | gpl-2.0 | 518 | 0 | 10 | 122 | 154 | 84 | 70 | 7 | 2 |
{-# OPTIONS -w -O0 #-}
{- |
Module : OMDoc/ATC_OMDoc.der.hs
Description : generated Typeable, ShATermConvertible instances
Copyright : (c) DFKI Bremen 2008
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : non-portable(overlappin... | nevrenato/Hets_Fork | OMDoc/ATC_OMDoc.hs | gpl-2.0 | 43,170 | 0 | 28 | 10,012 | 13,407 | 6,895 | 6,512 | 960 | 1 |
module Amoeba.Middleware.OpenGL.Primitives where
import Amoeba.Middleware.OpenGL.Common
import Graphics.Rendering.OpenGL as OGL
{-
v1
_____
| /|
| / |
| / |
|/___|
v2
-}
quad :: GLfVertex2 -> GLfVertex2 -> IO ()
quad v1@(Vertex2 x1 y1) v2@(Vertex2 x2 y2) = renderPrimitive TriangleStrip $ do
vertex ... | graninas/The-Amoeba-World | src/Amoeba/Middleware/OpenGL/Primitives.hs | gpl-3.0 | 399 | 0 | 9 | 98 | 117 | 61 | 56 | 9 | 1 |
module S.Convert where
import S.Type
-- | pair of equivalent ground terms
type Axiom = (T,T)
equivalent :: [(T,T)] -> T -> [T]
equivalent axioms t = undefined
| jwaldmann/s | S/Convert.hs | gpl-3.0 | 164 | 0 | 7 | 33 | 59 | 36 | 23 | 5 | 1 |
{- Merch.Race.Economy.ProdCons - Model for item producers and consumers.
Copyright 2013 Alan Manuel K. Gloria
This file is part of Merchant's Race.
Merchant's Race 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... | AmkG/merchants-race | Merch/Race/Economy/ProdCons.hs | gpl-3.0 | 3,732 | 0 | 27 | 835 | 702 | 364 | 338 | 50 | 2 |
-- |
-- Copyright : © 2009 CNRS - École Polytechnique - INRIA
-- License : GPL
--
-- This module is the entry point for Dedukti. Based on the command line
-- arguments the appropriate driver is invoked. Everything is coordinated by
-- the driver. This module is also the place where global configuration data
-- is ini... | mboes/dedukti | Dedukti.hs | gpl-3.0 | 3,671 | 0 | 19 | 973 | 938 | 499 | 439 | 73 | 6 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroups/Insert.hs | mpl-2.0 | 3,840 | 0 | 16 | 906 | 470 | 281 | 189 | 74 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-plus/gen/Network/Google/Resource/Plus/Activities/Search.hs | mpl-2.0 | 4,620 | 0 | 16 | 1,075 | 637 | 376 | 261 | 93 | 1 |
module Main where
import qualified Sound.TagLib as TagLib
import Data.Maybe
import Control.Monad
import System
main = do
args <- getArgs
mapM showFile args
withMaybe :: (Maybe j) -> (j -> IO ()) -> IO ()
withMaybe mebbe action = do
case mebbe of
Just x -> do action x
ret... | bickfordb/haskell-taglib | example.hs | lgpl-3.0 | 1,376 | 0 | 13 | 342 | 432 | 203 | 229 | 39 | 2 |
module PermTab () where
import Data.Array (Array(..), listArray, indices)
import Data.List
import Data.Set (Set)
import qualified Data.Set as Set
{- This module will define functionality whereby a given "passage", i.e.
the indices of a list containing elements that are members of
UndEltType is partitioned set-... | dwyckoff76/herman | permtab/PermTab.hs | lgpl-3.0 | 1,023 | 0 | 7 | 262 | 178 | 102 | 76 | 14 | 1 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="ru-RU">
<title>Requester</title>
<maps>
<homeID>requester</homeID>
<mapref location="ma... | secdec/zap-extensions | addOns/requester/src/main/javahelp/help_ru_RU/helpset_ru_RU.hs | apache-2.0 | 960 | 77 | 66 | 155 | 404 | 205 | 199 | -1 | -1 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE RebindableSyntax #-}
module Memo where
import Prelude hiding (return, (>>=))
import qualified Data.Map as M
import qualified Data.IntMap as IM
import qualified Prelude as P (return, (>>=))
--newtype Memo m k v = Memo{runMemo:: m k v -> (v, m ... | jtapolczai/Scratchpad | src/Memo.hs | apache-2.0 | 5,336 | 0 | 17 | 1,736 | 2,210 | 1,162 | 1,048 | 107 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Openshift.V1.ExecAction where
import GHC.Generics
import Data.Text
import qualified Data.Aeson
-- | ExecAction describes a \"run in container\... | minhdoboi/deprecated-openshift-haskell-api | openshift/lib/Openshift/V1/ExecAction.hs | apache-2.0 | 905 | 0 | 10 | 143 | 86 | 52 | 34 | 14 | 0 |
G - Currying/Partial Application
H - Pattern matching - Guards
$ = |> = Pizza Right
- Multi-parameter Types
Recursion
Records
Type Signatures
Lambdas
ADT (Algebraic Data Types)
recursion reverse
(= __ (string/reverse "hello"))
signum x =
if x < 0
then -1
else if x > 0
then 1
... | gregberns/HaskellKoans | src/koans/NNext.hs | apache-2.0 | 1,604 | 36 | 13 | 380 | 621 | 303 | 318 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
module Handler.Home where
import Import
import Widget.Card
fakeCard :: WidgetT App IO ()
fakeCard = do
card cardSettings
where cardSettings =... | SaintOlga/FruitHools | src/Handler/Home.hs | apache-2.0 | 960 | 0 | 12 | 223 | 197 | 109 | 88 | 29 | 1 |
{-# LANGUAGE DeriveDataTypeable, NoMonadFailDesugaring, TupleSections #-}
import Control.Applicative ((<$>), (<*>))
import Control.Monad.Loops (iterateM_)
import qualified Data.Array.Repa as R
import Data.Array.Repa.Index ((:.) ((:.)), DIM2, Z (Z))
import Data.ConfigFile
import GenArt.SmoothLife
import Graphics.Image (... | travisbrown/smoothlife | src/Main.hs | apache-2.0 | 2,569 | 28 | 16 | 488 | 988 | 498 | 490 | 53 | 1 |
{-# LANGUAGE FlexibleContexts,FlexibleInstances #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE PatternGuards, ViewPatterns #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE ... | pepeiborra/muterm-framework | MuTerm/Framework/Output.hs | bsd-3-clause | 6,377 | 0 | 16 | 1,753 | 1,587 | 802 | 785 | -1 | -1 |
module TypeFun.Data.Maybe
( MaybeCase
, NothingToConstr
, JustToConstr
, CatMaybes
, FromJust
) where
import GHC.Exts
type family MaybeCase (a :: Maybe k)
(nothing :: r)
(just :: k -> r) :: r where
MaybeCase 'Nothing nothing just = nothing
MaybeCase ('Just ... | s9gf4ult/type-fun | src/TypeFun/Data/Maybe.hs | bsd-3-clause | 934 | 0 | 11 | 249 | 355 | 202 | 153 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
module Yesod.Admin.Crud.Class (YesodAdmin(..)) where
import Yesod.Admin.Crud.TableFuncs (TableFuncs)
import Yesod.Admin.Crud.Type (Admin, YesodAdminReqs)
import Yesod (GHandler)
class YesodAdminReqs Admin master => YesodAdmin master where
getTableNames :: GHandler Admin master ... | yairchu/yesod-admin-crud | Yesod/Admin/Crud/Class.hs | bsd-3-clause | 408 | 0 | 10 | 54 | 110 | 64 | 46 | 8 | 0 |
module Crawler.Helpers
( unsafeURI
) where
import Test.Framework (Test, TestName)
import Test.Framework.Providers.HUnit (testCase)
import Test.HUnit ((@=?), assertFailure, assertBool)
import Data.Maybe (fromJust)
import Network.URI (parseURI, UR... | mavenraven/digital-ocean-crawler | tests/Crawler/Helpers.hs | bsd-3-clause | 492 | 0 | 8 | 131 | 141 | 83 | 58 | 12 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Log (
-- * Basic logging
logIO,
-- * Logging with prepended context
MonadLog(..),
LogT(..),
withLogContext,
) where
import Prelude hiding (log)
import Control.Applicative (Applicative)
import Control.Monad.IO.Class (MonadIO)
import Control.Mo... | joeyadams/haskell-network-socket-options | testing/Log.hs | bsd-3-clause | 1,313 | 0 | 11 | 258 | 435 | 240 | 195 | 32 | 1 |
module InterpreterUtil (parseMultiple, unparse) where
import Parser (parse)
import ParserUtil (removeComments, splitExpressions)
import Types
-- Utility functions used by the interpreter.
-- The functions below: `parseMultiple` and `unparse` are
-- implemented in order for the interp... | joelchelliah/diy-lang-haskell | util/InterpreterUtil.hs | bsd-3-clause | 1,481 | 0 | 12 | 429 | 321 | 170 | 151 | 20 | 2 |
{-|
Module : Numeric.AERN.Basics.Laws.Relation
Description : common properties of relations
Copyright : (c) Michal Konecny
License : BSD3
Maintainer : mikkonecny@gmail.com
Stability : experimental
Portability : portable
Common properties of binary relations.
... | michalkonecny/aern | aern-order/src/Numeric/AERN/Basics/Laws/Relation.hs | bsd-3-clause | 882 | 0 | 9 | 236 | 238 | 135 | 103 | 16 | 1 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.NV.RegisterCombiners
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portabi... | haskell-opengl/OpenGLRaw | src/Graphics/GL/NV/RegisterCombiners.hs | bsd-3-clause | 2,815 | 0 | 5 | 357 | 368 | 232 | 136 | 76 | 0 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
module Math.Budget.Lens.ArbitraryPriorsL where
import Math.Budget.Money
import Math.Budget.FixedPeriod
import Data.List.NonEmpty
class ArbitraryPriorsL cat target | target -> cat where
arbitraryPriorsL :: cat target (NonEmpty (Money, FixedPeriod))
| tonymorris/hbudget | src/Math/Budget/Lens/ArbitraryPriorsL.hs | bsd-3-clause | 316 | 0 | 10 | 35 | 66 | 40 | 26 | 7 | 0 |
{-# LANGUAGE OverloadedStrings #-}
-- |
module Ops.Common where
import Data.Monoid
import qualified Data.Text as T
import Prelude hiding (FilePath)
import Shelly
data FileMatchError = NoMatches | MultipleMatches [FilePath]
sed_ :: [T.Text] -> FilePath -> Sh ()
sed_ parts fn = cm... | diagrams/package-ops | src/Ops/Common.hs | bsd-3-clause | 364 | 0 | 8 | 90 | 104 | 61 | 43 | 9 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Netsuite.Restlet.Configuration (
NsRestletConfig (..),
IsNsRestletConfig,
toNsRestletConfig
) where
import Da... | anchor/haskell-netsuite | lib/Netsuite/Restlet/Configuration.hs | bsd-3-clause | 2,957 | 0 | 12 | 592 | 683 | 403 | 280 | 42 | 1 |
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
-- | This module implement helper functions to read & write data
-- at bits level.
module Codec.Volume.BitIO( BoolReader
, emptyBoolState
, BoolState
, byteAlignJpg
... | Twinside/Juicy.Voxels | src/Codec/Volume/BitIO.hs | bsd-3-clause | 12,258 | 0 | 20 | 3,933 | 3,175 | 1,617 | 1,558 | 254 | 5 |
{-# LANGUAGE OverlappingInstances, UndecidableInstances #-}
-----------------------------------------------------------------------------
-- |
-- Module : HJScript
-- License : BSD-style
-- Maintainer : Joel Bjornson joel.bjornson@gmail.com
-- Niklas Broberg nibro@cs.chalmers.se
-- Stability... | seereason/HJScript | src/HJScript.hs | bsd-3-clause | 1,165 | 0 | 5 | 168 | 161 | 111 | 50 | 27 | 0 |
{-# OPTIONS -fglasgow-exts #-}
{-# OPTIONS -w #-}
module System.Plugins.ParsePkgConfLite (
parsePkgConf, parseOnePkgConf
) where
import System.Plugins.Package ( PackageConfig(..), defaultPackageConfig )
import Char ( isSpace, isAlpha, isAlphaNum, isUpper )
import List ( break )
im... | abuiles/turbinado-blog | tmp/dependencies/hs-plugins-1.3.1/src/System/Plugins/ParsePkgConfLite.hs | bsd-3-clause | 18,925 | 295 | 19 | 3,493 | 5,071 | 2,769 | 2,302 | -1 | -1 |
-- |
-- Module : Network.TLS.Handshake.Process
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- process handshake message received
--
module Network.TLS.Handshake.Process
( processHandshake
, startHandshake
, ge... | AaronFriel/hs-tls | core/Network/TLS/Handshake/Process.hs | bsd-3-clause | 5,849 | 0 | 19 | 1,372 | 1,467 | 723 | 744 | 97 | 9 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Arrow ((>>>))
import Hakyll
main :: IO ()
main = hakyllWith config $ do
match "css/*" $ do
route idRoute
compile compressCssCompiler
match "images/*" $ do
route idRoute
compile copyFileCompiler
match... | Soostone/blaze-html-haste | website/hakyll.hs | bsd-3-clause | 1,004 | 0 | 13 | 312 | 199 | 94 | 105 | 30 | 1 |
module Sharc.Instruments.Cello (cello) where
import Sharc.Types
cello :: Instr
cello = Instr
"cello_vibrato"
"Cello"
(Legend "McGill" "1" "11")
(Range
(InstrRange
(HarmonicFreq 1 (Pitch 65.4 24 "c2"))
(Pitch 65.4 24 "c2")
(Amplitude 9077.77 (HarmonicFreq 131... | anton-k/sharc-timbre | src/Sharc/Instruments/Cello.hs | bsd-3-clause | 89,096 | 0 | 15 | 24,932 | 35,221 | 18,265 | 16,956 | 3,035 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.