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 CPP #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE Instance... | kadena-io/pact | src/Pact/Types/Term.hs | bsd-3-clause | 52,383 | 0 | 34 | 11,356 | 18,703 | 9,627 | 9,076 | 1,451 | 19 |
-- | The Github Search API, as described at
-- <http://developer.github.com/v3/search/>.
module Github.Search(
searchRepos'
,searchRepos
,module Github.Data
) where
import Github.Data
import Github.Private
-- | Perform a repository search.
-- | With authentication.
--
-- > searchRepos' (Just $ GithubBasicAuth "githu... | mavenraven/github | Github/Search.hs | bsd-3-clause | 854 | 0 | 9 | 101 | 115 | 66 | 49 | 10 | 1 |
{-# LANGUAGE TemplateHaskell, ViewPatterns, FlexibleInstances #-}
module Math.CurveGenerator
(CurveInput(..)
, CurveOptions(..)
, GridOptions(..)
, AxisOptions(..)
, TangentsOptions(..)
, CGConfig(..)
, PointInfo(..)
, Curve(..)
, saveConfig
, loadCo... | ocramz/CurveProject | src/Math/CurveGenerator.hs | bsd-3-clause | 4,007 | 0 | 14 | 926 | 1,393 | 793 | 600 | 82 | 2 |
{-# LANGUAGE TypeApplications, ScopedTypeVariables #-}
module Lamdu.Eval.Results.Process
( addTypes
) where
import qualified Control.Lens as Lens
import qualified Data.Map as Map
import qualified Data.Text as Text
import Hyper
import Hyper.Class.Optic (HNodeLens(..))
import qualified Hyper.... | lamdu/lamdu | src/Lamdu/Eval/Results/Process.hs | gpl-3.0 | 5,329 | 0 | 15 | 1,397 | 1,714 | 880 | 834 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Copyright : (C) 2013-15 Edward Kmett
-- License : BSD-style (see the file LICENSE)
-- Maintainer : Edward Kmett <ekmett@gmail.com>
-- Stability : experimental
-- Portability : non-portable
--
-- Utility functions for the... | Gabriel439/succinct | src/Succinct/Internal/Binomial.hs | bsd-2-clause | 3,631 | 0 | 17 | 730 | 1,141 | 587 | 554 | 74 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-incomplete-patterns #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.TypeLevel.Num.Aliases
-- Copyright : (c) 2008 Alfonso Acosta, Oleg Kiselyov, Wolfgang Jeltsch
-- and KTH's SA... | coreyoconnor/type-level-tf | src/Data/TypeLevel/Num/Aliases/TH.hs | bsd-3-clause | 4,660 | 0 | 15 | 1,388 | 1,168 | 620 | 548 | 80 | 10 |
module DPH.Pass.Dump
(passDump)
where
import DPH.Core.Pretty
import HscTypes
import CoreMonad
import System.IO.Unsafe
-- | Dump a module.
passDump :: String -> ModGuts -> CoreM ModGuts
passDump name guts
= unsafePerformIO
$ do
writeFile ("dump." ++ name ++ ".hs")
$ render RenderIndent (pprM... | mainland/dph | dph-plugin/DPH/Pass/Dump.hs | bsd-3-clause | 363 | 0 | 12 | 84 | 105 | 56 | 49 | 13 | 1 |
{-# LANGUAGE TypeOperators #-}
module Data.Comp.Examples.Multi where
import Examples.Multi.Common
import Examples.Multi.Eval as Eval
import Examples.Multi.EvalI as EvalI
import Examples.Multi.EvalM as EvalM
import Examples.Multi.Desugar as Desugar
import Data.Comp.Multi
import Test.Framework
import Test.Framework.Pr... | spacekitteh/compdata | testsuite/tests/Data/Comp/Examples/Multi.hs | bsd-3-clause | 1,840 | 0 | 14 | 573 | 430 | 238 | 192 | 33 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeSynonymInstances #-}
-----------------------------------------------------------------------------
-- |
-- Module : Diagrams.TwoD.Path.Turtl... | diagrams/diagrams-contrib | src/Diagrams/TwoD/Path/Turtle/Internal.hs | bsd-3-clause | 11,441 | 0 | 14 | 3,025 | 2,195 | 1,203 | 992 | 152 | 2 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Main
-- Copyright : (c) David Himmelstrup 2005
-- License : BSD-like
--
-- Maintainer : lemmih@gmail.com
-- Stability : provisional
-- Portability : portable
--
-- Entry point to the ... | kosmikus/cabal | cabal-install/Main.hs | bsd-3-clause | 53,349 | 0 | 24 | 14,955 | 9,324 | 4,912 | 4,412 | 861 | 13 |
-- | Internal constructors and helper functions. Note that no guarantees are given for stability of these interfaces.
module Network.Wai.Middleware.RequestSizeLimit.Internal
( RequestSizeLimitSettings(..)
, setMaxLengthForRequest
, setOnLengthExceeded
) where
import Network.Wai
import Data.Word (Word64... | kazu-yamamoto/wai | wai-extra/Network/Wai/Middleware/RequestSizeLimit/Internal.hs | mit | 2,957 | 0 | 12 | 420 | 202 | 133 | 69 | 13 | 1 |
module D1 where
{-add parameter 'f' to function 'sq' . This refactoring
affects module 'D1', 'C1' and 'A1'-}
sumSquares (x:xs) = sq x + sumSquares xs
sumSquares [] = 0
sq x = x ^ pow
pow =2
| kmate/HaRe | old/testing/addOneParameter/D1.hs | bsd-3-clause | 201 | 0 | 7 | 49 | 57 | 30 | 27 | 5 | 1 |
{-# language KindSignatures #-}
{-# language PolyKinds #-}
{-# language DataKinds #-}
{-# language TypeFamilies #-}
{-# language RankNTypes #-}
{-# language NoImplicitPrelude #-}
{-# language FlexibleContexts #-}
{-# language MultiParamTypeClasses #-}
{-# language GADTs #-}
{-# language ConstraintKinds #-}
{-# language... | sdiehl/ghc | testsuite/tests/polykinds/T11523.hs | bsd-3-clause | 2,453 | 0 | 9 | 619 | 1,038 | 564 | 474 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
module T12845 where
import Data.Proxy
data Foo (m :: Bool)
type family Head (xs :: [(Bool, Bool)]) where Head (x ': xs) =... | ezyang/ghc | testsuite/tests/partial-sigs/should_compile/T12845.hs | bsd-3-clause | 666 | 0 | 10 | 164 | 225 | 128 | 97 | -1 | -1 |
{-|
Module: Math.Ftensor.SizedList
Copyright: (c) 2015 Michael Benfield
License: ISC
Lists carrying their size in their type. These are used for runtime indexing
into tensors. Many of the functions duplicate functionality for lists from
Haskell's @Prelude@.
-}
{-# OPTIONS_GHC -fplugin GHC.TypeLits.Normalise #-}
{-# L... | mikebenfield/ftensor | src/Math/Ftensor/SizedList.hs | isc | 4,543 | 0 | 14 | 1,122 | 1,729 | 905 | 824 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Ebay.Details
( getReturnPolicyDetails
, module Ebay.Types.Details
) where
import Control.Monad.Reader
import Data.Text (Text)
import Data.XML.Pickle
import Data.XML.Types
... | AndrewRademacher/hs-ebay-trading | src/Ebay/Details.hs | mit | 1,045 | 0 | 11 | 235 | 220 | 122 | 98 | 22 | 1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.FileError
(pattern NOT_FOUND_ERR, pattern SECURITY_ERR, pattern ABORT_ERR,
pattern NOT_READABLE_ERR, pattern ENCODING_ERR,
pattern NO_MODIFICATION_ALLOWED_ERR, pattern INVALID_STATE_ERR,
... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/FileError.hs | mit | 1,959 | 6 | 9 | 262 | 514 | 312 | 202 | 39 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
-- | GitHub event predicates.
-- Mostly for filtering events.
module Github.Event.Predicate
( isInterestingEvent
, isClosingIssueComment
) where
import Github.Api
-- ----------------------------------------------
-- | If an 'Ev... | UlfS/ghmm | src/Github/Event/Predicate.hs | mit | 2,310 | 0 | 13 | 364 | 495 | 254 | 241 | 55 | 1 |
module Excersises_02 where
import qualified Data.Time as Time
import qualified Data.Map as Map
import Data.Maybe
--datatype in record syntax
data Person = Male { firstName :: String, lastName :: String } | Female { firstName :: String, lastName :: String } | Asexual { designation :: String } deriving (Show)
--functi... | omittones/haskell-test | src/Excersises_02.hs | mit | 6,401 | 0 | 15 | 1,586 | 1,830 | 955 | 875 | 110 | 2 |
{-# htermination (isNaNFloat :: Float -> MyBool) #-}
import qualified Prelude
data MyInt = Pos Nat | Neg Nat ;
data Nat = Succ Nat | Zero ;
data MyBool = MyTrue | MyFalse
data List a = Cons a (List a) | Nil
data Float = Float MyInt MyInt ;
isNaNFloat :: Float -> MyBool
isNaNFloat vv = MyFalse;
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/isNaN_1.hs | mit | 307 | 0 | 8 | 72 | 95 | 56 | 39 | 8 | 1 |
{-# OPTIONS -Wall -fwarn-tabs -fno-warn-type-defaults #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module HeightMap.Mesh
where
import HeightMap.Base (heightMap,heightMap',unitHeightMap,unitHeightMap')
| ftomassetti/haskell-diamond-square | src/HeightMap/Mesh.hs | mit | 270 | 0 | 5 | 26 | 29 | 20 | 9 | 6 | 0 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
-- |
--
-- > {-# LANGUAGE TemplateHaskell #-}
-- >
-- > import Prelude hiding (error)
-- > import ErrorLoc
-- >
-- > main :: IO ()
-- > main = $error "Oh no!"
--
-- > test.hs:7:10: Oh no!
module ErrorLoc (error) where
import Language.Haskell.TH
import Prel... | pikajude/error-loc | ErrorLoc.hs | mit | 787 | 0 | 7 | 263 | 71 | 50 | 21 | 15 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module HamiltonGraph where
import Data.Graph
import qualified Data.Set as S
import GaGraph
import Individual
import Control.Monad.State
import Control.Monad.List
import Control.Lens
import Control.Monad
import Control.Monad.List as L
data HamiltonGraph = HamiltonGraph {graph :: Graph,... | salamansar/GA-cube | src/HamiltonGraph.hs | mit | 3,645 | 4 | 13 | 832 | 1,226 | 651 | 575 | 85 | 2 |
import Control.Monad
import Data.List
import Data.Bits
import Data.Int (Int64)
import Text.Printf
-- q = 0,1,2,3
centerCoord :: Int -> Int
centerCoord x
| abs (x-1) <= 1 = 1
| abs (x-4) <= 1 = 4
| otherwise = error "bad coordinate"
center :: Int -> (Int,Int)
center q
| q == 0 = (1,1)
| q == 1 = (1,4)
... | erantapaa/haskell-pentago | genRotations.hs | mit | 3,097 | 0 | 15 | 992 | 1,253 | 652 | 601 | 76 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
-- module
module CardMaps ( CardMap
, CardMapW(..)
, QuantityMap
, findByName
, updateQuantity
, dumpQuantity
... | nicuveo/HCM | src/CardMaps.hs | mit | 1,951 | 0 | 11 | 607 | 473 | 255 | 218 | 43 | 3 |
hue a b c = if a + b < 10
then "hello"
else if c > 9
then "wow so big"
else "oh that's okay"
asdf = hue 1 2 3
a = (\x -> x + 1) [1, 2, 3]
test f =
let k = f + 1
in case k of
10 -> 9
_ -> 100
| santolucito/ives | Ives/SymbolicExecution/Sample.hs | mit | 234 | 0 | 9 | 104 | 121 | 64 | 57 | 12 | 3 |
module GHCJS.DOM.InspectorFrontendHost (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/InspectorFrontendHost.hs | mit | 51 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
{- |
Copyright: (c) 2022 Kowainik
SPDX-License-Identifier: BSD-3-Clause
Maintainer: Kowainik <xrom.xkov@gmail.com>
Stack-only example with all integrations
-}
module StackFull
( projectName
) where
projectName :: String
projectName = "stack-full"
| vrom911/hs-init | summoner-cli/examples/stack-full/src/StackFull.hs | mit | 259 | 0 | 4 | 41 | 20 | 13 | 7 | 4 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
-- Module : Database.Kdb.Internal.TypesTest
-- Copyright : (c) 2014, Jakub Kozlowski
-- License : MIT
--
-- Maintainer : mail@jakub-kozlowski.com
--
-- Tests for 'Database.Kdb.Internal.I... | jkozlowski/kdb-haskell | tests/Database/Kdb/Internal/IPCTest.hs | mit | 10,778 | 0 | 16 | 3,655 | 1,762 | 1,040 | 722 | 202 | 2 |
{-# LANGUAGE ScopedTypeVariables #-}
module Orville.PostgreSQL.Internal.MigrationLock
( withLockedTransaction,
)
where
import Control.Concurrent (threadDelay)
import Control.Exception (Exception, throwIO)
import qualified Control.Monad as Monad
import qualified Control.Monad.IO.Class as MIO
import Data.Int (Int32... | flipstone/orville | orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/MigrationLock.hs | mit | 3,377 | 0 | 21 | 762 | 601 | 330 | 271 | 69 | 4 |
module Flowskell.State where
import Data.IORef
import Graphics.Rendering.OpenGL hiding (Bool, Float)
import Graphics.Rendering.OpenGL.GLU (perspective)
import Graphics.Rendering.GLU.Raw
import Graphics.Rendering.OpenGL.GL.FramebufferObjects
import Graphics.Rendering.OpenGL.Raw.ARB.Compatibility (glPushMatrix, glPopMatr... | lordi/flowskell | src/Flowskell/State.hs | gpl-2.0 | 4,021 | 0 | 14 | 826 | 957 | 522 | 435 | 95 | 1 |
module DataMining.LargeScaleLearning.Terms where
import Notes
makeDefs [
"convex programming problem"
, "regret"
, "optimal feasable fixed point"
, "average regret"
, "no regret"
, "online convex programming problem"
, "greedy projection"
]
| NorfairKing/the-notes | src/DataMining/LargeScaleLearning/Terms.hs | gpl-2.0 | 287 | 0 | 6 | 78 | 37 | 23 | 14 | -1 | -1 |
module Abstraction.Ast where
data Abs = Join Bool
| Ignore Bool [String]
| Project [Lit]
deriving (Show, Eq, Ord)
data Lit = PosLit {feature :: String} | NegLit {feature :: String}
deriving (Show, Eq, Ord)
| ahmadsalim/p3-tool | p3-tool/Abstraction/Ast.hs | gpl-3.0 | 245 | 0 | 8 | 73 | 89 | 52 | 37 | 7 | 0 |
module Mescaline.Synth.Sampler.Params
( Params(..)
, defaultParams
) where
import Mescaline (Duration)
import qualified Mescaline.Database as DB
data Params = Params {
file :: DB.SourceFile
, unit :: DB.Unit
, offset :: Duration
, duration :: Duration
, rate ... | kaoskorobase/mescaline | lib/mescaline/Mescaline/Synth/Sampler/Params.hs | gpl-3.0 | 1,060 | 0 | 9 | 419 | 262 | 167 | 95 | 38 | 1 |
{- ============================================================================
| Copyright 2010 Matthew D. Steele <mdsteele@alum.mit.edu> |
| |
| This file is part of Pylos. |
... | mdsteele/pylos | src/Pylos/Data/Point.hs | gpl-3.0 | 5,267 | 12 | 14 | 1,648 | 1,777 | 910 | 867 | 103 | 7 |
{- ============================================================================
| Copyright 2011 Matthew D. Steele <mdsteele@alum.mit.edu> |
| |
| This file is part of Fallback. |
... | mdsteele/fallback | src/Fallback/Mode/Editor.hs | gpl-3.0 | 24,846 | 8 | 30 | 9,136 | 9,664 | 5,111 | 4,553 | 469 | 22 |
module Hadolint.Rule.DL3005 (rule) where
import Hadolint.Rule
import Hadolint.Shell (ParsedShell)
import qualified Hadolint.Shell as Shell
import Language.Docker.Syntax (Instruction (..), RunArgs (..))
rule :: Rule ParsedShell
rule = simpleRule code severity message check
where
code = "DL3005"
severity = DL... | lukasmartinelli/hadolint | src/Hadolint/Rule/DL3005.hs | gpl-3.0 | 543 | 0 | 12 | 95 | 153 | 88 | 65 | 13 | 2 |
{-# LANGUAGE OverloadedStrings #-}
import Data.ByteString.Base64
main = do
let dat = "abc123!?$*&()'-=@~"
let sEnc = encode dat
print sEnc
let sDec = decode sEnc
print sDec
| daewon/til | haskell/haskell_by_example/base64.hs | mpl-2.0 | 196 | 0 | 10 | 50 | 58 | 26 | 32 | 8 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Model.Permission.SQL
( accessRow
, accessSets
) where
import Model.SQL.Select
import Model.Permission.Types
accessRow :: String -- ^ Table name
-> Selector -- ^ 'Access'
accessRow table = selectColumns 'Access table ["site", "member"]
accessSets :: String -- ^ @'Access... | databrary/databrary | src/Model/Permission/SQL.hs | agpl-3.0 | 454 | 0 | 8 | 84 | 122 | 74 | 48 | 14 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Hecate.Properties
( doProperties
) where
import qualified Control.Monad as Monad
import Data.List ((\\))
import Data.Monoid (First (..))
import qualified Data.Text as T
import Data.Text.Arbitr... | henrytill/hecate | tests/Hecate/Properties.hs | apache-2.0 | 4,718 | 0 | 14 | 1,135 | 1,344 | 689 | 655 | 106 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
module CI.Docker where
import Contr... | lancelet/bored-robot | src/CI/Docker.hs | apache-2.0 | 8,610 | 0 | 16 | 2,224 | 2,557 | 1,321 | 1,236 | 194 | 5 |
module FreePalace.Messages.PalaceProtocol.InboundReader where
import Control.Applicative
import Control.Exception
import qualified Data.Convertible.Base as Convert
import Data.Word
import qualified FreePalace.Domain.Net as Net
import qu... | psfblair/freepalace | src/FreePalace/Messages/PalaceProtocol/InboundReader.hs | apache-2.0 | 21,020 | 0 | 14 | 3,869 | 3,869 | 1,879 | 1,990 | 282 | 63 |
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
module Network.Eureka (
withEurekaH,
withEureka,
EurekaConfig(..),
InstanceConfig(..),
def,
discoverDataCenterAmazon,
setStatus,
lookupByAppName,
lookupAllApplications,
InstanceInfo(..),
InstanceStatus(..),
DataCenterInfo(..),... | SumAll/haskell-eureka-client | src/Network/Eureka.hs | apache-2.0 | 2,302 | 0 | 14 | 693 | 416 | 252 | 164 | 52 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Finance.Hqfl.Convention.DayCount
-- Copyright : (C) 2018 Mika'il Khan
-- License : (see the file LICENSE)
-- Maintainer : Mika'il Khan <co.category@gmail.com>
-- Stability : stable
-- Portability : portabl... | cokleisli/hqfl | src/Finance/Hqfl/Convention/DayCount.hs | apache-2.0 | 998 | 0 | 5 | 400 | 67 | 48 | 19 | 16 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Buster.Types (Config(..),
UrlConfig(..),
Worker,
ConfigWatch,
BusterPool(..)) where
import Control.Applicative ((<$>), (<*>))
import Control.Concurrent (ThreadId)
import Control.Concurrent.MVar... | MichaelXavier/Buster | src/Buster/Types.hs | bsd-2-clause | 1,730 | 0 | 15 | 623 | 451 | 265 | 186 | 45 | 0 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QStackedLayout.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:18
Warning : this file is machine generated - d... | uduki/hsQt | Qtc/Gui/QStackedLayout.hs | bsd-2-clause | 29,268 | 0 | 16 | 4,568 | 8,819 | 4,456 | 4,363 | -1 | -1 |
{-# LANGUAGE CPP #-}
import Data.Char
import Data.Function (on)
import System.Environment
import System.FilePath
import Test.Haddock
import Test.Haddock.Xhtml
checkConfig :: CheckConfig Xml
checkConfig = CheckConfig
{ ccfgRead = parseXml
, ccfgClean = stripIfRequired
, ccfgDump = dumpXml
, ccfgEqu... | haskell/haddock | html-test/Main.hs | bsd-2-clause | 1,404 | 0 | 11 | 298 | 342 | 190 | 152 | 37 | 1 |
{-# LANGUAGE CPP #-}
{- | Compatibility helper module.
This module holds definitions that help with supporting multiple
library versions or transitions between versions.
-}
{-
Copyright (C) 2011, 2012 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification,... | mbakke/ganeti | src/Ganeti/Compat.hs | bsd-2-clause | 3,455 | 0 | 8 | 493 | 250 | 159 | 91 | 30 | 2 |
import System.Process.Extra
main = system_ "runhaskell -isrc Generate"
| mgmeier/extra | travis.hs | bsd-3-clause | 73 | 0 | 5 | 10 | 15 | 8 | 7 | 2 | 1 |
-- | Includes the Sound type and associated operations, for audio playback
-- in Tea.
module Tea.Sound ( loadSound
, maxVolume
, play
, playLoop
, pause
, resume
, stop
, setVolume
,... | liamoc/tea-hs | Tea/Sound.hs | bsd-3-clause | 3,680 | 0 | 14 | 1,141 | 952 | 500 | 452 | 68 | 2 |
{-# language CPP #-}
module OpenXR.CStruct
( ToCStruct(..)
, FromCStruct(..)
) where
#if defined(USE_VULKAN_TYPES)
import Vulkan.CStruct
#else
import Control.Exception.Base ( bracket )
import Foreign.Marshal.Alloc ( allocaBytesAligned )
import Foreign.... | expipiplus1/vulkan | openxr/src-manual/OpenXR/CStruct.hs | bsd-3-clause | 2,028 | 0 | 5 | 518 | 31 | 22 | 9 | -1 | -1 |
-- !!! Testing Haskell 1.3 syntax
-- Haskell 1.3 syntax differs from Haskell 1.2 syntax in several ways:
-- * Qualified names in export lists
module TestSyntax where
-- * Qualified import/export
-- 1) Syntax:
import qualified Prelude as P
import Prelude
import qualified Prelude
import Prelude ()
import Prelude... | FranklinChen/Hugs | tests/static/syntax.hs | bsd-3-clause | 3,071 | 4 | 8 | 647 | 707 | 455 | 252 | -1 | -1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.ATI.TextureEnvCombine3
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : porta... | phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/ATI/TextureEnvCombine3.hs | bsd-3-clause | 732 | 0 | 4 | 84 | 43 | 35 | 8 | 5 | 0 |
{-# LANGUAGE TypeHoles #-}
module Language.Elementscript.Micro (EvalState(..),
initialEvalState,
evaluate,
Val(..),
normalize,
prettyPr... | pthariensflame/elementscript-micro | src/Language/Elementscript/Micro.hs | bsd-3-clause | 2,884 | 0 | 11 | 1,050 | 872 | 489 | 383 | 57 | 4 |
module Opaleye.Internal.Tag where
data Tag = UnsafeTag Int deriving (Read, Show)
start :: Tag
start = UnsafeTag 1
next :: Tag -> Tag
next = UnsafeTag . (+1) . unsafeUnTag
unsafeUnTag :: Tag -> Int
unsafeUnTag (UnsafeTag i) = i
tagWith :: Tag -> String -> String
tagWith t s = s ++ "_" ++ show (unsafeUnTag t)
| silkapp/haskell-opaleye | src/Opaleye/Internal/Tag.hs | bsd-3-clause | 314 | 0 | 8 | 63 | 129 | 70 | 59 | 10 | 1 |
module Control.Cozip where
import Prelude(Either)
class Cozip f where
cozip ::
f (Either a b)
-> Either (f a) (f b)
| tonymorris/lens-proposal | src/Control/Cozip.hs | bsd-3-clause | 128 | 0 | 10 | 33 | 60 | 31 | 29 | 6 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE UndecidableInstances #-}
#ifndef MIN_VERSION_GLASGOW_HASKELL
#define MIN_VERSION_GLASGOW_HASKELL(a,b,c,d) 0
#endif
-- MIN_VERSION_GLASGOW_HASKELL was introduced in GHC 7.10
#if MIN_VERSION_GLASGOW_HASKELL(7,10,0,0)
#else
{-# LANGUAGE OverlappingInstances #-}
#endif
-- | This modul... | emilaxelsson/open-typerep | src/Data/TypeRep/Sub.hs | bsd-3-clause | 1,113 | 0 | 9 | 197 | 138 | 82 | 56 | -1 | -1 |
module Signal
( module Signal.Sig
, module Signal.Str
, module Signal.Compiler
) where
import Signal.Core as Signal.Sig hiding (Symbol, S, U, Wit, Witness)
import Signal.Core.Stream as Signal.Str hiding (map, repeat)
import Signal.Compiler
| markus-git/signal | src/Signal.hs | bsd-3-clause | 256 | 0 | 5 | 48 | 75 | 50 | 25 | 7 | 0 |
import Control.Applicative
import Control.Concurrent
import Control.Monad
import Data.List
import System.Directory
import System.Environment
import System.Exit
import System.FilePath
import System.IO
import System.Process
main :: IO ()
main = do
hSetBuffering stdout LineBuffering
hSetBuffering stderr LineBufferi... | thoferon/court | plugins/Darcs.hs | bsd-3-clause | 1,059 | 0 | 13 | 195 | 305 | 148 | 157 | 30 | 2 |
import System.Directory (setCurrentDirectory)
import System.Process (callCommand)
main :: IO ()
main = do
setCurrentDirectory "Tests"
callCommand "sh allTests.sh"
| willdonnelly/dyre | test/Main.hs | bsd-3-clause | 168 | 0 | 7 | 23 | 48 | 24 | 24 | 6 | 1 |
module Distribution.Client.Dependency.Modular.IndexConversion
( convPIs
) where
import Data.List as L
import Data.Map as M
import Data.Maybe
import Data.Monoid as Mon
import Prelude hiding (pi)
import qualified Distribution.Client.PackageIndex as CI
import Distribution.Client.Types
import Distribution.Client.... | garetxe/cabal | cabal-install/Distribution/Client/Dependency/Modular/IndexConversion.hs | bsd-3-clause | 10,782 | 0 | 20 | 2,624 | 2,805 | 1,477 | 1,328 | 132 | 9 |
{-# language DataKinds #-}
{-# language TypeFamilies #-}
{-# language GADTs #-}
{-# language MultiParamTypeClasses #-}
{-# language DeriveDataTypeable #-}
{-# language StandaloneDeriving #-}
{-# language FlexibleInstances #-}
{-# language FlexibleContexts #-}
{-# language UndecidableInstances #-}
{-# language Rank2Type... | paolino/book-a-visit | client/UI/Acceptance.hs | bsd-3-clause | 6,238 | 0 | 28 | 1,533 | 2,245 | 1,135 | 1,110 | 171 | 1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
{-|
Module : TestTypes
Description : Types and Generators needed for general testing
-}
module TestTypes where
import Test.QuickCheck
import Control.Monad (liftM, liftM2, liftM3)
import Control.Arrow (first)
import qualified Data.ByteString as B
import q... | froozen/kademlia | test/TestTypes.hs | bsd-3-clause | 2,909 | 0 | 16 | 744 | 882 | 477 | 405 | 65 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
module System.FilePath.Dicom(
isDicomFile
, dicomFileR
, dicomExitCodeFileR
, exitCodeFileR
, FileR(..)
) where
import Control.Category(Category((.)))
import Control.Monad(Monad(return))
import Data.Bool(Bool)
import Data.Char(Char)
import Data.Eq(Eq((==)))
import Data.Foldable(Fo... | tonymorris/isdicom | src/System/FilePath/Dicom.hs | bsd-3-clause | 2,810 | 0 | 18 | 922 | 918 | 495 | 423 | 102 | 5 |
-- | 'Cofunctor' is a structure from category theory dual to 'Functor'
--
-- A 'Functor' is defined by the operation 'fmap':
--
-- > fmap :: (a -> b) -> (f a -> f b)
--
-- This means that its dual must be defined by the following operation:
--
-- > cofmap :: (b -> a) -> (f b -> f a)
--
-- Since beginning his investigat... | jaspervdj/acme-cofunctor | src/Data/Cofunctor.hs | bsd-3-clause | 1,238 | 0 | 9 | 296 | 308 | 167 | 141 | 20 | 0 |
module Usage where
import Data.Monoid
import Data.Generics
import Data.List (isSuffixOf)
import qualified GHC
import GHC (GenLocated(L))
import qualified TypeRep
import TypeRep (Type(..))
import qualified Unify
import qualified OccName
import qualified Var
import qualified Type
import VarEnv
impor... | bgamari/play-type-search | Usage.hs | bsd-3-clause | 4,089 | 0 | 17 | 1,330 | 1,071 | 556 | 515 | 66 | 5 |
module InputParser where
import Control.Applicative
import Data.Attoparsec.ByteString.Char8
import qualified Data.ByteString.Char8 as B
import Types
lineNumberP :: Parser LineNumber
lineNumberP = choice [lineEOF, lineNumber]
where
lineNumber = do
n <- read <$> many digit
return (LineNumber (n - 1))
... | relrod/hed | src/InputParser.hs | bsd-3-clause | 2,175 | 0 | 13 | 475 | 627 | 313 | 314 | 73 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHas... | ababkin/qmuli | library/Qi/Config/AWS/CfCustomResource.hs | mit | 4,427 | 0 | 7 | 1,736 | 210 | 147 | 63 | 31 | 0 |
import Distribution.Superdoc
main = superdocMain
| achirkin/qua-kit | apps/hs/qua-server/Setup.hs | mit | 49 | 0 | 4 | 5 | 11 | 6 | 5 | 2 | 1 |
{-# 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-redshift/gen/Network/AWS/Redshift/DeleteHSMClientCertificate.hs | mpl-2.0 | 3,761 | 0 | 9 | 657 | 365 | 224 | 141 | 55 | 1 |
{-# 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-redshift/gen/Network/AWS/Redshift/CreateClusterSnapshot.hs | mpl-2.0 | 5,704 | 0 | 13 | 1,106 | 736 | 444 | 292 | 90 | 1 |
{-# LANGUAGE DeriveDataTypeable, DeriveGeneric #-}
-- |
-- Module : Statistics.Distribution.Binomial
-- Copyright : (c) 2009 Bryan O'Sullivan
-- License : BSD3
--
-- Maintainer : bos@serpentine.com
-- Stability : experimental
-- Portability : portable
--
-- The binomial distribution. This is the discrete proba... | fpco/statistics | Statistics/Distribution/Binomial.hs | bsd-2-clause | 3,857 | 0 | 11 | 852 | 1,043 | 554 | 489 | 79 | 2 |
--
-- Copyright (C) 2012 Parallel Scientific. All rights reserved.
--
-- See the accompanying LICENSE file for license information.
--
-- | This module implements machinery to generate test cases
-- for the CCI Haskell bindings.
--
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE DeriveDataTypeable #-}
module TestGen
(... | tkonolige/haskell-cci | test/TestGen.hs | bsd-3-clause | 23,460 | 0 | 26 | 6,784 | 7,660 | 4,020 | 3,640 | 384 | 22 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE FlexibleInstances #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Machine.Type
-- Copyright : (C) 2012 Edward Kmett
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer : Edw... | bitemyapp/machines | src/Data/Machine/Type.hs | bsd-3-clause | 11,261 | 0 | 17 | 2,641 | 3,091 | 1,601 | 1,490 | -1 | -1 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
--
-- Copyright (c) 2009-2011, ERICSSON AB
-- All rights reserved.
--
-... | emwap/feldspar-language | src/Feldspar/Core/Frontend/Mutable.hs | bsd-3-clause | 2,637 | 0 | 8 | 472 | 313 | 189 | 124 | 29 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-| Utility functions for several parsers
This module holds the definition for some utility functions for two
parsers. The parser for the @/proc/stat@ file and the parser for the
@/proc/diskstats@ file.
-}
{-
Copyright (C) 2013 Google Inc.
All rights reserved.
Redistribution and ... | leshchevds/ganeti | src/Ganeti/Parsers.hs | bsd-2-clause | 2,392 | 0 | 10 | 376 | 154 | 91 | 63 | 15 | 1 |
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
module Network.WebSockets.Http.Tests
( tests
) where
--------------------------------------------------------------------------------
import qualified Data.Attoparsec.ByteString as A
import ... | nsluss/websockets | tests/haskell/Network/WebSockets/Http/Tests.hs | bsd-3-clause | 2,188 | 0 | 9 | 462 | 277 | 162 | 115 | 37 | 2 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Stackage.BuildPlan
( readBuildPlan
, writeBuildPlan
, writeBuildPlanCsv
) where
import qualified Data.Map as Map
import qualified Data.Set as Set
import Distrib... | feuerbach/stackage | Stackage/BuildPlan.hs | mit | 6,358 | 0 | 16 | 1,981 | 1,871 | 965 | 906 | 153 | 4 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Control.Distributed.Process.Tests.Tracing (tests) where
import Control.Distributed.Process.Tests.Internal.Utils
import Network.Transport.Test (TestTransport(..))
import Control.Concurrent (threadDelay)
import Control.Concurre... | qnikst/distributed-process-tests | src/Control/Distributed/Process/Tests/Tracing.hs | bsd-3-clause | 10,700 | 0 | 25 | 3,488 | 3,006 | 1,452 | 1,554 | -1 | -1 |
{-# OPTIONS_GHC -w #-}
{-# LANGUAGE CPP, NamedFieldPuns, GeneralizedNewtypeDeriving, FlexibleContexts #-}
-----------------------------------------------------------------------------
-- |
-- Module : Plugins.EWMH
-- Copyright : (c) Spencer Janssen
-- License : BSD-style (see LICENSE)
--
-- Maintainer :... | dragosboca/xmobar | src/Plugins/EWMH.hs | bsd-3-clause | 8,350 | 0 | 21 | 2,574 | 2,883 | 1,510 | 1,373 | 190 | 4 |
{-# OPTIONS_GHC -fwarn-unused-top-binds #-}
-- #17
module Temp (foo, bar, quux) where
top :: Int
top = 1
foo :: ()
foo = let True = True in ()
bar :: Int -> Int
bar match = 1
quux :: Int
quux = let local = True
in 2
| sdiehl/ghc | testsuite/tests/rename/should_compile/T17a.hs | bsd-3-clause | 229 | 0 | 8 | 62 | 91 | 51 | 40 | 11 | 1 |
{-# LANGUAGE TypeInType, RankNTypes, TypeFamilies #-}
module T15740a where
import Data.Kind
import Data.Proxy
type family F2 :: forall k. k -> Type
-- This should succeed
type instance F2 = Proxy
| sdiehl/ghc | testsuite/tests/indexed-types/should_compile/T15740a.hs | bsd-3-clause | 201 | 0 | 6 | 36 | 41 | 26 | 15 | -1 | -1 |
module Goo where
{-@ foo :: Num a => { z : (xs:t -> {v : (t -> a) | this = rubbish }) | wow = hi } @-}
foo :: Num a => t -> t -> a
foo _ _ = 0
| mightymoose/liquidhaskell | tests/crash/FunRef2.hs | bsd-3-clause | 144 | 0 | 7 | 46 | 35 | 19 | 16 | 3 | 1 |
{-# LANGUAGE RecursiveDo, DoRec #-}
{-# OPTIONS_GHC -fno-warn-deprecated-flags #-}
module M where
-- do, mdo and rec should all open layouts
f :: IO ()
f = do print 'a'
print 'b'
g :: IO ()
g = mdo print 'a'
print 'b'
h :: IO ()
h = do print 'a'
rec print 'b'
print 'c'
prin... | urbanslug/ghc | testsuite/tests/layout/layout008.hs | bsd-3-clause | 327 | 0 | 9 | 106 | 103 | 47 | 56 | 14 | 1 |
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
-- |
-- Module: Math.NumberTheory.GaussianIntegersTests
-- Copyright: (c) 2016 Chris Fredrickson
-- Licence: MIT
-- Maintainer: Chris Fredrickson <chris.p.fredrickson@gmail.com>
-- Stability: Provisional
--
-- Tests for Math.NumberTheory.GaussianIntegers
--
mo... | cfredric/arithmoi | test-suite/Math/NumberTheory/GaussianIntegersTests.hs | mit | 2,628 | 0 | 14 | 572 | 601 | 327 | 274 | 45 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.EXT2.Internal.LensHacks
-- Copyright : (C) 2014 Ricky Elrod
-- License : BSD2 (see LICENSE file)
-- Maintainer : Ricky Elrod <ricky@elrod.me>
-- Stability : experimental
-- Portability : lens, template-hask... | meoblast001/ext2-info | src/Data/EXT2/Internal/LensHacks.hs | mit | 1,611 | 0 | 17 | 339 | 328 | 173 | 155 | 23 | 2 |
{-# LANGUAGE UnicodeSyntax #-}
-- |
-- Module : Exercise2
-- Description : Generics by Overloading
-- Copyright : (c) Tom Westerhout, 2017
-- License : MIT
module Exercise2 (
-- * Predefined Types
UNIT(..),
EITHER(..),
PAIR(..),
CONS(..),
Bin(..),
BinG(..),
ListG(..),
--... | twesterhout/NWI-I00032-2017-Assignments | Exercise_2/Exercise2.hs | mit | 13,829 | 0 | 16 | 4,036 | 4,010 | 2,087 | 1,923 | 221 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE PatternSynonyms #-}
module Data.Functor.Infix.TH
( declareInfixFmapForFunctorCompositionOfDegree
, declareFlippedInfixFmapForFunctorCompositionOfDegree
, declareInfixFmapN
, declareInfixPamfN
) where
import... | fmap/functor-infix | src/Data/Functor/Infix/TH.hs | mit | 3,025 | 0 | 16 | 498 | 942 | 506 | 436 | -1 | -1 |
module SuperMemo where
-- Number of times in a row remembered.
type Repetitions = Integer
-- SuperMemo "Easiness Factor".
type Easiness = Rational
minEasiness = 1.3
-- Number of days until next review.
type Days = Int
data Interval = Interval {
reps :: Repetitions,
easiness :: Easiness,
days :: Days
} ... | briansunter/haskell-supermemo | src/SuperMemo.hs | mit | 1,539 | 0 | 12 | 339 | 497 | 270 | 227 | 36 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Prismic.Sample
( main
)
where
import Prismic.Api
main :: IO ()
main = do
a <- api "http://lesbonneschoses.prismic.io/api" Nothing
r <- submit a $ (search "everything")
{ searchPage = Just 1
, sea... | Herzult/haskell-kit | src/Prismic/Sample.hs | mit | 380 | 0 | 11 | 155 | 90 | 46 | 44 | 11 | 1 |
module LlvmParser where
import Text.Parsec
import Text.Parsec.Language (emptyDef)
import Text.Parsec.String (Parser)
import Control.Applicative ((<$>))
import qualified Text.Parsec.Expr as Ex
import qualified Text.Parsec.Token as Tok
import Lexer
import Syntax
binary s assoc = Ex.Infix (reservedOp s >> return (BinO... | mankyKitty/haskell-to-llvm-compiler | src/LlvmParser.hs | mit | 2,924 | 0 | 11 | 725 | 1,106 | 528 | 578 | 122 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeSynonymInstances #-}
module IHaskell.Display.Widgets.Int.BoundedInt.IntProgress (
-- * The IntProgress Widget
IntProgress,
-- * Constructor
mkIntProgress) where
-- To keep `caba... | sumitsahrawat/IHaskell | ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Int/BoundedInt/IntProgress.hs | mit | 1,693 | 0 | 13 | 399 | 276 | 156 | 120 | 35 | 1 |
import Data.Function
import Data.List
nSolutions :: Integral a => (a, a) -> a
nSolutions (a,b) = a * (a+1) * b * (b+1) `div` 4
nmax = 500
target = 2000000
pairs = [ (i,j) | i <- [1..nmax], j <- [i..nmax] ]
allAreas = zip pairs $ map nSolutions pairs
byDiff = map (\(p, a) -> (p, abs (a - target))) allAreas
answer... | arekfu/project_euler | p0085/p0085.hs | mit | 511 | 0 | 12 | 138 | 274 | 147 | 127 | 15 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
module ShrinkingAndShowingFunctions3 where
-- from https://www.youtube.com/watch?v=CH8UQJiv9Q4
import Test.QuickCheck
import Test.QuickCheck.Function
import Text.Show.Functions
prop_HaskellML (Fun _ p) =
p "Haskell 98" ==> p "Standard ML"
| NickAger/LearningHaskell | HaskellProgrammingFromFirstPrinciples/Chapter15.hsproj/ShrinkingAndShowingFunctions3.hs | mit | 282 | 0 | 7 | 34 | 49 | 28 | 21 | 7 | 1 |
{-# LANGUAGE DeriveGeneric #-}
module Kit.ListZip where
import Data.Foldable
import Data.Monoid
import GHC.Generics
import Kit.BwdFwd
data ListZip a = ListZip
{ later :: Bwd a
, focus :: a
, earlier :: Fwd a
} deriving Generic
listZipFromFwd :: Fwd a -> Maybe (ListZip a)
listZipFromFwd (a :> as) =... | kwangkim/pigment | src-lib/Kit/ListZip.hs | mit | 1,022 | 0 | 9 | 226 | 405 | 208 | 197 | 30 | 1 |
{-# htermination foldM :: (a -> b -> IO a) -> a -> [b] -> IO a #-}
import Monad
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Monad_foldM_4.hs | mit | 81 | 0 | 3 | 21 | 5 | 3 | 2 | 1 | 0 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE TypeFamilies #-}
module Fibbo where
import SoOSiM
import Expr.Syntax
import Expr.Combinators
-- import Expr.SimpleSemantics
import Expr.SoOSSemantics
fibbo = fix $ \fib ->
lam $ \n ->
newvar 0 $ \n1 ... | christiaanb/SoOSiM | examples/Fibbo.hs | mit | 1,047 | 0 | 29 | 313 | 375 | 194 | 181 | 37 | 1 |
module Data.Either.Extra where
import Prelude
import Data.Either
sameEither :: Either a b -> Either c d -> Bool
x `sameEither` y = isLeft x == isLeft y
fromEither :: Either a a -> a
fromEither (Left x) = x
fromEither (Right x) = x
| circuithub/circuithub-prelude | Data/Either/Extra.hs | mit | 234 | 0 | 7 | 47 | 103 | 53 | 50 | 8 | 1 |
{-
Copyright (c) 2015 Nils 'bash0r' Jonsson
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distr... | project-horizon/framework | src/lib/Language/JavaScript/DSL/Operators.hs | mit | 1,844 | 0 | 4 | 341 | 66 | 52 | 14 | 7 | 0 |
module Test.Hspec.Core.UtilSpec (spec) where
import Prelude ()
import Helper
import Control.Concurrent
import qualified Control.Exception as E
import Test.Hspec.Core.Util
spec :: Spec
spec = do
describe "pluralize" $ do
it "returns singular when used with 1" $ do
... | hspec/hspec | hspec-core/test/Test/Hspec/Core/UtilSpec.hs | mit | 4,405 | 0 | 23 | 1,109 | 1,070 | 528 | 542 | 85 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.