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 : Crypto.Random.Entropy.Source
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : Good
--
module Crypto.Random.Entropy.Source where
import Foreign.Ptr
import Data.Word (Word8)
-- | A handle to an entropy maker, either a sy... | vincenthz/hs-crypto-random | Crypto/Random/Entropy/Source.hs | bsd-3-clause | 702 | 0 | 10 | 158 | 96 | 57 | 39 | 7 | 0 |
{- |
Module : $Header$
Description : analyse xml update input
Copyright : (c) Christian Maeder, DFKI GmbH 2010
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : portable
collect xupdate information
<http://xmldb-org.sourceforge.n... | mariefarrell/Hets | Common/XUpdate.hs | gpl-2.0 | 7,119 | 6 | 28 | 1,845 | 2,410 | 1,195 | 1,215 | 181 | 6 |
{-# LANGUAGE NoMonomorphismRestriction, ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts, FlexibleInstances, TypeSynonymInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- |
-- Module : Data.Array.Accelerate.Test.QuickCheck.Arbitrary
-- Copyright : [2010..2011] Trevor L. McDonell
-- License : BSD3
--... | wilbowma/accelerate | Data/Array/Accelerate/Test/QuickCheck/Arbitrary.hs | bsd-3-clause | 8,457 | 0 | 17 | 1,793 | 2,779 | 1,449 | 1,330 | 155 | 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="tr-TR">
<title>Retire.js Add-on</title>
<maps>
<homeID>retire</homeID>
<mapref location... | thc202/zap-extensions | addOns/retire/src/main/javahelp/org/zaproxy/addon/retire/resources/help_tr_TR/helpset_tr_TR.hs | apache-2.0 | 964 | 77 | 67 | 156 | 413 | 209 | 204 | -1 | -1 |
module IrrefutableIn1 where
-- test for irrefutable patterns
f :: [Int] -> Int
f ~x = hd x
hd x = head x
tl x = tail x | kmate/HaRe | old/testing/introPattern/IrrefutableIn1.hs | bsd-3-clause | 121 | 0 | 6 | 30 | 51 | 26 | 25 | 5 | 1 |
{-# LANGUAGE Trustworthy #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.STRef
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- Stability :... | ezyang/ghc | libraries/base/Data/STRef.hs | bsd-3-clause | 1,913 | 0 | 10 | 432 | 217 | 134 | 83 | 17 | 1 |
{-
(c) The University of Glasgow 2006
(c) The AQUA Project, Glasgow University, 1993-1998
\section[TcAnnotations]{Typechecking annotations}
-}
{-# LANGUAGE CPP #-}
module TcAnnotations ( tcAnnotations, annCtxt ) where
#ifdef GHCI
import {-# SOURCE #-} TcSplice ( runAnnotation )
import Module
import DynFlags
import ... | wxwxwwxxx/ghc | compiler/typecheck/TcAnnotations.hs | bsd-3-clause | 2,217 | 0 | 14 | 444 | 238 | 130 | 108 | 19 | 1 |
{-# LANGUAGE GADTs #-}
module T4087 where
data Equal a b where
Equal :: Equal a a
| urbanslug/ghc | testsuite/tests/ghci/scripts/T4087.hs | bsd-3-clause | 89 | 0 | 6 | 24 | 21 | 14 | 7 | 4 | 0 |
{-# LANGUAGE StandaloneDeriving #-}
module Main where
import T9830a
deriving instance (Show a, Show b) => Show (ADT a b)
main :: IO ()
main = do
putStrLn $ "Prec 6: " ++ showsPrec 6 ("test" :?: "show") ""
putStrLn $ "Prec 7: " ++ showsPrec 7 ("test" :?: "show") ""
putStrLn $ "Prec 9: " ++ showsPrec ... | ghc-android/ghc | testsuite/tests/deriving/should_run/T9830.hs | bsd-3-clause | 412 | 0 | 10 | 100 | 154 | 78 | 76 | 10 | 1 |
{-# LANGUAGE RankNTypes, ScopedTypeVariables #-}
-- This fails, because the type in the pattern doesn't exactly match
-- the context type. We don't do subsumption in patterns any more.
-- GHC 7.0: now we do again
module Foo where
foo :: (forall c. c -> c) -> [Char]
foo (f :: forall a. [a] -> [a]) = f undefined
| forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/typecheck/should_fail/tcfail145.hs | bsd-3-clause | 318 | 0 | 10 | 65 | 65 | 39 | 26 | 4 | 1 |
-- | Carefully optimised implementations of GPU transpositions.
-- Written in ImpCode so we can compile it to both CUDA and OpenCL.
module Futhark.CodeGen.ImpGen.GPU.Transpose
( TransposeType (..),
TransposeArgs,
mapTransposeKernel,
)
where
import Futhark.CodeGen.ImpCode.GPU
import Futhark.IR.Prop.Types
im... | diku-dk/futhark | src/Futhark/CodeGen/ImpGen/GPU/Transpose.hs | isc | 14,525 | 0 | 26 | 5,727 | 3,028 | 1,599 | 1,429 | 321 | 10 |
{-# LANGUAGE TupleSections, ViewPatterns #-}
{-# LANGUAGE ScopedTypeVariables, OverloadedStrings, PatternGuards, QuasiQuotes #-}
module Control.OperationalTransformation.JSON.Compose where
import Control.OperationalTransformation.JSON.Types
import Control.OperationalTransformation.JSON.Util
import Control.Operational... | thomasjm/ot.hs | src/Control/OperationalTransformation/JSON/Compose.hs | mit | 2,553 | 0 | 14 | 405 | 865 | 436 | 429 | 38 | 2 |
module Tools.Formatting (
prefix_spaces,
postfix_spaces
) where
postfix_spaces :: String -> Int -> String
postfix_spaces string len =
postfix_string string (len - (length string)) " "
prefix_spaces :: String -> Int -> String
prefix_spaces string len =
prefix_string string (len - (length string)) " "
... | quintenpalmer/fresh | haskell/src/Tools/Formatting.hs | mit | 701 | 0 | 9 | 171 | 224 | 119 | 105 | 19 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Text.CommonParsers where
import Prelude hiding (takeWhile)
import Control.Monad
import Control.Applicative
import Data.Attoparsec.Text
import Data.Attoparsec.Combinator
import Data.Text (Text, pack)
oneOf = choice . fmap char
ignored = comment <|> spaces
where
spa... | AKST/scheme.llvm | src/Text/CommonParsers.hs | mit | 776 | 0 | 12 | 185 | 246 | 128 | 118 | 25 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Language.Haskell.TypeCheck.Types where
import Control.Monad.ST
import Control.Monad.ST.Unsafe
import Data.Data
import Data.STRef
import GHC.Generics
imp... | Lemmih/haskell-tc | src/Language/Haskell/TypeCheck/Types.hs | mit | 9,901 | 0 | 18 | 2,576 | 3,545 | 1,780 | 1,765 | 228 | 9 |
module Tak.Display where
import qualified UI.HSCurses.CursesHelper as CH
import qualified UI.HSCurses.Curses as C
import Prelude
import Control.Monad
import Control.Monad.Writer
import Data.Char (chr, ord)
import Data.Bits ( (.|.) )
import System.Locale.SetLocale
import qualified Data.ByteString as B
import qualified ... | sixohsix/tak | src/Tak/Display.hs | mit | 5,499 | 0 | 19 | 1,375 | 2,001 | 996 | 1,005 | 148 | 7 |
{-# OPTIONS_HADDOCK hide, prune #-}
module Handler.Mooc.ViewProposal
( getViewProposalR
) where
import Import
getViewProposalR :: ScenarioId -> Handler Html
getViewProposalR scId = do
setSafeSession userSessionQuaViewMode "view"
setSafeSession userSessionScenarioId scId
redirect HomeR
| mb21/qua-kit | apps/hs/qua-server/src/Handler/Mooc/ViewProposal.hs | mit | 299 | 0 | 7 | 44 | 58 | 29 | 29 | 9 | 1 |
module Display (display,reshape) where
import Graphics.Rendering.OpenGL
import Util.Util
import MyndState
import MyndNet
calcWidth (MyndNode _ _ w []) = w + 50
calcWidth (MyndNode _ _ w c@(cx:cxs)) = max (sum $ map calcWidth c) w
display :: MyndState -> IO ()
display state1 = do
clearColor $= Color4 1 1 1 1
clea... | andrey013/mynd | src/Display.hs | mit | 2,899 | 0 | 18 | 857 | 1,092 | 579 | 513 | 55 | 2 |
module Game where
import Data.Array.IArray
import Data.Array.IO
import Data.Array.MArray
import Data.Array.Unboxed
import Data.IORef
import Data.List
import Graphics.UI.Gtk hiding (on,get)
import qualified Graphics.UI.Gtk as G
import Numeric.LinearAlgebra ((<>),(><),(|>),(@>),(@@>),Vector,Matrix)
import qualified Nu... | benjaminjkraft/nmines | Game.hs | mit | 3,613 | 0 | 22 | 913 | 1,304 | 668 | 636 | 87 | 2 |
module Main
where
import Data.Monoid (mempty)
import Test.Framework.Options (TestOptions, TestOptions'(..))
import Test.Framework.Runners.Options (RunnerOptions, RunnerOptions'(..))
import Test.Framework (Test, defaultMainWithOpts)
import qualified UntypedLambdaTests
main :: IO ()
main = do
let emptyTestOpts = m... | mmakowski/ambc | test/Test.hs | mit | 629 | 1 | 12 | 85 | 168 | 97 | 71 | 15 | 1 |
{-# LANGUAGE DeriveFunctor, GeneralizedNewtypeDeriving #-}
module Lisp.Runtime (eval, evalSeq, reduce) where
import Prelude hiding (lookup)
import Control.Monad.State
import Control.Applicative
import Lisp.Spefication
import Data.SyntaxIR
import Data.Maybe
import qualified Data.Map as M
type Eval a = State Environ... | AKST/lisp.hs | src/Lisp/Runtime.hs | mit | 3,502 | 0 | 16 | 1,061 | 1,239 | 624 | 615 | 87 | 10 |
{-# LANGUAGE OverloadedStrings #-}
module Esthree.Parser where
import Data.Attoparsec.Text
import Control.Applicative
import Esthree.Types
import Aws.S3
s3Command :: Parser S3Command
s3Command = listBucketsCmd <|>
listBucketCmd <|>
putBucketCmd <|>
helpCmd <|>
... | schell/esthree | Esthree/Parser.hs | mit | 1,499 | 0 | 10 | 448 | 361 | 183 | 178 | 49 | 1 |
-- Warm-up and review
-- 1
stops = "pbtdkg"
vowels = "aeiou"
-- a)
tuples = [ (a, b, c) | a <- stops, b <- vowels, c <- stops ]
-- b)
tuplesP = [ (a, b, c) | a <- stops, b <- vowels, c <- stops, a == 'p' ]
-- c)
nouns = ["balance", "farm", "coal", "fall", "chin", "fire"]
verbs = ["yell", "pull", "admire", "learn", "vis... | ashnikel/haskellbook | ch10/ch10.10_ex.hs | mit | 1,785 | 0 | 12 | 472 | 936 | 519 | 417 | 43 | 2 |
{-# LANGUAGE ConstraintKinds #-}
module GHCJS.DOM.EventM
(
EventM(..)
, SaferEventListener(..)
, EventName
, newListener
, newListenerSync
, newListenerAsync
, addListener
, removeListener
, releaseListener
, on
, event
, eventTarget
, target
, eventCurrentTarget
, eventPhase
, bubbles
, cancelable
, timeStamp
, stop... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/EventM.hs | mit | 8,714 | 0 | 14 | 1,576 | 2,938 | 1,510 | 1,428 | 234 | 1 |
{- Chapter 14 :: Monads and more -}
import Data.Monoid -- importing this will cause an "Ambiguous
-- occurrence" error with our user defined ‘Sum’ type
import Data.Foldable
{-
class Monoid a where
mempty :: a
mppend :: a -> a -> a
mconcat :: [a] -> a
mconcat = foldr mappend ... | rad1al/hutton_exercises | notes_ch14.hs | gpl-2.0 | 10,213 | 0 | 9 | 2,568 | 651 | 334 | 317 | 30 | 2 |
{-# LANGUAGE OverloadedStrings, CPP #-}
module Bot.Config
( loadConfig
) where
import Bot.Types
import Data.Configurator
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative ((<$>), (<*>))
#endif
loadConfig :: IO Config
loadConfig = do
f <- load [ Required "/etc/h4h-bot.cfg" ]
Config <$> require f "bot.toke... | house4hack/h4h-bot | src/Bot/Config.hs | gpl-3.0 | 476 | 0 | 12 | 103 | 118 | 63 | 55 | 14 | 1 |
module Language.SMTLib2.Composite.Domains where
import Language.SMTLib2 hiding (select,store)
import Language.SMTLib2.Composite.Class
import Language.SMTLib2.Internals.Type.Nat
import Language.SMTLib2.Internals.Type (bvPred,bvSucc,bvAdd,bvSub,bvMul,bvNegate,bvDiv,bvMod,bvMinValue,bvMaxValue,bwSize,BitWidth(..),withBW)... | hguenther/smtlib2 | extras/composite/Language/SMTLib2/Composite/Domains.hs | gpl-3.0 | 57,849 | 1,201 | 27 | 17,806 | 23,887 | 12,388 | 11,499 | -1 | -1 |
-- | CodeUI textxs
{-# OPTIONS -O0 #-}
{-# LANGUAGE TemplateHaskell, DerivingVia #-}
module Lamdu.I18N.CodeUI where
import qualified Control.Lens as Lens
import qualified Data.Aeson.TH.Extended as JsonTH
import GUI.Momentu.Animation.Id (ElemIds)
import Lamdu.Prelude
data CodeUI a = CodeUI
{ _... | Peaker/lamdu | src/Lamdu/I18N/CodeUI.hs | gpl-3.0 | 2,460 | 0 | 8 | 762 | 622 | 405 | 217 | -1 | -1 |
import Data.List
import System.Environment
import Control.Monad (when)
solveRPN :: [String] -> Float
solveRPN = head . foldl foldingFunc []
where foldingFunc (x:y:ys) "*" = x * y:ys
foldingFunc (x:y:ys) "/" = x / y:ys
foldingFunc (x:y:ys) "-" = x - y:ys
foldingFunc (x:y:ys) "+" = x +... | jonfk/rpn-calc | src/Main.hs | gpl-3.0 | 971 | 0 | 14 | 302 | 348 | 171 | 177 | 26 | 8 |
Store (set (set a s)) (get (set a s)) = Store (set a) s | hmemcpy/milewski-ctfp-pdf | src/content/3.9/code/haskell/snippet13.hs | gpl-3.0 | 55 | 1 | 9 | 13 | 51 | 24 | 27 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
module Database.Design.Ampersand.Output.ToPandoc.ChapterDiagnosis where
import Database.Design.Ampersand.Output.ToPandoc.SharedAmongChapters
import Data.List(nub,partition)
import Data.Maybe(isJust)
chpDiagnosis :: FSpec -> (Blocks,[Picture])
chp... | 4ZP6Capstone2015/ampersand | src/Database/Design/Ampersand/Output/ToPandoc/ChapterDiagnosis.hs | gpl-3.0 | 28,814 | 1 | 27 | 12,233 | 6,647 | 3,468 | 3,179 | 423 | 47 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserLandingPages/List.hs | mpl-2.0 | 10,451 | 0 | 28 | 2,767 | 1,622 | 925 | 697 | 231 | 1 |
-- Copyright © 2014 Bart Massey
-- Based on material Copyright © 2013 School of Haskell
-- https://www.fpcomplete.com/school/advanced-haskell/
-- building-a-file-hosting-service-in-yesod
-- This work is made available under the "GNU AGPL v3", as
-- specified the terms in the file COPYING in this
-- distribution.
{-... | BartMassey/hgallery | Foundation.hs | agpl-3.0 | 2,723 | 0 | 13 | 660 | 658 | 338 | 320 | 82 | 4 |
module HaskellSetup where
{- This is the low-level stuff that hooks into the ncurses library, together
with the Haskell versions of the Agda types. You should not need to bother
reading or modifying this file. -}
import Debug.Trace
import Foreign
import Foreign.C (CInt(..))
import ANSIEscapes
import System.IO
import ... | pigworker/CS410-14 | Ex5/HaskellSetup.hs | unlicense | 3,521 | 0 | 22 | 915 | 1,457 | 769 | 688 | 108 | 10 |
module Haskoin.Crypto.Point
( Point( InfPoint )
, makePoint
, makeInfPoint
, getAffine, getX, getY
, validatePoint
, isInfPoint
, addPoint
, doublePoint
, mulPoint
, shamirsTrick
, curveB
) where
import Data.Maybe (isJust, fromJust)
import Data.Bits (testBit, shiftR, bitSize)
import Control.Applicative ((<$>), (<*>))... | lynchronan/haskoin-crypto | src/Haskoin/Crypto/Point.hs | unlicense | 4,094 | 0 | 14 | 1,267 | 1,466 | 786 | 680 | 105 | 3 |
module S1E9 where
allEqual :: (Eq a) => [a] -> Bool
allEqual xs = and ( map (== head xs) (tail xs) )
lengthEqual :: [[Int]] -> Bool
lengthEqual xss = allEqual (map length xss)
totalRows :: [[Int]] -> [Int]
totalRows = map sum
transpose :: [[Int]] -> [[Int]]
transpose ([]:_) = []
transpose xss = map head xss : trans... | wouwouwou/module_8 | src/main/haskell/series1/exercise9.hs | apache-2.0 | 464 | 0 | 9 | 90 | 256 | 137 | 119 | 13 | 1 |
module Main where
import qualified Data.List as List
import qualified Data.Set as Set
import Data.Version (showVersion)
import Paths_sarsi (version)
import qualified Rosetta as Rosetta
import Sarsi (getBroker, getSockAddr, getTopic, title)
import Sarsi.Processor (languageProcess, processAll, processAny)
import Sarsi.T... | aloiscochard/sarsi | sarsi/Main.hs | apache-2.0 | 1,575 | 0 | 20 | 340 | 535 | 284 | 251 | 37 | 10 |
{- |
Module : Text.Tabl.Util
Description : Various utilities
Copyright : (c) 2016-2020 Daniel Lovasko
License : BSD2
Maintainer : Daniel Lovasko <daniel.lovasko@gmail.com>
Stability : stable
Portability : portable
Set of general utilities that are used across the whole project.
-}
module Text.Tabl.Util... | lovasko/tabl | src/Text/Tabl/Util.hs | bsd-2-clause | 1,525 | 0 | 9 | 376 | 302 | 174 | 128 | 31 | 2 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, UndecidableInstances, NoImplicitPrelude, PackageImports #-}
module Control.Monad.Pause (PauseT, pause, stepPause, runPauseT, runPause) where
import "base" Prelude
import Control.Applicative
import Control.Monad
import Control.Monad.Except
imp... | 3of8/mockio | Pause.hs | bsd-2-clause | 1,985 | 0 | 13 | 377 | 762 | 401 | 361 | 49 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-|
Module: HaskHOL.Core.Lib
Copyright: (c) Evan Austin 2015
LICENSE: BSD3
Maintainer: e.c.austin@gmail.com
Stability: unstable
Portability: unknown
This module defines or re-exports common utility functions, type classes,
and auxilliary data types used in... | ecaustin/haskhol-core | src/HaskHOL/Core/Lib.hs | bsd-2-clause | 42,441 | 6 | 16 | 11,797 | 13,075 | 6,948 | 6,127 | 803 | 21 |
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances #-}
-- | Helpers for instantiating transitive and reflexive instances of Iterable.
module Data.Iterable.Instantiate(self_iterable ,
trans_iterable) where
import Language.Haskell.TH.Syntax
import ... | BioHaskell/iterable | Data/Iterable/Instantiate.hs | bsd-3-clause | 1,945 | 0 | 5 | 690 | 71 | 48 | 23 | 23 | 1 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Email.Rules
( rules ) where
import ... | facebookincubator/duckling | Duckling/Email/Rules.hs | bsd-3-clause | 851 | 0 | 17 | 167 | 185 | 114 | 71 | 23 | 2 |
module Text.Nagato.Query.IO where
import Text.Nagato.Query.Trigram
import Text.Nagato.Models
import Data.Either.Unwrap
import Data.Serialize
import Data.ByteString as BS
writeModel :: FilePath -> [([Int], Probs (Trigram String))] -> IO()
writeModel filePath model = do
let bytes = encode model
BS.writeFile filePa... | haru2036/nl-query | Text/Nagato/Query/IO.hs | bsd-3-clause | 560 | 0 | 15 | 88 | 214 | 114 | 100 | 15 | 1 |
{-# LANGUAGE BangPatterns, OverloadedStrings #-}
-- |
-- Module: Data.Aeson.Encode.Builder
-- Copyright: (c) 2011 MailRank, Inc.
-- (c) 2013 Simon Meier <iridcode@gmail.com>
-- License: Apache
-- Maintainer: Bryan O'Sullivan <bos@serpentine.com>
-- Stability: experimental
-- Portability: por... | nurpax/aeson | Data/Aeson/Encode/Builder.hs | bsd-3-clause | 4,661 | 0 | 14 | 975 | 1,502 | 818 | 684 | 101 | 2 |
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Prelude (IO)
import qualified Sound.Driver.Jack as Driver
import Sound.Amplifier
import Sound.Oscillators
import Language.Frontend
main :: IO ()
main = do
Driver.runAudioFun $(compile (square 440 48000 >>> amp 0.5))
| svenkeidel/hsynth | examples/ExampleJack.hs | bsd-3-clause | 318 | 0 | 13 | 80 | 82 | 46 | 36 | 10 | 1 |
import AI.MDP
import AI.MDP.GridWorld
gv = initVals $ absorb (2,2) 100 $ gridWorld (10, 10) 0.5 0 scatterActions (map (\x -> (x, 6)) [0..6])
main = do
putStrLn "Rewards:"
showRewards gv
putStrLn "\n\nInit Values:"
print gv
putStrLn "\n\nValues after 100 Iterations:"
print $ iterVals 100 gv
| chetant/mdp | test/Test.hs | bsd-3-clause | 305 | 1 | 11 | 60 | 130 | 63 | 67 | 10 | 1 |
-----------------------------------------------------------------------------
--
-- Module : Language.Haskell.Pretty.PrettyUtils
-- Copyright :
-- License : AllRightsReserved
--
-- Maintainer :
-- Stability :
-- Portability :
--
-- Utilities functions for pretty printting
--
----------------------------... | emcardoso/CTi | src/Haskell/Pretty/PrettyUtils.hs | bsd-3-clause | 10,279 | 59 | 16 | 2,622 | 3,096 | 1,666 | 1,430 | 211 | 4 |
{-# LANGUAGE
TemplateHaskell,
TypeFamilies,
TupleSections,
MultiParamTypeClasses,
FunctionalDependencies,
FlexibleInstances,
OverloadedStrings,
GeneralizedNewtypeDeriving,
FlexibleContexts,
RankNTypes,
NoImplicitPrelude
#-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module DB
(
-- * Types
Session,
User(..),
n... | neongreen/hat | src/DB.hs | bsd-3-clause | 24,026 | 0 | 25 | 6,388 | 7,407 | 3,846 | 3,561 | -1 | -1 |
module Servant.Servant.Utils where
infixl 4 <$$>
(<$$>) :: (Functor f, Functor f') => (a -> b) -> f (f' a) -> f (f' b)
(<$$>) = fmap . fmap
| jkarni/servant-servant | src/Servant/Servant/Utils.hs | bsd-3-clause | 141 | 0 | 10 | 30 | 78 | 44 | 34 | 4 | 1 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.APPLE.RGB422
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : ... | haskell-opengl/OpenGLRaw | src/Graphics/GL/APPLE/RGB422.hs | bsd-3-clause | 741 | 0 | 5 | 103 | 62 | 45 | 17 | 10 | 0 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NamedFieldPuns #-}
module Test.Complexity.Chart ( statsToChart
, quickStatsToChart
, showStatsChart
) where
import Graphics.Rendering.Chart
import Graphics.Rendering.Chart.Gtk
import D... | adarqui/Complexity | Test/Complexity/Chart.hs | bsd-3-clause | 3,773 | 0 | 21 | 1,395 | 865 | 457 | 408 | 71 | 1 |
{-# LANGUAGE TemplateHaskell,TypeOperators#-}
module Product where
import Data.Monoid hiding(Product)
import Data.Functor.Product
import Data.Traversable
import Data.Functor.Compose
import Data.Distributive
import CartesianProduct
import Control.Applicative
import Control.Lens.TH
import SemiProduct
import Linear.Matri... | massudaw/mtk | Product.hs | bsd-3-clause | 867 | 0 | 13 | 207 | 396 | 216 | 180 | 25 | 0 |
module TypeSystem.Parser.ExpressionParser (MEParseTree, typeAs, parseExpression, parseExpression', dynamicTranslate) where
{-
This module defines a parser for expressions.
In this approach, we tokenize first to a tree, and then try to match a rule with it by typing the rule.
-}
import TypeSystem.Parser.ParsingUtils
i... | pietervdvn/ALGT | src/TypeSystem/Parser/ExpressionParser.hs | bsd-3-clause | 12,788 | 468 | 34 | 2,596 | 4,356 | 2,253 | 2,103 | 226 | 3 |
{-|
Module : Idris.Docs
Description : Data structures and utilities to work with Idris Documentation.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE DeriveFunctor, PatternGuards, MultiWayIf #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module Idris.Docs (
pprintDocs
... | ozgurakgun/Idris-dev | src/Idris/Docs.hs | bsd-3-clause | 17,381 | 0 | 25 | 6,116 | 5,482 | 2,778 | 2,704 | 323 | 24 |
module Generics.GPAH.Interp.PPrint where
import Generics.GPAH.Interp.Base
import Text.CSV
import System.IO
import qualified Data.Map as M
import Data.List
import Data.Function (on)
pprint :: Analysis -> FilePath -> IO ()
pprint (Analysis a1) fp = do
let p = [["NrTypes", show $ length $ concat $ M.elems a1],
... | bezirg/gpah | src/Generics/GPAH/Interp/PPrint.hs | bsd-3-clause | 559 | 0 | 21 | 119 | 203 | 111 | 92 | 15 | 1 |
module System.Nemesis.Jinjing.Cabal where
import System.Nemesis.Env
import System.Nemesis (Unit)
import Air.Env
import Prelude ()
cabal_dist :: Unit
cabal_dist = do
desc "prepare cabal dist"
task "dist" - do
sh "cabal clean"
sh "cabal configure"
sh "cabal sdist" | nfjinjing/nemesis-jinjing | src/System/Nemesis/Jinjing/Cabal.hs | bsd-3-clause | 282 | 0 | 10 | 55 | 79 | 41 | 38 | 12 | 1 |
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
-- | Functions to modify prepend common Changelog entries.
module Ops.Changelog where
import Ops.Common
import Data.Text (Text)
import qualified Data.Text ... | diagrams/package-ops | src/Ops/Changelog.hs | bsd-3-clause | 1,337 | 0 | 14 | 340 | 329 | 179 | 150 | 26 | 3 |
{-# LANGUAGE TypeSynonymInstances #-}
module Types.Hitbox where
import Types.Drawable
import Graphics.Gloss.Data.Picture
import Graphics.Gloss.Data.Point
import Graphics.Gloss.Geometry
import Graphics.Gloss.Geometry.Line
import Graphics.Gloss.Geometry.Angle
class (Drawable a)=> Hitbox a where
hitTest :: a ... | Smurf/dodgem | src/Types/Hitbox.hs | bsd-3-clause | 359 | 0 | 8 | 50 | 78 | 49 | 29 | 10 | 0 |
{-# LANGUAGE QuasiQuotes #-}
import LiquidHaskell
[lq| isEven, isOdd :: Nat -> Bool |]
isEven :: Int -> Bool
isEven 0 = True
isEven n = isOdd $ n - 1
isOdd 0 = False
isOdd m = isEven $ m - 1
| spinda/liquidhaskell | tests/gsoc15/unknown/pos/Even.hs | bsd-3-clause | 200 | 0 | 6 | 52 | 74 | 38 | 36 | 8 | 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.Numeral.ES.Tests
( tests ) where
import Prelude
import Data.String
import Test.Tasty
import D... | facebookincubator/duckling | tests/Duckling/Numeral/ES/Tests.hs | bsd-3-clause | 2,196 | 0 | 12 | 418 | 552 | 312 | 240 | 48 | 1 |
-- | Generic class with properties and methods that are available for all
-- different implementations ('IntPSQ', 'OrdPSQ' and 'HashPSQ').
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Data.PSQ.Class
( PSQ (... | meiersi/psqueues-old | tests/Data/PSQ/Class.hs | bsd-3-clause | 4,085 | 83 | 49 | 1,407 | 1,439 | 731 | 708 | 116 | 0 |
{-# LANGUAGE TemplateHaskell #-}
module Client.KeyFuncT where
import Control.Lens (makeLenses)
import Types
makeLenses ''KeyFuncT
| ksaveljev/hake-2 | src/Client/KeyFuncT.hs | bsd-3-clause | 153 | 0 | 6 | 37 | 28 | 16 | 12 | 5 | 0 |
{-# LANGUAGE PackageImports, NamedFieldPuns #-}
module Data.Tree23.Entry where
import Data.Maybe
import Data.Ord
import qualified "dlist" Data.DList as D
-- import Data.Monoid (Monoid, mempty, mappend, (<>), mconcat)
data Valid = Valid | Invalid deriving (Eq, Show)
data Entry k v = Entry {key :: k, value :: v, valid... | griba2001/tree23-map-set | src/Data/Tree23/Entry.hs | bsd-3-clause | 2,131 | 4 | 10 | 495 | 897 | 457 | 440 | 39 | 2 |
{- |
Module : $Header$
Copyright : Felix Gabriel Mance
License : GPLv2 or higher, see LICENSE.txt
Maintainer : f.mance@jacobs-university.de
Stability : provisional
Portability : portable
Static analysis for OWL 2
-}
module OWL2.StaticAnalysis where
import OWL2.Sign
import OWL2.Morphism
import OW... | keithodulaigh/Hets | OWL2/StaticAnalysis.hs | gpl-2.0 | 21,989 | 257 | 21 | 6,883 | 6,472 | 3,268 | 3,204 | 439 | 23 |
module Rasa.Internal.ActionSpec where
import Test.Hspec
spec :: Spec
spec = return ()
| samcal/rasa | rasa/test/Rasa/Internal/ActionSpec.hs | gpl-3.0 | 88 | 0 | 6 | 14 | 27 | 16 | 11 | 4 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Dense.Mutable
-- Copyright : (c) Christopher Chalmers
-... | cchalmers/dense | src/Data/Dense/Mutable.hs | bsd-3-clause | 11,197 | 0 | 16 | 2,447 | 3,536 | 1,851 | 1,685 | 178 | 1 |
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Control.Applicative
import Control.Arrow
import Control.Monad
import Control.Monad.IO.Class
import Data.Aeson (object, (.=))
import Data.Default
import quali... | ucsd-progsys/nanomaly | bin/Main.hs | bsd-3-clause | 17,258 | 0 | 33 | 6,646 | 3,308 | 1,650 | 1,658 | 240 | 4 |
------------------------------------------------------------------------
-- |
-- Module : ALife.Creatur.Wain.Iomha.ActionQC
-- Copyright : (c) Amy de Buitléir 2013-2016
-- License : BSD-style
-- Maintainer : amy@nualeargais.ie
-- Stability : experimental
-- Portability : portable
--
-- QuickCheck te... | mhwombat/creatur-wains-iomha | test/ALife/Creatur/Wain/Iomha/ActionQC.hs | bsd-3-clause | 1,265 | 0 | 9 | 177 | 188 | 118 | 70 | 20 | 1 |
-- | Common config and debugging functions. Imported by most modules.
module Data.Array.Parallel.Base
( -- * Debugging infrastructure
module Data.Array.Parallel.Base.Config
, module Data.Array.Parallel.Base.Debug
-- * Data constructor rags
, module Data.Array.Parallel.Base.... | mainland/dph | dph-base/Data/Array/Parallel/Base.hs | bsd-3-clause | 554 | 0 | 6 | 127 | 92 | 68 | 24 | 11 | 0 |
{-# LANGUAGE PatternGuards, DeriveDataTypeable #-}
-- | Interned strings
module General.IString(
IString, fromIString, toIString
) where
import Data.Data
import Data.IORef
import Control.DeepSeq
import Data.String
import qualified Data.Map as Map
import System.IO.Unsafe
data IString = IString {-# UNPACK #-}... | BartAdv/hoogle | src/General/IString.hs | bsd-3-clause | 1,246 | 0 | 18 | 248 | 429 | 222 | 207 | 32 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-cloudfront/gen/Network/AWS/CloudFront/GetCloudFrontOriginAccessIdentity.hs | mpl-2.0 | 4,835 | 0 | 11 | 903 | 518 | 311 | 207 | 63 | 1 |
module TestImport
( module TestImport
, module X
) where
import Application (makeFoundation, makeLogWare)
import ClassyPrelude as X
import Database.Persist as X hiding (get)
import Database.Persist.Sql (SqlPersistM, SqlBackend, runSqlPersistMPool, rawExecute, rawSql, unSingle, connE... | Drezil/FFF | test/TestImport.hs | apache-2.0 | 1,805 | 0 | 14 | 435 | 447 | 239 | 208 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ViewPatterns #-}
-- | Tag a Store instance with structural version info to ensure we're
-- reading ... | AndreasPK/stack | src/Data/Store/VersionTagged.hs | bsd-3-clause | 4,232 | 0 | 20 | 1,175 | 1,075 | 552 | 523 | 90 | 3 |
{-# LANGUAGE ForeignFunctionInterface #-}
{-# OPTIONS_GHC -fwarn-unused-imports #-}
-- #1386
-- We do not want a warning about unused imports
module Foo () where
import Control.Monad (liftM)
foo :: IO ()
foo = id `liftM` return ()
foreign export ccall "hs_foo" foo :: IO ()
| sdiehl/ghc | testsuite/tests/rename/should_compile/rn058.hs | bsd-3-clause | 279 | 0 | 7 | 50 | 64 | 38 | 26 | 7 | 1 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableSuperClasses #-}
module T10592 where
import Data.Kind (Type)
import Prelude (Bool(True,False),Integer,Ordering)
import qualified Prelude
--------------------
-- class hierarchy
class Boolean (Logic a) => Eq a where
type Logi... | sdiehl/ghc | testsuite/tests/typecheck/should_compile/T10592.hs | bsd-3-clause | 2,430 | 0 | 9 | 646 | 972 | 513 | 459 | -1 | -1 |
module LibSpec where
import Test.Hspec
import Test.Hspec.QuickCheck
import Lib (ourAdd)
main :: IO ()
main = hspec spec
spec :: Spec
spec =
describe "Lib" $ do
it "works" $ do
True `shouldBe` True
prop "ourAdd is commutative" $ \x y ->
ourAdd x y `shouldBe` ourAdd y x
| jamesdabbs/leeloo | test/LibSpec.hs | bsd-3-clause | 295 | 0 | 11 | 75 | 110 | 58 | 52 | 13 | 1 |
import XMonad
import XMonad.Config.Gnome
import XMonad.Hooks.DynamicLog
import Control.OldException
import DBus
import DBus.Connection
import DBus.Message
main :: IO ()
main = withConnection Session $ \dbus -> do
getWellKnownName dbus
xmonad $ gnomeConfig
{ logHook = dynamicLogWithPP (prettyPrinter... | theeternalsw0rd/ports-2012 | x11-misc/xmonad-log-applet/files/xmonad.hs | gpl-2.0 | 1,801 | 0 | 14 | 441 | 562 | 287 | 275 | 46 | 5 |
module Recursive2 where
-- source functions
f1 :: Int -> [a] -> [a]
f1 _ [] = []
f1 0 xs = []
f1 n (x:xs) = x : (f1 (n-1) xs)
f2 :: Int -> [a] -> [a]
f2 _ [] = []
f2 0 xs = xs
f2 n (x:xs) = f2 (n-1) xs
f3 :: Int -> Int
f3 42 = 56 | mpickering/HaRe | old/testing/merging/Recursive2_TokOut.hs | bsd-3-clause | 232 | 0 | 9 | 67 | 175 | 94 | 81 | 11 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.ForeignPtr.Safe
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
--... | jtojnar/haste-compiler | libraries/ghc-7.8/base/Foreign/ForeignPtr/Safe.hs | bsd-3-clause | 1,501 | 0 | 4 | 345 | 92 | 71 | 21 | 16 | 0 |
{-# OPTIONS_GHC -fwarn-incomplete-patterns -fwarn-overlapping-patterns #-}
module PMC006 where
len :: [a] -> Int
len xs = case xs of
[] -> 0
(_:ys) -> case () of
() | (_:_) <- xs -> 1 + len ys
-- -- we would like these to work too but they don't yet
--
-- len :: [a] -... | olsner/ghc | testsuite/tests/pmcheck/should_compile/pmc006.hs | bsd-3-clause | 541 | 0 | 16 | 211 | 100 | 58 | 42 | 7 | 2 |
module T3303 where
import T3303A
bar :: Int
bar = foo
bar2 :: Int
bar2 = foo2
| sdiehl/ghc | testsuite/tests/parser/should_compile/T3303.hs | bsd-3-clause | 82 | 0 | 4 | 21 | 27 | 17 | 10 | 6 | 1 |
{-# LANGUAGE GADTs #-}
module Handler.People
( people
) where
import Model
import Handler.Helpers
import View.People
people :: App Response
people = routeResource $ defaultActions {
resActionList = peopleList
, resActionNew = peopleNew
, resActionEdit = peopleEdit
, resActionShow = peopleShow
, resAct... | flipstone/glados | src/Handler/People.hs | mit | 1,872 | 0 | 12 | 349 | 599 | 300 | 299 | 52 | 1 |
module Language.Jass.Runtime.Natives(
callNativeBinder
) where
import Language.Jass.JIT.Calling
import Language.Jass.JIT.Module
import LLVM.General.AST as LLVMAST
import Control.Monad.Trans.Except
import Foreign.Ptr
type NativeBinder = FunPtr () -> IO ()
foreign import ccall "dynamic"
mkNativeBinder :: FunPtr N... | NCrashed/hjass | src/library/Language/Jass/Runtime/Natives.hs | mit | 598 | 0 | 9 | 77 | 175 | 96 | 79 | 13 | 1 |
module GridLand
( Config(..)
, Color(..)
, Stretch(..)
, ColorFilter(..)
, Angle(..)
, Backdrop(..)
, Input(..)
, Key(..)
, KeyState(..)
, Location(..)
, ToSprite(..)
, BackdropImage
, Sprite
, Sfx
, Music
, GridLand
, titleBar
, loadSprite
, l... | jxv/gridland | src/GridLand.hs | mit | 19,524 | 0 | 22 | 4,577 | 7,164 | 3,641 | 3,523 | -1 | -1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.SVGAngle
(js_newValueSpecifiedUnits, newValueSpecifiedUnits,
js_convertToSpecifiedUnits, convertToSpecifiedUnits,
pattern SVG_ANGLETYPE_UNKNOWN, pattern SVG_ANGLETYPE_UNSPECIFIED,
pa... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SVGAngle.hs | mit | 5,366 | 66 | 10 | 786 | 1,110 | 624 | 486 | 81 | 1 |
module GHCJS.DOM.DelayNode (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/DelayNode.hs | mit | 39 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
myLength :: [a] -> Int
myLength = foldr (\ _ x -> 1 + x) 0
| tamasgal/haskell_exercises | 99questions/Problem04.hs | mit | 59 | 0 | 8 | 16 | 37 | 20 | 17 | 2 | 1 |
-- | Settings are centralized, as much as possible, into this file. This
-- includes database connection settings, static file locations, etc.
-- In addition, you can configure a number of different aspects of Yesod
-- by overriding methods in the Yesod typeclass. That instance is
-- declared in the Foundation.hs file.... | mrb/tee-io | src/Settings.hs | mit | 6,049 | 0 | 13 | 1,673 | 879 | 505 | 374 | -1 | -1 |
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable #-}
module DSL where
import Numeric.AD
data Exp a
= Const a
| Neg (Exp a)
| (Exp a) :+: (Exp a)
| (Exp a) :*: (Exp a)
deriving (Functor, Foldable, Traversable)
instance Num a => Num (Exp a) where
(+) = (:+:)
(*) = (:*:)
fromInteger = Cons... | vladfi1/hs-misc | DSL.hs | mit | 506 | 0 | 8 | 125 | 243 | 130 | 113 | 19 | 1 |
module MoveTests where
import Chess.Internal.Piece
import Chess.Internal.Board
import Chess.Internal.Move
import TestUtils
import Test.Hspec
moveSpec :: IO ()
moveSpec = hspec $
describe "Move" $ do
isCorrectStartPieceSpec
isRightPlayerMoveSpec
areCoordinatesValidSpec
g... | nablaa/hchesslib | test/Chess/MoveTests.hs | gpl-2.0 | 23,504 | 0 | 16 | 6,027 | 6,709 | 3,341 | 3,368 | 297 | 1 |
module LineParse ( lineParse ) where
import IrcBot
import Types
import Cmds
import Data.List
import System.Time
import Control.Concurrent.MVar
import Data.List.Split
import Control.Monad.Reader
lineParse :: String -> Net ()
lineParse s
| ("PING :" `isPrefixOf` s) = write "PONG" (':' : drop 6 s)
| (rnum... | DSMan195276/QB64Bot | LineParse.hs | gpl-2.0 | 2,029 | 0 | 18 | 729 | 777 | 410 | 367 | 40 | 4 |
-- Copyright (C) 2013-2015 Moritz Schulte <mtesseract@silverratio.net>
-- This code needs a major cleanup, less imperative programing style,
-- safer programing (eliminate fromJust, etc.), less code duplication,
-- a nicer state handling, etc.
--
-- Feel free to submit patches. -MS
module Main (main) where
import Gr... | mtesseract/silverratio-jeopardy | src/jeopardy.hs | gpl-2.0 | 86,070 | 0 | 22 | 23,096 | 19,204 | 9,382 | 9,822 | 1,715 | 32 |
{-# OPTIONS_GHC -Wall -fwarn-tabs -Werror #-}
-------------------------------------------------------------------------------
-- |
-- Module : Window.Types
-- Copyright : Copyright (c) 2014 Michael R. Shannon
-- License : GPLv2 or Later
-- Maintainer : mrshannon.aerospace@gmail.com
-- Stability : un... | mrshannon/trees | src/Window/Types.hs | gpl-2.0 | 650 | 0 | 8 | 126 | 70 | 48 | 22 | 9 | 0 |
module Logic.TextZipper where
import Prelude hiding (FilePath)
import Types.Base
import Data.Text.Zipper as Tz
replaceZipper :: Text -> b -> TextZipper Text
replaceZipper t = const $ Tz.textZipper [t] (Just 1)
| diegospd/pol | src/Logic/TextZipper.hs | gpl-3.0 | 213 | 0 | 8 | 33 | 72 | 41 | 31 | 6 | 1 |
{-|
Copyright : (c) Quivade, 2017
License : GPL-3
Maintainer : Jakub Kopański <jakub@quivade.com>
Stability : experimental
Portability : POSIX
This module provides FIRRTL Expr AST definitions.
|-}
module Language.FIRRTL.Syntax.Expr
( UnaryOp (..)
, BinaryOp (..)
, TernaryOp (..)
, Literal (..)
, Exp... | quivade/screwdriver | src/Language/FIRRTL/Syntax/Expr.hs | gpl-3.0 | 2,918 | 0 | 9 | 914 | 1,001 | 541 | 460 | 72 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Locations/List.hs | mpl-2.0 | 5,925 | 0 | 19 | 1,458 | 970 | 561 | 409 | 133 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Delete.hs | mpl-2.0 | 5,479 | 0 | 15 | 1,162 | 713 | 423 | 290 | 102 | 1 |
module Robotics.NXT.Data (
fromUByte,
fromUWord,
fromULong,
fromSByte,
fromSWord,
fromSLong,
dataToString,
dataToString0,
toUByte,
toUWord,
toULong,
toSByte,
toSWord,
toSLong,
stringToData,
stringToData0,
nameToData,
messageToData
) where
import qualified Data.ByteString.Lazy as B
i... | mitar/nxt | lib/Robotics/NXT/Data.hs | lgpl-3.0 | 5,018 | 0 | 12 | 1,289 | 1,636 | 860 | 776 | 90 | 2 |
module Philosophers (
Philosopher,
philosophersDinner
) where
import System.IO (hFlush, stdout)
import System.Random
import Control.Monad (forever, forM, replicateM)
import Control.Concurrent (threadDelay, forkIO, yield)
import Control.Concurrent.STM
type OutputLog = TChan String
type Spoon = TMVar ()
type... | k0001/philod | Philosophers.hs | unlicense | 1,501 | 0 | 13 | 312 | 530 | 272 | 258 | 33 | 1 |
module Main where
import Types.Cards
import Types.Lists
import Types.Trees
import Types.User
main :: IO ()
main = putStrLn "SplitTests compiled"
{-
? marks are used to show where a variable will be
in the expected patterns
-}
{-
Testing Maybe - From internal type db
Expected [ Nothing & Just ? ]
... | DarrenMowat/blackbox | tests/SplitTests.hs | unlicense | 3,690 | 0 | 8 | 1,052 | 673 | 364 | 309 | 61 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.